开发者社区> 问答> 正文

canal连接两个数据库,本地数据库连接超时

2018-11-06 20:41:11.697 [destination = local , address = /172.0.0.1:3306 , EventParser] ERROR c.a.o.c.p.inbound.mysql.rds.RdsBinlogEventParserProxy - dump address /172.0.0.1:3306 has an error, retrying. caused by com.alibaba.otter.canal.parse.exception.CanalParseException: java.io.IOException: connect /172.0.0.1:3306 failure Caused by: java.io.IOException: connect /172.0.0.1:3306 failure at com.alibaba.otter.canal.parse.driver.mysql.MysqlConnector.connect(MysqlConnector.java:77) ~[canal.parse.driver-1.1.1-SNAPSHOT.jar:na] at com.alibaba.otter.canal.parse.inbound.mysql.MysqlConnection.connect(MysqlConnection.java:86) ~[canal.parse-1.1.1-SNAPSHOT.jar:na] at com.alibaba.otter.canal.parse.inbound.mysql.MysqlEventParser.preDump(MysqlEventParser.java:89) ~[canal.parse-1.1.1-SNAPSHOT.jar:na] at com.alibaba.otter.canal.parse.inbound.AbstractEventParser$3.run(AbstractEventParser.java:175) ~[canal.parse-1.1.1-SNAPSHOT.jar:na] at java.lang.Thread.run(Unknown Source) [na:1.8.0_171] Caused by: java.net.SocketTimeoutException: connect timed out at java.net.TwoStacksPlainSocketImpl.socketConnect(Native Method) ~[na:1.8.0_171] at java.net.AbstractPlainSocketImpl.doConnect(Unknown Source) ~[na:1.8.0_171] at java.net.AbstractPlainSocketImpl.connectToAddress(Unknown Source) ~[na:1.8.0_171] at java.net.AbstractPlainSocketImpl.connect(Unknown Source) ~[na:1.8.0_171] at java.net.PlainSocketImpl.connect(Unknown Source) ~[na:1.8.0_171] at java.net.SocksSocketImpl.connect(Unknown Source) ~[na:1.8.0_171] at java.net.Socket.connect(Unknown Source) ~[na:1.8.0_171] at com.alibaba.otter.canal.parse.driver.mysql.socket.BioSocketChannelPool.open(BioSocketChannelPool.java:18) ~[canal.parse.driver-1.1.1-SNAPSHOT.jar:na] at com.alibaba.otter.canal.parse.driver.mysql.socket.SocketChannelPool.open(SocketChannelPool.java:18) ~[canal.parse.driver-1.1.1-SNAPSHOT.jar:na] at com.alibaba.otter.canal.parse.driver.mysql.MysqlConnector.connect(MysqlConnector.java:72) ~[canal.parse.driver-1.1.1-SNAPSHOT.jar:na] ... 4 common frames omitted 2018-11-06 20:41:11.699 [destination = local , address = /172.0.0.1:3306 , EventParser] ERROR com.alibaba.otter.canal.common.alarm.LogAlarmHandler - destination:local[com.alibaba.otter.canal.parse.exception.CanalParseException: java.io.IOException: connect /172.0.0.1:3306 failure Caused by: java.io.IOException: connect /172.0.0.1:3306 failure at com.alibaba.otter.canal.parse.driver.mysql.MysqlConnector.connect(MysqlConnector.java:77) at com.alibaba.otter.canal.parse.inbound.mysql.MysqlConnection.connect(MysqlConnection.java:86) at com.alibaba.otter.canal.parse.inbound.mysql.MysqlEventParser.preDump(MysqlEventParser.java:89) at com.alibaba.otter.canal.parse.inbound.AbstractEventParser$3.run(AbstractEventParser.java:175) at java.lang.Thread.run(Unknown Source) Caused by: java.net.SocketTimeoutException: connect timed out at java.net.TwoStacksPlainSocketImpl.socketConnect(Native Method) at java.net.AbstractPlainSocketImpl.doConnect(Unknown Source) at java.net.AbstractPlainSocketImpl.connectToAddress(Unknown Source) at java.net.AbstractPlainSocketImpl.connect(Unknown Source) at java.net.PlainSocketImpl.connect(Unknown Source) at java.net.SocksSocketImpl.connect(Unknown Source) at java.net.Socket.connect(Unknown Source) at com.alibaba.otter.canal.parse.driver.mysql.socket.BioSocketChannelPool.open(BioSocketChannelPool.java:18) at com.alibaba.otter.canal.parse.driver.mysql.socket.SocketChannelPool.open(SocketChannelPool.java:18) at com.alibaba.otter.canal.parse.driver.mysql.MysqlConnector.connect(MysqlConnector.java:72) ... 4 more ]

配置都是同样的,远程能用,但是本地数据库的canal日志每隔几分钟就会报这个错

期间没有操作过数据库,日志一直在增加,全是连接超时

原提问者GitHub用户XingLifeng

展开
收起
Java工程师 2023-05-08 17:52:05 160 0
1 条回答
写回答
取消 提交回答
  • Caused by: java.net.SocketTimeoutException: connect timed out

    原回答者GitHub用户agapple

    2023-05-09 18:45:11
    赞同 展开评论 打赏
问答排行榜
最热
最新

相关电子书

更多
DTCC 2022大会集锦《云原生一站式数据库技术与实践》 立即下载
阿里云瑶池数据库精要2022版 立即下载
2022 DTCC-阿里云一站式数据库上云最佳实践 立即下载