zookeeper啟動成功,但查看資訊失敗

當啟動成功,查看資訊失敗時可用一下命令,來查找哪里出現了問題:
./zkServer.sh start-foreground #啟動zookeeper并查看日志
1.如果提示
binding to port 0.0.0.0/0.0.0.0:2181
ERROR [main:QuorumPeerMain@89] - Unexpected exception, exiting abnormally java.net.BindException: Address already in use
說明2181埠被占用,通過netstat -nltp | grep 2181檢查是否已被占用,如果有則把對應的行程kill掉(kill 行程的pid),然后再啟動zookeeper
2、如果提示出現java.net.ConnectException: Connection refused (Connection refused)
說明你在弄vi /etc/hosts 時對應的ip地址出錯了
3、可能沒關閉防火墻
#強制關閉防火墻
chkconfig iptables off
4.出現以下情況

洗掉 /export/data/zookeeper/zkdata/version-2 下的 所有檔案,重新啟動
轉載請註明出處,本文鏈接:https://www.uj5u.com/qita/335490.html
標籤:其他
