凡事都在事上磨,这样才能精进,成长进步提高! ------ 博客园首页

Centos7启动zookeeper无法连接2181端口

启动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即可连接成功

因为相信,所以看见.
posted @ 2021-04-11 01:46  zeenzhou  阅读(277)  评论(0编辑  收藏  举报