[root@node1 ~]# zkServer.sh start ZooKeeper JMX enabled by default Using config: /opt/apache-zookeeper-3.8.0-bin/bin/../conf/zoo.cfg Starting zookeeper ... STARTED
[root@node1 ~]# zkServer.sh status ZooKeeper JMX enabled by default Using config: /opt/apache-zookeeper-3.8.0-bin/bin/../conf/zoo.cfg Client port found: 2181. Client address: localhost. Client SSL: false. Error contacting service. It is probably not running.
查看结果发现此时还未正常工作,是因为zookeeper要求至少两台及以上节点启动时候,才能正常工作
启动node2
1 2 3 4 5 6 7 8 9
[root@node2 ~]# zkServer.sh start ZooKeeper JMX enabled by default Using config: /opt/apache-zookeeper-3.8.0-bin/bin/../conf/zoo.cfg Starting zookeeper ... STARTED [root@node2 ~]# zkServer.sh status ZooKeeper JMX enabled by default Using config: /opt/apache-zookeeper-3.8.0-bin/bin/../conf/zoo.cfg Client port found: 2181. Client address: localhost. Client SSL: false. Mode: leader
此时发现node2成功运行,作为leader
启动node3
1 2 3 4 5 6 7 8 9
[root@node3 ~]# zkServer.sh start ZooKeeper JMX enabled by default Using config: /opt/apache-zookeeper-3.8.0-bin/bin/../conf/zoo.cfg Starting zookeeper ... STARTED [root@node3 ~]# zkServer.sh status ZooKeeper JMX enabled by default Using config: /opt/apache-zookeeper-3.8.0-bin/bin/../conf/zoo.cfg Client port found: 2181. Client address: localhost. Client SSL: false. Mode: follower
hbase中输入任何命令均提示ERROR: KeeperErrorCode = NoNode for /hbase/master
1 2 3 4 5 6 7 8
hbase:001:0> list_namespace NAMESPACE
ERROR: KeeperErrorCode = NoNode for /hbase/master
For usage try 'help "list_namespace"'
Took 0.1580 seconds
jps查看进程信息发现HMaster也挂了
进入hbase安装目录下的logs查看
cd /opt/hbase-2.4.11/logs
vim hbase-root-master-master.log
在最后末尾发现了一个java异常
1 2 3 4 5 6 7 8 9 10 11
2022-04-23 23:00:31,233 ERROR [master/master:16000:becomeActiveMaster] master.HMaster: ***** ABORTING master master,16000,1650726017761: Unhandled exception. Starting shutdown. ***** java.net.ConnectException: Call From master/192.168.166.100 to master:9000 failed on connection exception: java.net.ConnectException: Connection refused; For more details see: http://wiki.apache.org/hadoop/ConnectionRefused at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method) at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62) at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45) at java.lang.reflect.Constructor.newInstance(Constructor.java:423) at org.apache.hadoop.net.NetUtils.wrapWithMessage(NetUtils.java:824) at org.apache.hadoop.net.NetUtils.wrapException(NetUtils.java:754) at org.apache.hadoop.ipc.Client.getRpcResponse(Client.java:1544) at org.apache.hadoop.ipc.Client.call(Client.java:1486) at org.apache.hadoop.ipc.Client.call(Client.java:1385)