开发者社区> 问答> 正文

搭建Canal高可用报zookeeper state changed (SyncConnected)

利用Canal Server、Client、Admin搭建Canal高可用系统,依赖的zookeeper和mysql-tsdb均已配置。在测试Client端遇到问题,一台Client启动正常,第二台Client启动卡死在「zookeeper state changed (SyncConnected)」,服务器不能正常启动;将第一台Client杀掉,第二台Client恢复会继续启动。虽然说Client端高可用是standby的方式,但这不该影响程序正常启动呀,求解决方案

2022-04-26 11:02:54.728 INFO 22037 --- [-] [ZkClient-EventThread-66-172.17.248.236:2181,172.17.248.236:2182,172.17.248.236:2183] org.I0Itec.zkclient.ZkEventThread : Starting ZkClient event thread. 2022-04-26 11:02:54.733 INFO 22037 --- [-] [main] org.apache.zookeeper.ZooKeeper : Client environment:zookeeper.version=3.4.5-1392090, built on 09/30/2012 17:52 GMT 2022-04-26 11:02:54.733 INFO 22037 --- [-] [main] org.apache.zookeeper.ZooKeeper : Client environment:host.name=info-test3-bj-f 2022-04-26 11:02:54.733 INFO 22037 --- [-] [main] org.apache.zookeeper.ZooKeeper : Client environment:java.version=1.8.0_231 2022-04-26 11:02:54.733 INFO 22037 --- [-] [main] org.apache.zookeeper.ZooKeeper : Client environment:java.vendor=Oracle Corporation 2022-04-26 11:02:54.733 INFO 22037 --- [-] [main] org.apache.zookeeper.ZooKeeper : Client environment:java.home=/usr/local/jdk1.8.0_231/jre 2022-04-26 11:02:54.733 INFO 22037 --- [-] [main] org.apache.zookeeper.ZooKeeper : Client environment:java.class.path=/opt/backup/chaos-server-0.6.0-SNAPSHOT.jar 2022-04-26 11:02:54.733 INFO 22037 --- [-] [main] org.apache.zookeeper.ZooKeeper : Client environment:java.library.path=/usr/java/packages/lib/amd64:/usr/lib64:/lib64:/lib:/usr/lib 2022-04-26 11:02:54.733 INFO 22037 --- [-] [main] org.apache.zookeeper.ZooKeeper : Client environment:java.io.tmpdir=/tmp 2022-04-26 11:02:54.733 INFO 22037 --- [-] [main] org.apache.zookeeper.ZooKeeper : Client environment:java.compiler= 2022-04-26 11:02:54.733 INFO 22037 --- [-] [main] org.apache.zookeeper.ZooKeeper : Client environment:os.name=Linux 2022-04-26 11:02:54.733 INFO 22037 --- [-] [main] org.apache.zookeeper.ZooKeeper : Client environment:os.arch=amd64 2022-04-26 11:02:54.733 INFO 22037 --- [-] [main] org.apache.zookeeper.ZooKeeper : Client environment:os.version=3.10.0-1127.18.2.el7.x86_64 2022-04-26 11:02:54.733 INFO 22037 --- [-] [main] org.apache.zookeeper.ZooKeeper : Client environment:user.name=root 2022-04-26 11:02:54.733 INFO 22037 --- [-] [main] org.apache.zookeeper.ZooKeeper : Client environment:user.home=/root 2022-04-26 11:02:54.733 INFO 22037 --- [-] [main] org.apache.zookeeper.ZooKeeper : Client environment:user.dir=/root 2022-04-26 11:02:54.736 INFO 22037 --- [-] [main] org.apache.zookeeper.ZooKeeper : Initiating client connection, connectString=172.17.248.236:2181,172.17.248.236:2182,172.17.248.236:2183 sessionTimeout=90000 watcher=com.alibaba.otter.canal.common.zookeeper.ZkClientx@2bb717d7 2022-04-26 11:02:54.757 INFO 22037 --- [-] [main] org.I0Itec.zkclient.ZkClient : Waiting for keeper state SyncConnected 2022-04-26 11:02:54.768 INFO 22037 --- [-] [main-SendThread(info-test2-bj-h:2183)] org.apache.zookeeper.ClientCnxn : Opening socket connection to server info-test2-bj-h/172.17.248.236:2183. Will not attempt to authenticate using SASL (unknown error) 2022-04-26 11:02:54.770 INFO 22037 --- [-] [main-SendThread(info-test2-bj-h:2183)] org.apache.zookeeper.ClientCnxn : Socket connection established to info-test2-bj-h/172.17.248.236:2183, initiating session 2022-04-26 11:02:54.782 INFO 22037 --- [-] [main-SendThread(info-test2-bj-h:2183)] org.apache.zookeeper.ClientCnxn : Session establishment complete on server info-test2-bj-h/172.17.248.236:2183, sessionid = 0x30c36e99e2d0001, negotiated timeout = 40000 2022-04-26 11:02:54.784 INFO 22037 --- [-] [main-EventThread] org.I0Itec.zkclient.ZkClient : zookeeper state changed (SyncConnected)

原提问者GitHub用户colddew

展开
收起
后端老大 2023-04-26 15:37:38 178 0
1 条回答
写回答
取消 提交回答
  • client是standby启动,如果你的client代码是强依赖启动顺序,可以把canal这部分拆解开

    原回答者GitHub用户agapple

    2023-04-26 18:31:00
    赞同 展开评论 打赏
问答排行榜
最热
最新

相关电子书

更多
《MSE 微服务网关》 立即下载
微服务引擎 MSE 治理中心重磅发布 立即下载
阿里云微服务引擎 MSE 2.0 线上发布 立即下载