I have problems with HiveServer2 in Ambari. When I start the service, HiveServer2 runs during several minutes and then the service gets stopped.
Connection failed on host eureambarislave1.local.eurecat.org:10000 (Traceback (most recent call last): File "/var/lib/ambari-agent/cache/common-services/HIVE/0.12.0.2.0/package/alerts/alert_hive_thrift_port.py", line 212, in execute ldap_password=ldap_password) File "/usr/lib/python2.6/site-packages/resource_management/libraries/functions/hive_check.py", line 81, in check_thrift_port_sa...
I tried to execute the beeline command from terminal:
[root@eureambarislave1 hive]# beeline -u jdbc:hive2://eureambarislave1.local.eurecat.org:10000/;transportMode=binary
Connecting to jdbc:hive2://eureambarislave1.local.eurecat.org:10000/
18/04/14 16:24:17 [main]: WARN jdbc.HiveConnection: Failed to connect to eureambarislave1.local.eurecat.org:10000
Error: Could not open client transport with JDBC Uri: jdbc:hive2://eureambarislave1.local.eurecat.org:10000/: java.net.ConnectException: Connection refused (Connection refused) (state=08S01,code=0)
Beeline version 1.2.1000.2.6.4.0-91 by Apache Hive
0:
jdbc:hive2://eureambarislave1.local.eureca (closed)>
Also I tried to start HiveServer2 manually, but it gets stuck at "nohup: ignoring input and appending output to ‘nohup.out’":
[root@eureambarislave1 hive]# su $HIVE_USER
[root@eureambarislave1 hive]# nohup /usr/hdp/current/hive-server2/bin/hiveserver2 -hiveconf hive.metastore.uris=/tmp/hiveserver2HD.out 2 /tmp/hiveserver2HD.log
nohup: ignoring input and appending output to ‘nohup.out’
Finally I checked the port 10000, but there is no output:
[root@eureambarislave1 hive]# netstat -tnlpa | grep 10000
This is the output of HiveServer2 logs:
2018-04-14 08:53:52,032 INFO [main]: server.HiveServer2 (HiveStringUtils.java:startupShutdownMessage(693)) - STARTUP_MSG:
/************************************************************
STARTUP_MSG: Starting HiveServer2
STARTUP_MSG: host = eureambarislave1.local.eurecat.org/192.168.0.10
STARTUP_MSG: args = [--hiveconf, hive.aux.jars.path=file:///usr/hdp/current/hive-webhcat/share/hcatalog/hive-hcatalog-core.jar, -hiveconf, hive.metastore.uris= , -hiveconf, hive.log.file=hiveserver2.log, -hiveconf, hive.log.dir=/var/log/hive]
STARTUP_MSG: version = 1.2.1000.2.6.4.0-91