chronos
chronos copied to clipboard
无法链接到zookeeper
目前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
可以帮忙看一下原因吗
Chronos uses the java client of ZooKeeper. Can you connect with the ZK server with the command-line or other clients? @wh469012917
测试过了,通过comman-client可以连接到zookeeper也可以进行任何操作; 然后还尝试使用其他语言的客户端来连接操作,也是一切正常,就是在运行Chronos的时候一直提示无法连接.
2017-12-14 13:16 GMT+08:00 tobe [email protected]:
Chronos uses the java client of ZooKeeper. Can you connect with the ZK server with the command-line or other clients? @wh469012917 https://github.com/wh469012917
— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/XiaoMi/chronos/issues/13#issuecomment-351611304, or mute the thread https://github.com/notifications/unsubscribe-auth/AKAp3j8SbqUPnzdvZ_2t9iicCEETpIyxks5tAK8egaJpZM4Q9Hyw .
我出现了和你一样的问题,一直连接不上,我用的zookeeper是3.4.4版本的,请问这个问题你是怎么解决?的?
没解决,不用这个库了
问题解决。。。编译server代码的时候 把pom.xml 文件里zookeeper的依赖 版本号从 3.4.4 -> 3.4.13
依赖版本太低了 协议对不上去。。。我使用的zookeeper server版本是3.4.4