alibaba/canal · warning · CanalParseException

dump address %s has an error, retrying.

Error message

dump address %s has an error, retrying. 

What it means

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.

Source

Thrown at parse/src/main/java/com/alibaba/otter/canal/parse/inbound/AbstractEventParser.java:289

                                    erosaConnection.dump(startPosition.getJournalName(),
                                        startPosition.getPosition(),
                                        sinkHandler);
                                }
                            }
                        }
                    } catch (TableIdNotFoundException e) {
                        exception = e;
                        // 特殊处理TableIdNotFound异常,出现这样的异常,一种可能就是起始的position是一个事务当中,导致tablemap
                        // Event时间没解析过
                        needTransactionPosition.compareAndSet(false, true);
                        logger.error(String.format("dump address %s has an error, retrying. caused by ",
                            runningInfo.getAddress().toString()), e);
                    } catch (Throwable e) {
                        processDumpError(e);
                        exception = e;
                        if (!running) {
                            if (!(e instanceof java.nio.channels.ClosedByInterruptException || e.getCause() instanceof java.nio.channels.ClosedByInterruptException)) {
                                throw new CanalParseException(String.format("dump address %s has an error, retrying. ",
                                    runningInfo.getAddress().toString()), e);
                            }
                        } else {
                            logger.error(String.format("dump address %s has an error, retrying. caused by ",
                                runningInfo.getAddress().toString()), e);
                            sendAlarm(destination, ExceptionUtils.getFullStackTrace(e));
                        }
                        if (parserExceptionHandler != null) {
                            parserExceptionHandler.handle(e);
                        }
                    } finally {
                        // 重新置为中断状态
                        Thread.interrupted();
                        // 关闭一下链接
                        afterDump(erosaConnection);
                        try {
                            if (erosaConnection != null) {
                                erosaConnection.disconnect();

View on GitHub (pinned to 87be50e876)

Solutions

  1. Treat as expected during shutdown if the cause is connection-closed/reset; verify a clean restart picks a valid position.
  2. 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.
  3. Ensure graceful stop order (stop heartbeats/sink before disconnect) to reduce ClosedByInterrupt noise.
  4. Inspect the attached cause and the 'caused by' log line for the specific failure before changing config.
Defensive patterns

Strategy: try-catch

Try / catch

// uncaught-exception handler on the parse thread
if (parserExceptionHandler != null) parserExceptionHandler.handle(e); // already invoked in source
// otherwise wrap start() and treat dump errors during stop as warnings

Prevention

When it happens

Trigger: 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.

Common situations: 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.

Related errors


AI-assisted analysis of alibaba/canal@87be50e876 (2026-08-14). Data as JSON: /api/errors/86c3aafd5c08329b. Report an issue: GitHub.