配置好zookeeper之后,关闭防火墙
# systemctl stop firewalld.service //关闭firewall
#systemctl disable firewalls.service //开机禁用
#firewall-cmd --state //查看防火墙的状态(关闭是not running)
注:
2888端口号是zookeeper服务之间通信的端口。
3888端口是zookeeper与其他应用程序通信的端口。
2181端口是zookeeper客户端请求接口。
防火墙必须放开这三个端口,zk才能正常启动
启动zk服务
在bin目录下,三台依次启动
# sh zkServer.sh start
ZooKeeper JMX enabled by default
Using config: /home/260206/software/zookeeper/zookeeper-3.4.13/bin/../conf/zoo.cfg
Starting zookeeper ... STARTED
查看状态
# sh zkServer.sh status
ZooKeeper JMX enabled by default
Using config: /home/260206/software/zookeeper/zookeeper-3.4.13/bin/../conf/zoo.cfg
Error contacting service. It is probably not running.
Error contacting service. It is probably no