Created 05-01-2017 05:45 PM
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:
jdbc:hive2://<FQDN_Zookeeper>:2181,<FQDN_Zookeeper>:2181,<FQDN_Zookeeper>:2181/;serviceDiscoveryMode=zooKeeper;principal=hive/_HOST@<DOMAIN>;zooKeeperNamespace=hiveserver2-binary
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?
Created 05-01-2017 07:04 PM
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
Created 05-02-2017 07:36 PM
@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.
Created 05-02-2017 07:53 PM
Okay. I think what you are looking for is enable proxy user access to hiveserver2. See the following link:
https://issues.apache.org/jira/browse/HIVE-5155
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.
<property> <name>hive.server2.proxyuser.HS.hosts</name> <value>host1,host2</value> </property> <property> <name>hive.server2.proxyuser.HS.groups</name> <value>group1,group2</value> </property>
and check the following link: