Created on 08-28-2017 08:14 AM - edited 08-17-2019 06:02 PM
Hello,
I tried to connect to hive using jdbc but i had the following error:
Service Hive check failed: Cannot open a hive connection with connect
string
jdbc:hive2://tcb-inspiron-5559:2181/;serviceDiscoveryMode=zooKeeper;zooKeeperNamespace=hiveserver2;hive.server2.proxy.user=admin
I will be thankfull for your help.
thanks
Created 08-28-2017 08:21 AM
Please check if the Hostname "tcb-inspiron-5559:2181" is a correct FQDN? and is it reachable form the ambari server hsot?
Example: Login to the host "tcb-inspiron-5559" using SSH and then run the following command to verify of its FQDN is correct?
# hostname -f # service iptables status # service iptables stop
.
Also from the ambari server host try to connect to the host & port 2181 as following to see that there is no N/W or Firewall issue.
# telnet tcb-inspiron-5559 2181 (OR) # nc -v tcb-inspiron-5559 2181
.
If you are not able to connect the Zookeeper instance then please double check if your Zookeeper is running fine and accessible on that host? Please check the following command output on host "tcb-inspiron-5559"
# ps -ef | grep zookeeper # netstat -tnlpa | grep `cat /var/run/zookeeper/zookeeper_server.pid`
.
Also please let us know if this is a kerberized environment or Non kerberized. If it is kerberized cluster then please check if you are following the instructions for kerberized cluster Hive view :
https://community.hortonworks.com/articles/40658/configure-hive-view-for-kerberized-cluster.html
.
Created 08-28-2017 08:30 AM
Additionally can you please check and share the "/var/log/ambari-server/ambari-server.log" as soon as you see the mentioned error on HIve View UI. I guess we should see a more detailed stackTrace of the error inside either "ambari-server.log" or inside the view specific log file "/var/log/ambari-server/hive-next-view/hive-view.log".
Created 12-14-2017 01:31 AM
Please check ambari user ownership oh hdfs
hdfs dfs -chown admin:hadoop /user/admin
Created 06-26-2018 05:00 PM
For future readers, this problem/symptom can occur due to hive.exec.scratchdir creating too many subdirectories. In one case, I had over 1,400,000 subdirectories under /tmp/hive
To fix: