{"record":{"id":"86c3aafd5c08329b","repo":"alibaba/canal","slug":"dump-address-s-has-an-error-retrying","errorCode":null,"errorMessage":"dump address %s has an error, retrying. ","messagePattern":"dump address (.+?) has an error, retrying\\. ","errorType":"exception","errorClass":"CanalParseException","httpStatus":null,"severity":"warning","filePath":"parse/src/main/java/com/alibaba/otter/canal/parse/inbound/AbstractEventParser.java","lineNumber":289,"sourceCode":"                                    erosaConnection.dump(startPosition.getJournalName(),\r\n                                        startPosition.getPosition(),\r\n                                        sinkHandler);\r\n                                }\r\n                            }\r\n                        }\r\n                    } catch (TableIdNotFoundException e) {\r\n                        exception = e;\r\n                        // 特殊处理TableIdNotFound异常,出现这样的异常，一种可能就是起始的position是一个事务当中，导致tablemap\r\n                        // Event时间没解析过\r\n                        needTransactionPosition.compareAndSet(false, true);\r\n                        logger.error(String.format(\"dump address %s has an error, retrying. caused by \",\r\n                            runningInfo.getAddress().toString()), e);\r\n                    } catch (Throwable e) {\r\n                        processDumpError(e);\r\n                        exception = e;\r\n                        if (!running) {\r\n                            if (!(e instanceof java.nio.channels.ClosedByInterruptException || e.getCause() instanceof java.nio.channels.ClosedByInterruptException)) {\r\n                                throw new CanalParseException(String.format(\"dump address %s has an error, retrying. \",\r\n                                    runningInfo.getAddress().toString()), e);\r\n                            }\r\n                        } else {\r\n                            logger.error(String.format(\"dump address %s has an error, retrying. caused by \",\r\n                                runningInfo.getAddress().toString()), e);\r\n                            sendAlarm(destination, ExceptionUtils.getFullStackTrace(e));\r\n                        }\r\n                        if (parserExceptionHandler != null) {\r\n                            parserExceptionHandler.handle(e);\r\n                        }\r\n                    } finally {\r\n                        // 重新置为中断状态\r\n                        Thread.interrupted();\r\n                        // 关闭一下链接\r\n                        afterDump(erosaConnection);\r\n                        try {\r\n                            if (erosaConnection != null) {\r\n                                erosaConnection.disconnect();\r","sourceCodeStart":271,"sourceCodeEnd":307,"githubUrl":"https://github.com/alibaba/canal/blob/87be50e87686a3e8af08c368d0e1ffd1f59eb04a/parse/src/main/java/com/alibaba/otter/canal/parse/inbound/AbstractEventParser.java#L271-L307","documentation":"Thrown as CanalParseException (only when !running) when an unexpected Throwable other than TableIdNotFoundException occurs during erosaConnection.dump and the parser is shutting down. While running, the same condition is logged and retried instead of thrown. The thrown variant therefore indicates the dump failed during a stop/shutdown, rethrown (unless it was a ClosedByInterruptException) so the shutdown error is visible.","triggerScenarios":"Inside the dump loop's catch(Throwable): processDumpError runs, exception is captured, and if running==false and the error is not a ClosedByInterruptException, this CanalParseException is thrown with the runningInfo address and the original cause. While running it logs + sends an alarm + retries after a sleep.","commonSituations":"Parser is being stopped and the active binlog dump hits a network reset, MySQL killed the connection, or a decode error; because the parser is mid-shutdown the error is thrown rather than retried. Also when the master is unreachable at stop time.","solutions":["Treat as expected during shutdown if the cause is connection-closed/reset; verify a clean restart picks a valid position.","If it happens repeatedly while running (logged variant), fix the underlying cause: network stability to MySQL, max_allowed_packet, binlog checksum, or MySQL version compatibility.","Ensure graceful stop order (stop heartbeats/sink before disconnect) to reduce ClosedByInterrupt noise.","Inspect the attached cause and the 'caused by' log line for the specific failure before changing config."],"exampleFix":null,"handlingStrategy":"try-catch","validationCode":null,"typeGuard":null,"tryCatchPattern":"// uncaught-exception handler on the parse thread\nif (parserExceptionHandler != null) parserExceptionHandler.handle(e); // already invoked in source\n// otherwise wrap start() and treat dump errors during stop as warnings","preventionTips":["Stabilize the MySQL link (network, max_allowed_packet, idle timeouts).","Distinguish shutdown-time dump errors (expected) from running-time (fix root cause).","Always inspect the 'caused by' line before changing config."],"tags":["parse","binlog-dump","shutdown","retry","mysql-connection"],"backgroundTag":null,"analyzedSha":"87be50e87686a3e8af08c368d0e1ffd1f59eb04a","analyzedAt":"2026-08-14T04:30:11.918Z","schemaVersion":2},"datasetVersion":"2026-08-14T05:17:29.042Z"}