Support Questions

Find answers, ask questions, and share your expertise

hiveserver2 alway shut down

avatar
Expert Contributor

The hiveserver2 service alway shut down after i start it. The errors follows:

2016-02-24 09:31:57,949 INFO  [main]: service.AbstractService (AbstractService.java:stop(125)) - Service:CLIService is stopped. 
2016-02-24 09:31:57,950 INFO  [main]: service.AbstractService (AbstractService.java:stop(125)) - Service:HiveServer2 is stopped.
2016-02-24 09:31:57,965 INFO  [main]: zookeeper.ZooKeeper (ZooKeeper.java:close(684)) - Session: 0x3530737a5b706d0 closed 
2016-02-24 09:31:57,965 INFO  [main-EventThread]: zookeeper.ClientCnxn (ClientCnxn.java:run(524)) - EventThread shut down 
2016-02-24 09:31:57,965 INFO  [main]: server.HiveServer2 (HiveServer2.java:removeServerInstanceFromZooKeeper(279)) - Server instance removed from ZooKeeper. 
2016-02-24 09:31:57,967 WARN  [main]: server.HiveServer2 (HiveServer2.java:startHiveServer2(376)) - Error starting HiveServer2 on attempt 1, will retry in 60 seconds
java.lang.NoSuchMethodError: org.apache.curator.utils.PathUtils.validatePath(Ljava/lang/String;)Ljava/lang/String;
        at org.apache.curator.framework.recipes.nodes.PersistentEphemeralNode.<init>(PersistentEphemeralNode.java:194)
        at org.apache.hive.service.server.HiveServer2.addServerInstanceToZooKeeper(HiveServer2.java:194)
        at org.apache.hive.service.server.HiveServer2.startHiveServer2(HiveServer2.java:351)
        at org.apache.hive.service.server.HiveServer2.access$700(HiveServer2.java:74)
        at org.apache.hive.service.server.HiveServer2$StartOptionExecutor.execute(HiveServer2.java:588)
        at org.apache.hive.service.server.HiveServer2.main(HiveServer2.java:461)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
        at java.lang.reflect.Method.invoke(Method.java:497)
        at org.apache.hadoop.util.RunJar.run(RunJar.java:221)
        at org.apache.hadoop.util.RunJar.main(RunJar.java:136) 
2016-02-24 09:32:09,219 INFO  [HiveServer2-Handler-Pool: Thread-53]: thrift.ThriftCLIService (ThriftCLIService.java:OpenSession(294)) - Client protocol version: HIVE_CLI_SERVICE_PROTOCOL_V8 
2016-02-24 09:32:09,266 INFO  [HiveServer2-Handler-Pool: Thread-53]: session.SessionState (SessionState.java:createPath(641)) - Created local directory: /tmp/6cb7c752-3742-4a66-8f5a-ecb87abd78b9_resources
2016-02-24 09:32:09,282 INFO  [HiveServer2-Handler-Pool: Thread-53]: session.SessionState (SessionState.java:createPath(641)) - Created HDFS directory: /tmp/hive/hive/6cb7c752-3742-4a66-8f5a-ecb87abd78b9
2016-02-24 09:32:09,284 INFO  [HiveServer2-Handler-Pool: Thread-53]: session.SessionState (SessionState.java:createPath(641)) - Created local directory: /tmp/hive/6cb7c752-3742-4a66-8f5a-ecb87abd78b9 
2016-02-24 09:32:09,290 INFO  [HiveServer2-Handler-Pool: Thread-53]: session.SessionState (SessionState.java:createPath(641)) - Created HDFS directory: /tmp/hive/hive/6cb7c752-3742-4a66-8f5a-ecb87abd78b9/_tmp_space.db 
2016-02-24 09:32:09,294 WARN  [HiveServer2-Handler-Pool: Thread-53]: session.HiveSessionImpl (HiveSessionImpl.java:setOperationLogSessionDir(230)) - Unable to create operation log session directory: /tmp/hive/operation_logs/6cb7c752-3742-4a66-8f5a-ecb87abd78b9 
2016-02-24 09:32:09,569 INFO  [HiveServer2-Handler-Pool: Thread-53]: service.CompositeService (SessionManager.java:closeSession(300)) - This instance of HiveServer2 has been removed from the list of server instances available for dynamic service discovery. The last client session has ended - will shutdown now. 
2016-02-24 09:32:09,570 INFO  [Thread-23]: server.HiveServer2 (HiveServer2.java:stop(305)) - Shutting down HiveServer2
2016-02-24 09:32:09,570 INFO  [Thread-23]: server.HiveServer2 (HiveServer2.java:removeServerInstanceFromZooKeeper(279)) - Server instance removed from ZooKeeper.
10 REPLIES 10

avatar
Master Mentor

@li zhen Can you past fe entries from hiveserver2 log?

avatar
Expert Contributor

you mean the full logs of hiveserver2?

avatar
Master Mentor

@li zhen No..entries related to error. I see this but need to check if there is more information

Error starting HiveServer2 on attempt 1, will retryin60 seconds

java.lang.NoSuchMethodError: org.apache.curator.utils.PathUtils.validatePath(Ljava/lang/String;)Ljava/lang/String;

avatar
Expert Contributor

there is no more error logs,there is also a warning

session.HiveSessionImpl(HiveSessionImpl.java:setOperationLogSessionDir(230))-Unable to create operation log session directory:/tmp/hive/operation_logs/6cb7c752-3742-4a66-8f5a-ecb87abd78b9 

avatar
Master Mentor

@li zhen

"Unable to create operation log session directory" could you check the permissions of /tmp/hive/hive ?

avatar
Expert Contributor

thank you for reply, after i create the dir /tmp/hive/hive use hive account, the hiveserver2 still not work.

java.lang.Error: Max start attempts 30 exhausted at org.apache.hive.service.server.HiveServer2.startHiveServer2(HiveServer2.java:374) Caused by: java.lang.NoSuchMethodError: org.apache.curator.utils.PathUtils.validatePath(Ljava/lang/String;)Ljava/lang/String;

avatar
Master Mentor
@li zhen

Can you shutdown hive ? Once it's down then

ps -ef | grep -i hive

If you see any process related to hive then kill it and then start HIVE from ambari

avatar
Expert Contributor

This seems to be related to directory permissions on HDFS. Please list permissions on /tmp directory on HDFS like

hadoop fs -ls /

and hive user information

id hive

avatar
Expert Contributor
@Umair Khan,

thanks for reply, but after i chmod 777 on that directory, i still cannot start.