Centos7 start zookeeper cannot connect to port 2181

Start zookeeper, can ping the virtual machine, but the telnet ip+ port finds that the connection is timed out or refused

Troubleshooting ideas

  1. First check if the IP is the same
  2. Whether zookeeper started successfully bin/zkServer.sh statusor ss -ntl | grep 2181ornetstat -anpt | grep 2181
  3. Check whether Linux has turned off the firewall
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

Turn off the firewall (temporarily turn off, the firewall will automatically turn on after restarting the virtual machine)

sudo systemctl stop firewalld.service

Prohibit firewall service (permanently shut down)

sudo systemctl disable firewalld.service

Telnet again to connect successfully

Guess you like

Origin blog.csdn.net/lz6363/article/details/105940107