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
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!
- [Solved] ERROR: for jms_koko Cannot start service koko: driver failed programming
- [Solved] Openwrt Pptpd Start Error: validation filed
- [Solved] Kubeadm join Timeout error execution phase kubelet-start: error uploading crisocket: timed out waiting
- Rabbitmq failed to stop normally: ERROR: node with name “rabbit” already running on “localhost”
- RabbitMQ：address (cannot connect to host/port) [How to Solve]
- How to Solve Rabbitmq Error: Failed to start RabbitMQ broker
- ArchLinux starts error after modifying MariaDB database path Can’t create test file /xxxxx/xxxxx-test
- Error response from daemon: driver failed programming external connectivity on endpoint quirky_allen is reported when docker port mapping or starting the container
- openlayers — Cannot read property ‘slice‘ of null—Map cannot be loaded
- How to Solve VMware Workstation Error: The VMware Authorization Service is not running.
- Docker service startup error: Job for docker.service failed because the control process exited with error code.
- How to Fix Failed to load resource: the server responded with a status of 404()
- The reason and solution for the error ECONNRESET of the httpClieint request of Node.js
- zabbix-Get value from agent failed: cannot connect to [[127.0.0.1]:10050]:  Connection refused
- [Solved] MYSQLD: Can‘t create directory ‘/usr/local/mysql/data/’(Errcode:2 -No such file or directory)
- Tomcat startup error: Failed to start component [StandardServer] solution
- How to Solve “Status bar could not find cached time string image. Rendering in-process.” in Xcode
- Vue Error reported after introduction of path: Already included file name ‘×××‘ differs from file name ‘×××‘ only in casing.
- NBU The vnet proxy encounrtened an error [How to Solve]
- AIX 11G Rac Startup Error: CLSU-00100,CLSU-00101,CLSU-00103,CLSU-00104,CRS-4000