启动zookeeper,能ping通虚拟机,但telnet ip+端口发现连接超时或拒绝
排查思路
首先查看IP是否一样
zookeeper是否启动成功 bin/zkServer.sh status或者ss -ntl | grep 2181或者netstat -anpt | grep 2181
查看Linux是否关闭防火墙
systemctl status firewalld.service
● firewalld.service - firewalld - dynamic firewall daemon
Loaded: loaded (/usr/lib/systemd/system/firewalld.service; disabled; vendor preset: enabled)
Active: active (running) since Sat 2019-12-28 21:57:48 CST; 4 months 7 days ago
Docs: man:firewalld(1)
Main PID: 701 (firewalld)
CGroup: /system.slice/firewalld.service
└─701 /usr/bin/python2 -Es /usr/sbin/firewalld --nofork --nopid
关闭防火墙(临时关闭,重启虚拟机后防火墙自动开启)
sudo systemctl stop firewalld.service
禁止防火墙服务(永久关闭)
sudo systemctl disable firewalld.service
再次telnet即可连接成功