Support Questions

Find answers, ask questions, and share your expertise

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

avatar
Contributor

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/127.0.0.1:2181. 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: /127.0.0.1:59736, server: localhost/127.0.0.1:2181
2022-02-03 01:58:36,093 - INFO  [main-SendThread(localhost:2181):ClientCnxn$SendThread@1273] - Session establishment complete on server localhost/127.0.0.1:2181, sessionid = 0x27ebd79aecc0141, negotiated timeout = 30000

WATCHER::

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?. 

1 REPLY 1

avatar
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/zkCli.sh -server c2757-node3.coelab.cloudera.com:2181
/usr/java/jdk1.8.0_232-cloudera/bin/java
Connecting to c2757-node3.coelab.cloudera.com:2181
Welcome to ZooKeeper!
JLine support is enabled

WATCHER::

WatchedEvent state:SyncConnected type:None path:null
[zk: c2757-node3.coelab.cloudera.com:2181(CONNECTED) 0] ls /
[confstore, hbase, hiveserver2, kafka, rmstore, solr-infra, zookeeper]
[zk: c2757-node3.coelab.cloudera.com:2181(CONNECTED) 1] ls /hiveserver2
[serverUri=c2757-node3.coelab.cloudera.com:10000;version=3.1.3000.7.1.6.0-297;sequence=0000000024]
[zk: c2757-node3.coelab.cloudera.com:2181(CONNECTED) 7] create /sample
Created /sample
[zk: c2757-node3.coelab.cloudera.com:2181(CONNECTED) 8] ls /
[confstore, hbase, hiveserver2, kafka, rmstore, sample, solr-infra, zookeeper]