Support Questions

Find answers, ask questions, and share your expertise
Check out our newest addition to the community, the Cloudera Data Analytics (CDA) group hub.

Attempting to connect to Hiveserver2 HA with Toad with JDBC string.

Cloudera Employee

I'm trying to connect to an HA Hiveserver 2 instance using Zookeeper quorum. When I implement my connection string to hive I'm using the following example:


When it tries to connect I get a GSS error:

What I've narrowed down is that when I get this error it's because Toad is unable to handle the "_HOST" when making the connection string.

When I change the principal=hive/<FQDN_HIVESERVER>@<DOMAIN> I'm able to successfully connect to Hiveserver2.

Now for the where I run into an ultimate problem. While using: jdbc:hive2://<FQDN_Zookeeper>:2181,<FQDN_Zookeeper>:2181,<FQDN_Zookeeper>:2181/;serviceDiscoveryMode=zooKeeper;principal=hive/<FQDN_HIVESERVER_1>@<DOMAIN>;zooKeeperNamespace=hiveserver2-binary

I'm only attaching to <FQDN_HIVESERVER_1> and when it goes down I'm not longer able to connect because I'm now passing the incorrect Kerberos Principal to <FQDN_HIVESERVER_2>. As soon as I manually switch over my connection string I'm able to connect to FQDN_HIVESERVER_2, but if that server goes down I'm not having to manually edit my connection strings each time I want to connect if I have an issue. Which I think defeats the purpose of HA.

Has anyone been able to get Toad to pass either the _HOST or Configured it to work with JDBC Hiveserver2 HA with Zookeeper?


Super Guru

@Scott Summers

In your Toad settings under "User defined properties", can you add the following and try running your query with _HOST again:

dfs.client.use.datanode.hostname True

Cloudera Employee

@mqureshi I tried adding that property to the User defined Properties and I'm still getting the GSS exception.

I'll keep digging. Thanks for your suggestion.

Super Guru

@Scott Summers

Okay. I think what you are looking for is enable proxy user access to hiveserver2. See the following link:

I have not played with this myself, but basically you need to provide your load balancer access to hiveserver2 which is what you are missing. According to the link above, you need to add following. Follow that JIRA. I think your load balancer need to have access to hiveserver2 which it doesn't have, hence GSS initiate failed.


and check the following link:

Take a Tour of the Community
Don't have an account?
Your experience may be limited. Sign in to explore more.