概述
- HDP kerberos 关闭后,出现hiveServer2 不断的启动和关闭
2019-09-20 14:16:12,751 FATAL [main]: server.HiveServer2 (HiveServer2.java:addServerInstanceToZooKeeper(258)) - Unable to create a znode for this server instance
java.lang.Exception: Max znode creation wait time: 120s exhausted
at org.apache.hive.service.server.HiveServer2.addServerInstanceToZooKeeper(HiveServer2.java:247)
at org.apache.hive.service.server.HiveServer2.start(HiveServer2.java:395)
at org.apache.hive.service.server.HiveServer2.startHiveServer2(HiveServer2.java:475)
at org.apache.hive.service.server.HiveServer2.access$700(HiveServer2.java:87)
at org.apache.hive.service.server.HiveServer2$StartOptionExecutor.execute(HiveServer2.java:720)
at org.apache.hive.service.server.HiveServer2.main(HiveServer2.java:593)
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:498)
at org.apache.hadoop.util.RunJar.run(RunJar.java:233)
at org.apache.hadoop.util.RunJar.main(RunJar.java:148)
2019-09-20 14:16:12,752 ERROR [main]: server.HiveServer2 (HiveServer2.java:start(397)) - Error adding this HiveServer2 instance to ZooKeeper:
java.lang.Exception: Max znode creation wait time: 120s exhausted
at org.apache.hive.service.server.HiveServer2.addServerInstanceToZooKeeper(HiveServer2.java:247)
at org.apache.hive.service.server.HiveServer2.start(HiveServer2.java:395)
at org.apache.hive.service.server.HiveServer2.startHiveServer2(HiveServer2.java:475)
at org.apache.hive.service.server.HiveServer2.access$700(HiveServer2.java:87)
at org.apache.hive.service.server.HiveServer2$StartOptionExecutor.execute(HiveServer2.java:720)
at org.apache.hive.service.server.HiveServer2.main(HiveServer2.java:593)
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:498)
at org.apache.hadoop.util.RunJar.run(RunJar.java:233)
at org.apache.hadoop.util.RunJar.main(RunJar.java:148)
2019-09-20 14:16:12,752 INFO [main]: server.HiveServer2 (HiveServer2.java:stop(405)) - Shutting down HiveServer2
2019-09-20 14:16:12,752 INFO [main]: thrift.ThriftCLIService (ThriftCLIService.java:stop(221)) - Thrift server has stopped
2019-09-20 14:16:12,752 INFO [main]: service.AbstractService (AbstractService.java:stop(125)) - Service:ThriftBinaryCLIService is stopped.
原因是hiveServer2无法在zookeeper中创建节点,可能zookeeper出了问题,可以检查一下是否创建了zk节点。进入zk查看是否有创建 hiveserver2
/usr/hdp/current/zookeeper-client/bin/zkCli.sh
ls / //查看全部的节点
ls /hiveserver2 //查看hiveserver2节点内容
这边看到hiveserver2 是已经创建了,但是权限是kerberos权限,导致hiveserver2 不能够再加入zookeeper中。
第一种处理方法:
删除已有的hiveserver2 ,重启hiveserver2 ,可以看到新的hiveserver2 已经加入到zk中了。
hiveserver2 正常了。
第二种处理方法:
修改配置,当kerberos开启和关闭时采用不同的配置,在znode中创建不同的节点信息
比如,关闭kerberos时
"hive.server2.zookeeper.namespace"="hiveserver2"
开启时
"hive.server2.zookeeper.namespace"="hiveserver2-kerberos"
最后
以上就是文艺微笑为你收集整理的Hive 问题合集的全部内容,希望文章能够帮你解决Hive 问题合集所遇到的程序开发问题。
如果觉得靠谱客网站的内容还不错,欢迎将靠谱客网站推荐给程序员好友。
本图文内容来源于网友提供,作为学习参考使用,或来自网络收集整理,版权属于原作者所有。
发表评论 取消回复