SocketTimeoutException:Timeout occurred, failed to read 4 bytes in 5000 milliseconds.
- Dominant language
- Java
- Stars
- 8.1k
- Forks
- 2.5k
- PR merge metrics
- No merged PRs in 30d
Description
将otter node由4.2.12升级到4.2.16遇到如下问题:
pid:265 nid:25 exception:canal:la-ms-online-portal-2:com.alibaba.otter.canal.parse.exception.CanalParseException: java.io.IOException: connect /x.x.x.x:6446 failure
Caused by: java.io.IOException: connect /x.x.x.x:6446 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:85)
at com.alibaba.otter.canal.parse.inbound.AbstractEventParser$3.run(AbstractEventParser.java:175)
at java.lang.Thread.run(Thread.java:748)
Caused by: java.net.SocketTimeoutException: Timeout occurred, failed to read 4 bytes in 5000 milliseconds.
at com.alibaba.otter.canal.parse.driver.mysql.socket.BioSocketChannel.read(BioSocketChannel.java:91)
at com.alibaba.otter.canal.parse.driver.mysql.utils.PacketManager.readHeader(PacketManager.java:18)
at com.alibaba.otter.canal.parse.driver.mysql.MysqlConnector.negotiate(MysqlConnector.java:153)
at com.alibaba.otter.canal.parse.driver.mysql.MysqlConnector.connect(MysqlConnector.java:74)
在切换回版本4.2.12 同步可以正常工作。
@agapple 请问这是什么原因导致的呢?
Contributor guide
No contributing guide indexed for this repository
Research direction
Start by comparing the 4.2.12 and 4.2.16 connection paths in MysqlConnector.java, MysqlConnection.java, MysqlEventParser.java, BioSocketChannel.java, and PacketManager.java. Reproduce the failure if possible and determine why negotiation now times out reading four bytes; done means the regression is explained and a verified fix or documented cause is available.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- java, mysql
- Domain
- databases, distributed-systems
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100