Support Questions

Find answers, ask questions, and share your expertise
Celebrating as our community reaches 100,000 members! Thank you!

How to create Hiveserver2 znode name instance in zkcli shell if it is not created by Ambari automatically?.


I am facing an error during hiverserver2 start as "

caught exception: ZooKeeper node /hiveserver2 is not ready yet

and when I debug more I see that there is no hiveserver2 instance in zookeeper. 




Welcome to ZooKeeper!
2022-02-03 01:58:35,986 - INFO  [main-SendThread(localhost:2181):ClientCnxn$SendThread@1013] - Opening socket connection to server localhost/ Will not attempt to authenticate using SASL (unknown error)
JLine support is enabled
2022-02-03 01:58:36,072 - INFO  [main-SendThread(localhost:2181):ClientCnxn$SendThread@856] - Socket connection established, initiating session, client: /, server: localhost/
2022-02-03 01:58:36,093 - INFO  [main-SendThread(localhost:2181):ClientCnxn$SendThread@1273] - Session establishment complete on server localhost/, sessionid = 0x27ebd79aecc0141, negotiated timeout = 30000


WatchedEvent state:SyncConnected type:None path:null
[zk: localhost:2181(CONNECTED) 0] ls /hiveserver2
[zk: localhost:2181(CONNECTED) 1] 
[zk: localhost:2181(CONNECTED) 2] ls /
[cluster, registry, controller, brokers, storm, infra-solr, zookeeper, hbase-unsecure, hadoop-ha, tracers, admin, isr_change_notification, log_dir_event_notification, accumulo, controller_epoch, hiveserver2, hiveserver2-leader, druid, rmstore, atsv2-hbase-unsecure, consumers, ambari-metrics-cluster, latest_producer_id_block, config]




Can someone tell me how to create znode name if hiveserver2 is not registered to znode?. 


Cloudera Employee

In general, ambari will create that znode by default. we dont need to create manually. logs shows that issue with sasl. we can still create znode manually after logging into zookeeper cli.

[root@c2757-node3 ~]# /opt/cloudera/parcels/CDH-7.1.6-1.cdh7.1.6.p0.10506313/lib/zookeeper/bin/ -server
Connecting to
Welcome to ZooKeeper!
JLine support is enabled


WatchedEvent state:SyncConnected type:None path:null
[zk: 0] ls /
[confstore, hbase, hiveserver2, kafka, rmstore, solr-infra, zookeeper]
[zk: 1] ls /hiveserver2
[zk: 7] create /sample
Created /sample
[zk: 8] ls /
[confstore, hbase, hiveserver2, kafka, rmstore, sample, solr-infra, zookeeper]