zookeeper Error contacting service. It is probably not running
生活随笔
收集整理的這篇文章主要介紹了
zookeeper Error contacting service. It is probably not running
小編覺得挺不錯的,現(xiàn)在分享給大家,幫大家做個參考.
通過命令zkServer.sh start之后,顯示STARTED
通過client測試報錯? 無法連接?連接關閉
Connecting to localhost:2181 2020-03-29 12:44:31,855 [myid:] - INFO [main:Environment@100] - Client environment:zookeeper.version=3.4.13-2d71af4dbe22557fda74f9a9b4309b15a7487f03, built on 06/29/2018 04:05 GMT 2020-03-29 12:44:31,857 [myid:] - INFO [main:Environment@100] - Client environment:host.name=backup01 2020-03-29 12:44:31,857 [myid:] - INFO [main:Environment@100] - Client environment:java.version=1.8.0_172 2020-03-29 12:44:31,858 [myid:] - INFO [main:Environment@100] - Client environment:java.vendor=Oracle Corporation 2020-03-29 12:44:31,858 [myid:] - INFO [main:Environment@100] - Client environment:java.home=/usr/local/java/jdk1.8.0_172/jre 2020-03-29 12:44:31,858 [myid:] - INFO [main:Environment@100] - Client environment:java.class.path=/usr/local/hadoop/zookeeper/zookeeper-3.4.13/bin/../build/classes:/usr/local/hadoop/zookeeper/zookeeper-3.4.13/bin/../build/lib/*.jar:/usr/local/hadoop/zookeeper/zookeeper-3.4.13/bin/../lib/slf4j-log4j12-1.7.25.jar:/usr/local/hadoop/zookeeper/zookeeper-3.4.13/bin/../lib/slf4j-api-1.7.25.jar:/usr/local/hadoop/zookeeper/zookeeper-3.4.13/bin/../lib/netty-3.10.6.Final.jar:/usr/local/hadoop/zookeeper/zookeeper-3.4.13/bin/../lib/log4j-1.2.17.jar:/usr/local/hadoop/zookeeper/zookeeper-3.4.13/bin/../lib/jline-0.9.94.jar:/usr/local/hadoop/zookeeper/zookeeper-3.4.13/bin/../lib/audience-annotations-0.5.0.jar:/usr/local/hadoop/zookeeper/zookeeper-3.4.13/bin/../zookeeper-3.4.13.jar:/usr/local/hadoop/zookeeper/zookeeper-3.4.13/bin/../src/java/lib/*.jar:/usr/local/hadoop/zookeeper/zookeeper-3.4.13/bin/../conf: 2020-03-29 12:44:31,858 [myid:] - INFO [main:Environment@100] - Client environment:java.library.path=/usr/java/packages/lib/amd64:/usr/lib64:/lib64:/lib:/usr/lib 2020-03-29 12:44:31,858 [myid:] - INFO [main:Environment@100] - Client environment:java.io.tmpdir=/tmp 2020-03-29 12:44:31,858 [myid:] - INFO [main:Environment@100] - Client environment:java.compiler=<NA> 2020-03-29 12:44:31,858 [myid:] - INFO [main:Environment@100] - Client environment:os.name=Linux 2020-03-29 12:44:31,858 [myid:] - INFO [main:Environment@100] - Client environment:os.arch=amd64 2020-03-29 12:44:31,866 [myid:] - INFO [main:Environment@100] - Client environment:os.version=3.10.0-862.el7.x86_64 2020-03-29 12:44:31,866 [myid:] - INFO [main:Environment@100] - Client environment:user.name=root 2020-03-29 12:44:31,866 [myid:] - INFO [main:Environment@100] - Client environment:user.home=/root 2020-03-29 12:44:31,866 [myid:] - INFO [main:Environment@100] - Client environment:user.dir=/usr/local/hadoop/zookeeper/zookeeper-3.4.13 2020-03-29 12:44:31,867 [myid:] - INFO [main:ZooKeeper@442] - Initiating client connection, connectString=localhost:2181 sessionTimeout=30000 watcher=org.apache.zookeeper.ZooKeeperMain$MyWatcher@277050dc 2020-03-29 12:44:31,885 [myid:] - INFO [main-SendThread(localhost:2181):ClientCnxn$SendThread@1029] - Opening socket connection to server localhost/0:0:0:0:0:0:0:1:2181. Will not attempt to authenticate using SASL (unknown error) Welcome to ZooKeeper! JLine support is enabled 2020-03-29 12:44:31,997 [myid:] - INFO [main-SendThread(localhost:2181):ClientCnxn$SendThread@879] - Socket connection established to localhost/0:0:0:0:0:0:0:1:2181, initiating session 2020-03-29 12:44:32,019 [myid:] - INFO [main-SendThread(localhost:2181):ClientCnxn$SendThread@1162] - Unable to read additional data from server sessionid 0x0, likely server has closed socket, closing socket connection and attempting reconnect [zk: localhost:2181(CONNECTING) 0] 2020-03-29 12:44:33,522 [myid:] - INFO [main-SendThread(localhost:2181):ClientCnxn$SendThread@1029] - Opening socket connection to server localhost/127.0.0.1:2181. Will not attempt to authenticate using SASL (unknown error) 2020-03-29 12:44:33,525 [myid:] - INFO [main-SendThread(localhost:2181):ClientCnxn$SendThread@879] - Socket connection established to localhost/127.0.0.1:2181, initiating session 2020-03-29 12:44:33,530 [myid:] - INFO [main-SendThread(localhost:2181):ClientCnxn$SendThread@1162] - Unable to read additional data from server sessionid 0x0, likely server has closed socket, closing socket connection and attempting reconnect 2020-03-29 12:44:35,480 [myid:] - INFO [main-SendThread(localhost:2181):ClientCnxn$SendThread@1029] - Opening socket connection to server localhost/0:0:0:0:0:0:0:1:2181. Will not attempt to authenticate using SASL (unknown error) 2020-03-29 12:44:35,481 [myid:] - INFO [main-SendThread(localhost:2181):ClientCnxn$SendThread@879] - Socket connection established to localhost/0:0:0:0:0:0:0:1:2181, initiating session 2020-03-29 12:44:35,485 [myid:] - INFO [main-SendThread(localhost:2181):ClientCnxn$SendThread@1162] - Unable to read additional data from server sessionid 0x0, likely server has closed socket, closing socket connection and attempting reconnect 2020-03-29 12:44:37,542 [myid:] - INFO [main-SendThread(localhost:2181):ClientCnxn$SendThread@1029] - Opening socket connection to server localhost/0:0:0:0:0:0:0:1:2181. Will not attempt to authenticate using SASL (unknown error) 2020-03-29 12:44:37,542 [myid:] - INFO [main-SendThread(localhost:2181):ClientCnxn$SendThread@879] - Socket connection established to localhost/0:0:0:0:0:0:0:1:2181, initiating session 2020-03-29 12:44:37,544 [myid:] - INFO [main-SendThread(localhost:2181):ClientCnxn$SendThread@1162] - Unable to read additional data from server sessionid 0x0, likely server has closed socket, closing socket connection and attempting reconnect 2020-03-29 12:44:38,754 [myid:] - INFO [main-SendThread(localhost:2181):ClientCnxn$SendThread@1029] - Opening socket connection to server localhost/0:0:0:0:0:0:0:1:2181. Will not attempt to authenticate using SASL (unknown error) 2020-03-29 12:44:38,754 [myid:] - INFO [main-SendThread(localhost:2181):ClientCnxn$SendThread@879] - Socket connection established to localhost/0:0:0:0:0:0:0:1:2181, initiating session 2020-03-29 12:44:38,756 [myid:] - INFO [main-SendThread(localhost:2181):ClientCnxn$SendThread@1162] - Unable to read additional data from server sessionid 0x0, likely server has closed socket, closing socket connection and attempting reconnect 2020-03-29 12:44:40,281 [myid:] - INFO [main-SendThread(localhost:2181):ClientCnxn$SendThread@1029] - Opening socket connection to server localhost/127.0.0.1:2181. Will not attempt to authenticate using SASL (unknown error) 2020-03-29 12:44:40,281 [myid:] - INFO [main-SendThread(localhost:2181):ClientCnxn$SendThread@879] - Socket connection established to localhost/127.0.0.1:2181, initiating session 2020-03-29 12:44:40,283 [myid:] - INFO [main-SendThread(localhost:2181):ClientCnxn$SendThread@1162] - Unable to read additional data from server sessionid 0x0, likely server has closed socket, closing socket connection and attempting reconnect 2020-03-29 12:44:41,886 [myid:] - INFO [main-SendThread(localhost:2181):ClientCnxn$SendThread@1029] - Opening socket connection to server localhost/0:0:0:0:0:0:0:1:2181. Will not attempt to authenticate using SASL (unknown error) 2020-03-29 12:44:41,887 [myid:] - INFO [main-SendThread(localhost:2181):ClientCnxn$SendThread@879] - Socket connection established to localhost/0:0:0:0:0:0:0:1:2181, initiating session 2020-03-29 12:44:41,890 [myid:] - INFO [main-SendThread(localhost:2181):ClientCnxn$SendThread@1162] - Unable to read additional data from server sessionid 0x0, likely server has closed socket, closing socket connection and attempting reconnect 2020-03-29 12:44:43,559 [myid:] - INFO [main-SendThread(localhost:2181):ClientCnxn$SendThread@1029] - Opening socket connection to server localhost/127.0.0.1:2181. Will not attempt to authenticate using SASL (unknown error) 2020-03-29 12:44:43,560 [myid:] - INFO [main-SendThread(localhost:2181):ClientCnxn$SendThread@879] - Socket connection established to localhost/127.0.0.1:2181, initiating session 2020-03-29 12:44:43,562 [myid:] - INFO [main-SendThread(localhost:2181):ClientCnxn$SendThread@1162] - Unable to read additional data from server sessionid 0x0, likely server has closed socket, closing socket connection and attempting reconnect 2020-03-29 12:44:45,106 [myid:] - INFO [main-SendThread(localhost:2181):ClientCnxn$SendThread@1029] - Opening socket connection to server localhost/127.0.0.1:2181. Will not attempt to authenticate using SASL (unknown error) 2020-03-29 12:44:45,107 [myid:] - INFO [main-SendThread(localhost:2181):ClientCnxn$SendThread@879] - Socket connection established to localhost/127.0.0.1:2181, initiating session 2020-03-29 12:44:45,109 [myid:] - INFO [main-SendThread(localhost:2181):ClientCnxn$SendThread@1162] - Unable to read additional data from server sessionid 0x0, likely server has closed socket, closing socket connection and attempting reconnect 2020-03-29 12:44:47,098 [myid:] - INFO [main-SendThread(localhost:2181):ClientCnxn$SendThread@1029] - Opening socket connection to server localhost/0:0:0:0:0:0:0:1:2181. Will not attempt to authenticate using SASL (unknown error) 2020-03-29 12:44:47,098 [myid:] - INFO [main-SendThread(localhost:2181):ClientCnxn$SendThread@879] - Socket connection established to localhost/0:0:0:0:0:0:0:1:2181, initiating session我就很納悶明明已經(jīng)啟動為啥查看狀態(tài)報這個錯呢
Error contacting service. It is probably not running
問題分析
我們可以通過bin目錄下面的zookeeper.out來查看問題原因
為啥連接被拒絕
其實這個本身沒有問題,因為這是集群的,要全部啟動起來才能選舉leader?follower?observer? 因為還有兩臺沒有啟動?所以不能進行通信選舉,我們只需要將另外兩臺啟動起來就可以了
這個其實沒有問題的,我以前的文章也寫過,只是時間久了忘記了
這個以前集群安裝啟動的文章分布式Zookeeper安裝搭建詳解_ywl470812087的博客-CSDN博客
里面有個細節(jié)在第七步驟中?每臺機器上分別啟動,哎到這里我覺得自己太粗心大意,不知道各位有沒有這樣的情況,不知道這篇文章能不能幫到你
總結
以上是生活随笔為你收集整理的zookeeper Error contacting service. It is probably not running的全部內(nèi)容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: 2017-9-17pat甲级 B
- 下一篇: 2017-9-17pat甲级 C