alibaba/canal · error · CanalClientException

stop connect error

Error message

stop connect error

What it means

Error "stop connect error" thrown in alibaba/canal.

Source

Thrown at client/src/main/java/com/alibaba/otter/canal/client/rabbitmq/RabbitMQCanalConnector.java:93

        factory.setHost(nameServer);
        factory.setAutomaticRecoveryEnabled(true);
        factory.setNetworkRecoveryInterval(5000);
        factory.setVirtualHost(vhost);
        try {
            connect = factory.newConnection();
            channel = connect.createChannel();
        } catch (IOException | TimeoutException e) {
            throw new CanalClientException("Start RabbitMQ producer error", e);
        }
    }

    @Override
    public void disconnect() throws CanalClientException {
        if (connect != null) {
            try {
                connect.close();
            } catch (IOException e) {
                throw new CanalClientException("stop connect error", e);
            }
        }
        if (channel != null) {
            try {
                channel.close();
            } catch (IOException | TimeoutException e) {
                throw new CanalClientException("stop channel error", e);
            }
        }
    }

    @Override
    public boolean checkValid() throws CanalClientException {
        return true; // 永远true
    }

    /**
     * RabbitMQ支持拉取 不需要订阅

View on GitHub (pinned to 87be50e876)

Solutions

  1. Check that the RabbitMQ connection is still open before stopping; ignore this error during shutdown if the broker already closed it.
  2. Inspect broker logs for connection drop reasons (heartbeat timeout, forced close).

When it happens

Trigger: Thrown at client/src/main/java/com/alibaba/otter/canal/client/rabbitmq/RabbitMQCanalConnector.java:93 when the library encounters an invalid state.

Common situations: Error closing RabbitMQ connection. Log and continue shutdown; never let a close failure mask the original stop path or leak the channel.


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