When installing zookeeper-3.3.2, it started normally and no error was reported, but when checking the status with zkServer.sh status, an error occurred, as follows:
JMX enabled by default
Using config: /hadoop/zookeeper/bin/../conf/zoo.cfg
Error contacting service. It is probably not running.
jps looks at the process, but finds that the process has started
7313 QuorumPeerMain
There are three solutions for searching information online:
1, open zkServer.sh to find status)
STAT=`echo stat | nc localhost $(grep clientPort “$ZOOCFG” | sed -e’s/.*=//’) 2> /dev/null| grep Mode`Add
-q between nc and localhost 1 (It is the number 1 instead of the letter l)
If it already exists, remove the
note: Because the zookeeper I use is version 3.4.5, there is no line at all in my zkServer.sh script file, so it does not take effect
2. Call sh zkServer.sh status to encounter this problem. Baidu and Google found that someone modified a parameter of nc in the sh script to solve the problem, but the call of nc was not found in the sh file of 3.4.5. The log directory specified in the configuration file was not created and caused an error. Manually add the directory and restart, and the problem is solved.
Note: I think it’s not a log issue, so this method is not tried at all.
3. Create a data directory, that is, create a myid file in the directory specified by dataDir in your zoo.cfg configuration file, and specify the id, change the id to server.1=localhost:2888:3888 in your zoo.cfg file 1. Just write 1 in the myid header.
Note: When I installed the second time, the myid file was not created in the directory specified by dataDir, and the error was also reported. After creating the myid file in the directory specified by dataDir, no error was reported.
4 Because the firewall is not turned off. Turn off the firewall:
#View firewall status
service iptables status
#Turn off the firewall
service iptables stop #View the
startup status of the firewall
chkconfig iptables –list #Turn
off the firewall and start
chkconfig iptables off
Note: I did not turn off the firewall at the beginning, but when I turned off the firewall it did not solve the problem.
5 The mapping relationship between host and ip is not established.
The command to establish the mapping relationship between hosts and ip is vim /etc/hosts. Add the mapping relationship between each host and ip address at the end of the file.
Note: Only after the mapping relationship is established, can the machines on the same network segment use the host name for file transfer. problem solved!
Read More:
- [Solved] ZooKeeper Configurate Error: Error contacting service. It is probably not running.
- [Solved] Zookeeper3.6.0 Error: Error contacting service. It is probably not running
- [Solved] Error contacting service. It is probably not running.
- [Solved] Error contacting service. It is probably not running.
- [Solved] Service Start Error When Horizon View Composer is Installing
- [Solved] zookeeper Startup Error: already running as process
- It can be opened with localhost, but not with IP address. The request host name is invalid
- Android studio can’t start, running error: warning: crash service did not start
- Vscode pylint reported an error of “no member”, but it is running normally
- [Solved] Android Studio Error:This view is not constrained, it only has designtime positions
- How to Solve VMware Workstation Error: The VMware Authorization Service is not running.
- [Solved] Postgres Start Error: Job for postgresql.service failed because the control process exited with error code.
- How to Solve “Status bar could not find cached time string image. Rendering in-process.” in Xcode
- IDEA Start Tomcat Error: Error running ‘start Tomcat‘: Can‘t find catalina.jar
- [Solved] Mac M1 Debug Error: could not launch process: can not run under Rosetta
- Docker service startup error: Job for docker.service failed because the control process exited with error code.
- [Solved] Playbook Start Nginx Error: Unable to start service nginx: Job for nginx.service fd with error code
- [Solved] Android Error: java.lang.IllegalStateException: Not allowed to start service Intent
- [Solved] Job for mysqld.service failed because the control process exited with error code.
- Start Docker Quickstart Terminal error This computer is running Hyper-V. VirtualBox won’t boot a 64bits VM when Hyper-V is activated