Install zookeeper-3.3.2, start normal no error, but zkserver.sh status when the status of the error occurs, as follows:
JMX enabled by default
Using config:/hadoop/zookeeper/bin/. /conf/zoo.cfg
Error contacting service. It is probably not running.
JPS viewing the process but discovering that the process has started
7313 Quorumpeermain
There are three ways to access the 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 1 between NC and localhost (is the number 1 instead of the letter L)
If it already exists, remove
Note: Because I use the zookeeper is 3.4.5 version, so in my zkserver.sh script file There is no such line, so it does not take effect
2, call SH zkserver.sh status to encounter this problem. Baidu, Google found that someone is modifying the sh script in a NC parameter to solve, in the 3.4.5 sh file did not find the NC call. The log directory specified in the configuration document is not created causing an error, manually increasing the directory after restarting, problem solving.
Note: I don't think it's a log problem, so this method doesn't even try.
3, create the data directory, that is, in your zoo.cfg configuration file datadir The specified directory to create the myID file, and specify the ID, change the ID of your zoo.cfg file in server.1=localhost:2888:3888 1. Just write 1 on the myID head.
Note: Found online a lot of people use this method to solve their own problems, but my myID file configuration is not a problem, so this also does not solve my problem
4 because the firewall is not shutting down. To turn off the firewall:
#查看防火墙状态
Service Iptables Status
#关闭防火墙
Service Iptables Stop
#查看防火墙开机启动状态
Chkconfig iptables--list
#关闭防火墙开机启动
Chkconfig iptables off
Note: I did not turn off the firewall at the beginning, but I did not resolve the issue after I closed the firewall.
5 No mapping between host and IP is established.
The command to establish a mapping relationship between the host and the IP is vim/etc/hosts the mapping between the host and IP address at the end of the file.
Note: Only after the mapping relationship has been established can the machine under the same network segment be used for file transfer with the host name. Problem Solving!
When you install zookeeper, you can see the process start, but the status shows an error: Error contacting service. It is probably not running