Created 03-05-2018 11:57 PM
1)[root@sandbox ~]# beeline -u 'jdbc:hive2://sandbox.hortonworks.com:2181/;serviceDiscoveryMode=zooKeeper;zooKeeperNamespace=hiveserver2'
18/03/01 00:47:35 [main-SendThread(sandbox.hortonworks.com:2181)]: WARN zookeeper.ClientCnxn: Session 0x0 for server null, unexpected error, closing socket connection and attempting reconnect
java.net.ConnectException: Connection refused
2)beeline> !connect jdbc:hive2://172.16.88.1xx:10000
Connecting to jdbc:hive2://172.16.88.1xx:10000
Enter username for jdbc:hive2://172.16.88.1xx:10000: root
Enter password for jdbc:hive2://172.16.88.1xx:10000: **********
Error: Could not open client transport with JDBC Uri: jdbc:hive2://172.16.88.1xx:10000: java.net.ConnectException: Connection refused (Connection refused) (state=08S01,code=0)
Additionally, I am not able to start ambari at url: sandbox.hortonworks.com:8080 or <corresponding ip address>:8080
These properties are set in hive-site.xml
hive.zookeeper.quorum sandbox.hortonworks.com:2181
<property> <name>hive.server2.zookeeper.namespace</name> <value>hiveserver2</value> </property>
<property> <name>hive.server2.support.dynamic.service.discovery</name> <value>true</value> </property>
Thanks.
Created 03-06-2018 02:37 AM
@Kumar K,
Looks like your hiveserver2 is not running. Please start hiveserver2 and then run the beeline command.
To start HiveServer2, Go to Ambari -> Hive -> Click on HiveServer2 -> Start
Also , can you please run the command and paste the output here
netstat -tupln | grep 10000
Thanks,
Aditya
Created 03-06-2018 08:53 AM
ambari-server status
If it is not running, please start ambari server. Also, check status for all ambari agents.
Created 03-07-2018 01:10 AM
Thank you so much for taking time to look into it.
My ambari portal is not working.
[root@sandbox ~]# ambari-server status
Using python /usr/bin/python2
Ambari-server status
Ambari Server not running. Stale PID File at: /var/run/ambari-server/ambari-server.pid
hence I started it manually
[root@sandbox ~]# ambari-star./start_ambari.sh
-bash: ambari-star./start_ambari.sh: No such file or directory
[root@sandbox ~]# ./start_ambari.sh
Starting Ambari...
Starting Ambari server [ OK ]
Starting Ambari agent [ OK ]
====================================
Ambari autostart enabled
To disable auto-start of Ambari do
# chkconfig ambari off
====================================
I am still no table to access Ambari at sandbox.hortonworks.com:8080 or 172.16.88.1xx:8080
Didn't get any output for both these commands.
[root@sandbox ~]# netstat -tupln | grep 8080
[root@sandbox ~]# netstat -tupln | grep 10000
so followed the instructions to manually start hive-server2 in (https://community.hortonworks.com/content/supportkb/48992/how-to-manually-restart-hiveserver2-just-like-amba.html).
[root@sandbox ~]# beeline -u jdbc:hive2://172.16.88.1xx:10000
Connecting to jdbc:hive2://172.16.88.1xx:10000
Connected to: Apache Hive (version 1.2.1000.2.4.0.0-169)
Driver: Hive JDBC (version 1.2.1000.2.4.0.0-169)
Transaction isolation: TRANSACTION_REPEATABLE_READ
Beeline version 1.2.1000.2.4.0.0-169 by Apache Hive
jdbc:hive2://172.16.88.197:10000> show databases;
| database_name |
+----------------+--+
| default |
Now the issue is if I use below jdbc connection with discovery mode zookeeper, I am getting error.
beeline -u 'jdbc:hive2://172.16.88.1xx:2181/;serviceDiscoveryMode=zooKeeper;zooKeeperNamespace=hiveserver2'
Connecting to jdbc:hive2://172.16.88.1xx:2181/;serviceDiscoveryMode=zooKeeper;zooKeeperNamespace=hiveserver2
18/03/07 00:54:45 [main-SendThread(172.16.88.1xx:2181)]: WARN zookeeper.ClientCnxn: Session 0x0 for server null, unexpected error, closing socket connection and attempting reconnect
java.net.ConnectException: Connection refused
Manually started zk.
[root@sandbox ~]# /usr/hdp/2.4.0.0-169/zookeeper/bin/zkServer.sh start
ZooKeeper JMX enabled by default
Using config: /usr/hdp/2.4.0.0-169/zookeeper/bin/../conf/zoo.cfg
Starting zookeeper ... STARTED
But still no luck.
Something is terribly wrong with some configuration as both zookeeper and ambari had issues. Earlier I used a different version of sandbox(2 years back) and didn't receive so many issues.
Current sandbox is HDP 2.4
Could you pls suggest.
Created 03-13-2018 08:41 PM
Hello, could you please use 2.6 Sandbox? It is more robust & running with lot of enhancements throughout the stack. If there is no business restriction, please use the latest HDP 2.6.x Sandbox. Thanks.