我使用了server-V1.0.22最新版、client-V1.0.21 仓库取的依赖jar出现了莫名的超时问题,我的zookeeper其他应用支持的很好zkServer=cdh3:2181,cdh1:2181,cdh5:2181 。
使用zookeeper调度出现超时现象,clinet一直联不通, 用Simple方式就没有问题,超时抛的错误如下。
[2016-03-24 19:58:27] ERROR [ZkClient-EventThread-13-cdh3:2181,cdh1:2181,cdh5:2181] ZkEventThread - Error handling event ZkEvent[Data of /otter/canal/destinations/user/1001/running changed sent to com.alibaba.otter.canal.client.impl.running.ClientRunningMonitor$1@45681b65] com.alibaba.otter.canal.protocol.exception.CanalClientException: java.net.ConnectException: Operation timed out at com.alibaba.otter.canal.client.impl.SimpleCanalConnector.doConnect(SimpleCanalConnector.java:167) at com.alibaba.otter.canal.client.impl.SimpleCanalConnector.access$000(SimpleCanalConnector.java:48) at com.alibaba.otter.canal.client.impl.SimpleCanalConnector$1.processActiveEnter(SimpleCanalConnector.java:392) at com.alibaba.otter.canal.client.impl.running.ClientRunningMonitor.processActiveEnter(ClientRunningMonitor.java:188) at com.alibaba.otter.canal.client.impl.running.ClientRunningMonitor.initRunning(ClientRunningMonitor.java:110) at com.alibaba.otter.canal.client.impl.running.ClientRunningMonitor$1.handleDataDeleted(ClientRunningMonitor.java:67) at org.I0Itec.zkclient.ZkClient$6.run(ZkClient.java:549) at org.I0Itec.zkclient.ZkEventThread.run(ZkEventThread.java:71) Caused by: java.net.ConnectException: Operation timed out at sun.nio.ch.Net.connect0(Native Method) at sun.nio.ch.Net.connect(Net.java:458) at sun.nio.ch.Net.connect(Net.java:450) at sun.nio.ch.SocketChannelImpl.connect(SocketChannelImpl.java:648) at com.alibaba.otter.canal.client.impl.SimpleCanalConnector.doConnect(SimpleCanalConnector.java:128) ... 7 more
debug到BooleanMutex这个类,这个get没法同步导致超时的,具体原因没有找到:
public void get() throws InterruptedException { this.sync.innerGet(); }
后来把server换成V1.0.21还是不行。 是不是在zk里保留了版本不兼容的信息。 是21client不能配合22的server吗? 谢谢。
这个错误怎么解读? ERROR ZkEventThread - Error handling event ZkEvent[Data of /otter/canal/destinations/user/1001/running changed sent to com.alibaba.otter.canal.client.impl.running.ClientRunningMonitor$1@5789b4d3]
zk Node [/otter/canal/destinations/user/1001/running ] 是: {"active":true,"address":"10.1.193.0","clientId":1001}
原提问者GitHub用户lvguanming
1、java.net.ConnectException: Operation timed out at ,是连不上server或者链接超时
2、Error handling event 异常是因为timeout引起的,先解决1的问题
原回答者GitHub用户agapple
版权声明:本文内容由阿里云实名注册用户自发贡献,版权归原作者所有,阿里云开发者社区不拥有其著作权,亦不承担相应法律责任。具体规则请查看《阿里云开发者社区用户服务协议》和《阿里云开发者社区知识产权保护指引》。如果您发现本社区中有涉嫌抄袭的内容,填写侵权投诉表单进行举报,一经查实,本社区将立刻删除涉嫌侵权内容。