请问在本机用源码执行CanalLauncher类,group-instance.xml方式运行正常,放在centos服务器上运行就会报以下错误,配置文件完全一样。然后服务器上用instance.properties方式运行连接正常。请问怎么修复
2018-01-25 13:35:30.225 [destination = group_mysql , address = /10.138.225.198:3306 , EventParser] ERROR c.a.otter.canal.parse.inbound.mysql.MysqlEventParser - parse events has an error com.alibaba.otter.canal.parse.exception.CanalParseException: dump address /10.138.225.198:3306 has an error, retrying. Caused by: com.alibaba.otter.canal.parse.exception.CanalParseException: java.io.IOException: connect /10.138.225.198:3306 failure Caused by: java.io.IOException: connect /10.138.225.198:3306 failure at com.alibaba.otter.canal.parse.driver.mysql.MysqlConnector.connect(MysqlConnector.java:72) ~[canal.parse.driver-1.0.25.jar:na] at com.alibaba.otter.canal.parse.inbound.mysql.MysqlConnection.connect(MysqlConnection.java:71) ~[canal.parse-1.0.25.jar:na] at com.alibaba.otter.canal.parse.inbound.mysql.MysqlEventParser.preDump(MysqlEventParser.java:88) ~[canal.parse-1.0.25.jar:na] at com.alibaba.otter.canal.parse.inbound.AbstractEventParser$3.run(AbstractEventParser.java:160) ~[canal.parse-1.0.25.jar:na] at java.lang.Thread.run(Thread.java:745) ~[na:1.8.0_102] Caused by: java.lang.InterruptedException: null at java.util.concurrent.locks.AbstractQueuedSynchronizer.acquireSharedInterruptibly(AbstractQueuedSynchronizer.java:1302) ~[na:1.8.0_102] at com.alibaba.otter.canal.common.utils.BooleanMutex$Sync.innerGet(BooleanMutex.java:123) ~[canal.common-1.0.25.jar:na] at com.alibaba.otter.canal.common.utils.BooleanMutex.get(BooleanMutex.java:53) ~[canal.common-1.0.25.jar:na] at com.alibaba.otter.canal.parse.driver.mysql.socket.SocketChannelPool.open(SocketChannelPool.java:71) ~[canal.parse.driver-1.0.25.jar:na] at com.alibaba.otter.canal.parse.driver.mysql.MysqlConnector.connect(MysqlConnector.java:67) ~[canal.parse.driver-1.0.25.jar:na] ... 4 common frames omitted
直接把源码放上去跑报的错,debug日志 2018-01-26 15:44:43.706 [destination = group_mysql , address = /10.138.225.198:3306 , EventParser] INFO c.alibaba.otter.canal.parse.driver.mysql.MysqlConnector - the channel /10.138.225.198:3306 is not connected 2018-01-26 15:44:43.708 [destination = group_mysql , address = /10.138.225.198:3306 , EventParser] ERROR c.alibaba.otter.canal.parse.driver.mysql.MysqlConnector - java.lang.InterruptedException: AbstractBootstrap$PendingRegistrationPromise@6d9c2400(incomplete) at io.netty.util.concurrent.DefaultPromise.await(DefaultPromise.java:230) at io.netty.channel.DefaultChannelPromise.await(DefaultChannelPromise.java:129) at io.netty.channel.DefaultChannelPromise.await(DefaultChannelPromise.java:28) at io.netty.util.concurrent.DefaultPromise.sync(DefaultPromise.java:340) at io.netty.channel.DefaultChannelPromise.sync(DefaultChannelPromise.java:117) at io.netty.channel.DefaultChannelPromise.sync(DefaultChannelPromise.java:28) at com.alibaba.otter.canal.parse.driver.mysql.socket.SocketChannelPool.open(SocketChannelPool.java:60) at com.alibaba.otter.canal.parse.driver.mysql.MysqlConnector.connect(MysqlConnector.java:70) at com.alibaba.otter.canal.parse.inbound.mysql.MysqlConnection.connect(MysqlConnection.java:74) at com.alibaba.otter.canal.parse.inbound.mysql.MysqlEventParser.preDump(MysqlEventParser.java:87) at com.alibaba.otter.canal.parse.inbound.AbstractEventParser$3.run(AbstractEventParser.java:160) at java.lang.Thread.run(Thread.java:745)
2018-01-26 15:44:43.710 [destination = group_mysql , address = /10.138.225.198:3306 , EventParser] INFO c.alibaba.otter.canal.parse.driver.mysql.MysqlConnector - the channel /10.138.225.198:3306 is not connected 2018-01-26 15:44:43.710 [destination = group_mysql , address = /10.138.225.198:3306 , EventParser] INFO c.alibaba.otter.canal.parse.driver.mysql.MysqlConnector - the channel /10.138.225.198:3306 is not connected 2018-01-26 15:44:43.713 [destination = group_mysql , address = /10.138.225.198:3306 , EventParser] ERROR c.a.otter.canal.parse.inbound.mysql.MysqlEventParser - parse events has an error com.alibaba.otter.canal.parse.exception.CanalParseException: dump address /10.138.225.198:3306 has an error, retrying. Caused by: com.alibaba.otter.canal.parse.exception.CanalParseException: java.io.IOException: connect /10.138.225.198:3306 failure Caused by: java.io.IOException: connect /10.138.225.198:3306 failure at com.alibaba.otter.canal.parse.driver.mysql.MysqlConnector.connect(MysqlConnector.java:76) ~[class/:na] at com.alibaba.otter.canal.parse.inbound.mysql.MysqlConnection.connect(MysqlConnection.java:74) ~[class/:na] at com.alibaba.otter.canal.parse.inbound.mysql.MysqlEventParser.preDump(MysqlEventParser.java:87) ~[class/:na] at com.alibaba.otter.canal.parse.inbound.AbstractEventParser$3.run(AbstractEventParser.java:160) ~[class/:na] at java.lang.Thread.run(Thread.java:745) ~[na:1.8.0_102] Caused by: java.lang.InterruptedException: AbstractBootstrap$PendingRegistrationPromise@6d9c2400(incomplete) at io.netty.util.concurrent.DefaultPromise.await(DefaultPromise.java:230) ~[netty-all-4.1.6.Final.jar:4.1.6.Final] at io.netty.channel.DefaultChannelPromise.await(DefaultChannelPromise.java:129) ~[netty-all-4.1.6.Final.jar:4.1.6.Final] at io.netty.channel.DefaultChannelPromise.await(DefaultChannelPromise.java:28) ~[netty-all-4.1.6.Final.jar:4.1.6.Final] at io.netty.util.concurrent.DefaultPromise.sync(DefaultPromise.java:340) ~[netty-all-4.1.6.Final.jar:4.1.6.Final] at io.netty.channel.DefaultChannelPromise.sync(DefaultChannelPromise.java:117) ~[netty-all-4.1.6.Final.jar:4.1.6.Final] at io.netty.channel.DefaultChannelPromise.sync(DefaultChannelPromise.java:28) ~[netty-all-4.1.6.Final.jar:4.1.6.Final] at com.alibaba.otter.canal.parse.driver.mysql.socket.SocketChannelPool.open(SocketChannelPool.java:60) ~[class/:na] at com.alibaba.otter.canal.parse.driver.mysql.MysqlConnector.connect(MysqlConnector.java:70) ~[class/:na] ... 4 common frames omitted 2018-01-26 15:44:43.713 [canal-instance-scan-0] INFO c.alibaba.otter.canal.parse.driver.mysql.MysqlConnector - disConnect MysqlConnection to /10.138.225.197:3306... 2018-01-26 15:44:43.713 [canal-instance-scan-0] INFO c.alibaba.otter.canal.parse.driver.mysql.MysqlConnector - the channel /10.138.225.197:3306 is not connected 2018-01-26 15:44:43.713 [destination = group_mysql , address = /10.138.225.197:3306 , EventParser] INFO c.alibaba.otter.canal.parse.driver.mysql.MysqlConnector - the channel /10.138.225.197:3306 is not connected 2018-01-26 15:44:43.713 [destination = group_mysql , address = /10.138.225.197:3306 , EventParser] ERROR c.alibaba.otter.canal.parse.driver.mysql.MysqlConnector - java.lang.InterruptedException at java.util.concurrent.locks.AbstractQueuedSynchronizer.doAcquireSharedInterruptibly(AbstractQueuedSynchronizer.java:998) at java.util.concurrent.locks.AbstractQueuedSynchronizer.acquireSharedInterruptibly(AbstractQueuedSynchronizer.java:1304) at java.util.concurrent.CountDownLatch.await(CountDownLatch.java:231) at com.alibaba.otter.canal.parse.driver.mysql.socket.SocketChannelPool.open(SocketChannelPool.java:63) at com.alibaba.otter.canal.parse.driver.mysql.MysqlConnector.connect(MysqlConnector.java:70) at com.alibaba.otter.canal.parse.inbound.mysql.MysqlConnection.connect(MysqlConnection.java:74) at com.alibaba.otter.canal.parse.inbound.mysql.MysqlEventParser.preDump(MysqlEventParser.java:87) at com.alibaba.otter.canal.parse.inbound.AbstractEventParser$3.run(AbstractEventParser.java:160) at java.lang.Thread.run(Thread.java:745)
原提问者GitHub用户undeadwing
找到了,启动参数里的-DappName=otter-canal去掉就好了。。。奇怪为啥这个参数会有影响
原回答者GitHub用户undeadwing
版权声明:本文内容由阿里云实名注册用户自发贡献,版权归原作者所有,阿里云开发者社区不拥有其著作权,亦不承担相应法律责任。具体规则请查看《阿里云开发者社区用户服务协议》和《阿里云开发者社区知识产权保护指引》。如果您发现本社区中有涉嫌抄袭的内容,填写侵权投诉表单进行举报,一经查实,本社区将立刻删除涉嫌侵权内容。