In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-01-18 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >
Share
Shulou(Shulou.com)06/02 Report--
Recently, you need to use zookeeper when building a mq cluster, but it shows success when starting up, but an error is reported when checking the status:
It takes a long time to solve this problem, so here we sum up a quick solution!
First of all, you must look at the log:
Generally speaking, the error message is in this file under the current directory. Basically, I come across two kinds of reasons: one is port occupation, and the other is that the route cannot be found:
Another is that the port is occupied. Netstat-znpl | grep 2181 check and shut down the process. The default port is 2181. CFG is configurable.
! Here is a hint: zoo_sample.cfg must be changed to z.cfg, otherwise it cannot be started, and to check the status, all nodes configured with clusters must be started, because they have to communicate with each other to elect the boss.
Because of the above picture, the firewall blocked the communication, so the only thing to do was to turn off the firewall, so here comes the crappy point. I used centos7, and then turned it off and found it still didn't work. Later, I remembered that in order to use the habit, I didn't know when to replace the firewall with iptables, which was a trick, and then I could just turn it all off and check the success:
Note: after shutting down, it is best to adjust the port by kill, restart it all, and then take a look at the output log to see if there is an error, or not.
Here are the closing methods for firewalld and IPtables:
Firewalld (usually centos7 or above):
Temporary shutdown: systemctl stop firewalld.service
View status: systemctl status firewalld.service
Boot is disabled (reboot is required): systemctl disable firewalld.service
IPtables (before centos6):
Temporarily turn off the firewall: (effective immediately, boot reboot, it will be turned on again)
Service iptables stop
Permanently shut down the firewall (shutdown and restart will take effect)
Chkconfig iptables off
If it's in centos7, it needs to be written in a different way:
Systemctl stop iptables.service, the others are the same.
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.