apache/seatunnel · error · ConnectException

Interrupted while waiting for valid replication slot info

Error message

Interrupted while waiting for valid replication slot info

What it means

PostgresConnection.getReplicationSlotState polls for a valid replication slot status and, if the waiting thread is interrupted before slot info is obtained, restores the interrupt flag and wraps the event in a ConnectException with this message. It signals that the connector's attempt to read the replication slot's state (used by opengauss/Postgres CDC to decide whether to snapshot or resume) was aborted mid-wait.

Source

Thrown at seatunnel-connectors-v2/connector-cdc/connector-cdc-opengauss/src/main/java/io/debezium/connector/postgresql/connection/PostgresConnection.java:263

     *
     * @param slotName the name of the slot
     * @param pluginName the name of the plugin used for the desired slot
     * @return the {@link SlotState} or null, if no slot state is found
     * @throws SQLException
     */
    public SlotState getReplicationSlotState(String slotName, String pluginName)
            throws SQLException {
        ServerInfo.ReplicationSlot slot;
        try {
            slot = readReplicationSlotInfo(slotName, pluginName);
            if (slot.equals(ServerInfo.ReplicationSlot.INVALID)) {
                return null;
            } else {
                return slot.asSlotState();
            }
        } catch (InterruptedException e) {
            Thread.currentThread().interrupt();
            throw new ConnectException(
                    "Interrupted while waiting for valid replication slot info", e);
        }
    }

    /**
     * Fetches the state of a replication stage given a slot name and plugin name
     *
     * @param slotName the name of the slot
     * @param pluginName the name of the plugin used for the desired slot
     * @return the {@link ServerInfo.ReplicationSlot} object or a {@link
     *     ServerInfo.ReplicationSlot#INVALID} if the slot is not valid
     * @throws SQLException is thrown by the underlying JDBC
     */
    private ServerInfo.ReplicationSlot fetchReplicationSlotInfo(String slotName, String pluginName)
            throws SQLException {
        final String database = database();
        final ServerInfo.ReplicationSlot slot =
                queryForSlot(

View on GitHub (pinned to cf67b549a7)

Solutions

  1. Determine who interrupted the thread (job cancel vs. failure) from engine logs; if the cancel was unintended, resubmit the job
  2. Verify the replication slot exists and is healthy: SELECT * FROM pg_replication_slots; check slot_name/plugin config
  3. Check database responsiveness (long-running queries, lock contention) that could stall the slot-info wait
  4. If the slot is orphaned/invalid, drop and recreate it, then restart the connector
Defensive patterns

Strategy: retry

Validate before calling

SELECT slot_name, plugin, active FROM pg_replication_slots; -- verify slot exists before starting

Try / catch

try {
    SlotState state = connection.getReplicationSlotState(slotName, plugin);
} catch (ConnectException e) {
    // interrupted: resubmit task or check engine cancellation logs
}

Prevention

When it happens

Trigger: Calling getReplicationSlotState when the task thread receives an interrupt while waiting for slot query results: job cancellation, engine shutdown, task restart/failover, or watchdog interrupt during a slow query against pg_replication_slots.

Common situations: Cancelling a stuck opengauss/postgres CDC job; slot query hanging because the DB is overloaded or the slot name/plugin is wrong causing retries; Zeta worker restart during startup; checkpoint timeout triggering task cancellation.

Related errors


AI-assisted analysis of apache/seatunnel@cf67b549a7 (2026-09-10). Data as JSON: /api/errors/62a5562df29fc6fc. Report an issue: GitHub.