今天搭建zookeeper集群,从安装zookeeper、修改zoo.cfg配置文件到创建myid文件,依次启动三台虚拟机后,查看zookeeper状态时一直报错,
ZooKeeper JMX enabled by default
Using config: /usr/local/zookeeper-3.4.14/bin/../conf/zoo.cfg
Error contacting service. It is probably not running.
登录客户端也报错:
Welcome to ZooKeeper!
2020-03-26 23:27:55,718 [myid:] - INFO [main-SendThread(ip2:2181):ClientCnxn$SendThread@1025] - Opening socket connection to server ip2/192.168.146.129:2181. Will not attempt to authenticate using SASL (unknown error)
2020-03-26 23:27:55,736 [myid:] - INFO [main-SendThread(ip2:2181):ClientCnxn$SendThread@1162] - Socket error occurred: ip2/192.168.146.129:2181: No route to host
JLine support is enabled
[zk: ip2:2181(CONNECTING) 0] 2020-03-26 23:27:56,860 [myid:] - INFO [main-SendThread(ip2:2181):ClientCnxn$SendThread@1025] - Opening socket connection to server ip2/192.168.146.129:2181. Will not attempt to