利用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
client是standby启动,如果你的client代码是强依赖启动顺序,可以把canal这部分拆解开
原回答者GitHub用户agapple
版权声明:本文内容由阿里云实名注册用户自发贡献,版权归原作者所有,阿里云开发者社区不拥有其著作权,亦不承担相应法律责任。具体规则请查看《阿里云开发者社区用户服务协议》和《阿里云开发者社区知识产权保护指引》。如果您发现本社区中有涉嫌抄袭的内容,填写侵权投诉表单进行举报,一经查实,本社区将立刻删除涉嫌侵权内容。