Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

无法链接到zookeeper #13

Open
mogody opened this issue Dec 11, 2017 · 5 comments
Open

无法链接到zookeeper #13

mogody opened this issue Dec 11, 2017 · 5 comments

Comments

@mogody
Copy link

mogody commented Dec 11, 2017

目前zookeeper是以容器的方式部署,然后chronos是直接部署在宿主机上,容器通过expose端口到宿主机上。链接的时候报错如下:

2017-12-11 17:46:36,888 INFO  [main] zookeeper.ZooKeeper(433): Initiating client connection, connectString=localhost:2181 sessionTimeout=5000 watcher=com.xiaomi.infra.chronos.ChronosServerWatcher@61e4705b
2017-12-11 17:46:36,902 INFO  [main] zookeeper.ZooKeeperUtil(164): Try to create persistent znode /chronos
2017-12-11 17:46:36,904 INFO  [main-SendThread(localhost:2181)] zookeeper.ClientCnxn$SendThread(966): Opening socket connection to server localhost/127.0.0.1:2181. Will not attempt to authenticate using SASL (unknown error)
2017-12-11 17:46:36,940 INFO  [main-SendThread(localhost:2181)] zookeeper.ClientCnxn$SendThread(849): Socket connection established to localhost/127.0.0.1:2181, initiating session
2017-12-11 17:46:36,958 INFO  [main-SendThread(localhost:2181)] zookeeper.ClientCnxn$SendThread(1207): Session establishment complete on server localhost/127.0.0.1:2181, sessionid = 0x10014bf606c0000, negotiated timeout = 5000
2017-12-11 17:46:36,959 DEBUG [main-EventThread] zookeeper.FailoverWatcher(132): Received ZooKeeper Event, type=None, state=SyncConnected, path=null
2017-12-11 17:46:36,960 INFO  [main-EventThread] zookeeper.FailoverWatcher(170): 127.0.0.1_7911 sync connect from ZooKeeper
2017-12-11 17:46:40,291 INFO  [main-SendThread(localhost:2181)] zookeeper.ClientCnxn$SendThread(1083): Client session timed out, have not heard from server in 3333ms for sessionid 0x10014bf606c0000, closing socket connection and attempting reconnect
2017-12-11 17:46:40,400 DEBUG [main-EventThread] zookeeper.FailoverWatcher(132): Received ZooKeeper Event, type=None, state=Disconnected, path=null
2017-12-11 17:46:40,400 WARN  [main-EventThread] zookeeper.FailoverWatcher(179): 127.0.0.1_7911 received disconnected from ZooKeeper
2017-12-11 17:46:40,401 WARN  [main-EventThread] chronos.ChronosServerWatcher(155): 127.0.0.1_7911 disconnected from ZooKeeper, wait to sync and try to become active master
2017-12-11 17:46:40,408 FATAL [main] chronos.ChronosServerWatcher(61): Error to create znode of chronos, exit immediately

可以帮忙看一下原因吗

@tobegit3hub
Copy link
Contributor

Chronos uses the java client of ZooKeeper. Can you connect with the ZK server with the command-line or other clients? @wh469012917

@mogody
Copy link
Author

mogody commented Dec 14, 2017 via email

@yp963
Copy link

yp963 commented Jun 2, 2018

我出现了和你一样的问题,一直连接不上,我用的zookeeper是3.4.4版本的,请问这个问题你是怎么解决?的?

@mogody
Copy link
Author

mogody commented Jun 3, 2018

没解决,不用这个库了

@ice-ice
Copy link

ice-ice commented Nov 8, 2018

问题解决。。。编译server代码的时候 把pom.xml 文件里zookeeper的依赖 版本号从 3.4.4 -> 3.4.13

依赖版本太低了 协议对不上去。。。我使用的zookeeper server版本是3.4.4

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants