apache/seatunnel · error · ConnectException

No replication slot found

Error message

No replication slot found

What it means

Thrown by parseSlotCreation when the response of CREATE_REPLICATION_SLOT ... LOGICAL ... contains no row. A successful slot creation must return one row with consistent_point, snapshot_name and output_plugin; an empty result means the server did not create/return a slot, so no SlotCreationResult can be built. Wrapped in a ConnectException.

Source

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

        }
        return Optional.ofNullable(slotCreationInfo);
    }

    protected BaseConnection pgConnection() throws SQLException {
        return (BaseConnection) connection(false);
    }

    private SlotCreationResult parseSlotCreation(ResultSet rs) {
        try {
            if (rs.next()) {
                String slotName = rs.getString("slot_name");
                String startPoint = rs.getString("consistent_point");
                String snapName = rs.getString("snapshot_name");
                String pluginName = rs.getString("output_plugin");

                return new SlotCreationResult(slotName, startPoint, snapName, pluginName);
            } else {
                throw new ConnectException("No replication slot found");
            }
        } catch (SQLException ex) {
            throw new ConnectException("Unable to parse create_replication_slot response", ex);
        }
    }

    private ReplicationStream createReplicationStream(
            final Lsn startLsn, WalPositionLocator walPosition)
            throws SQLException, InterruptedException {
        PGReplicationStream s;

        try {
            try {
                s =
                        startPgReplicationStream(
                                startLsn,
                                plugin.forceRds()
                                        ? messageDecoder::optionsWithoutMetadata

View on GitHub (pinned to cf67b549a7)

Solutions

  1. Check pg_replication_slots: if the slot already exists, either delete it (SELECT pg_drop_replication_slot('<name>')) or configure the connector to reuse the existing slot instead of creating one.
  2. Confirm the output plugin configured (e.g. pgoutput, wal2json, decoderbufs) is installed on the server (pg_available_extensions / shared_preload or contrib installed).
  3. Verify the replication connection works (IDENTIFY_SYSTEM returns a row) — see error 521 — since the slot-create command requires a true replication connection.
  4. Check the server log for the underlying CREATE_REPLICATION_SLOT error; version mismatches between the connector's command syntax and the server may need a connector upgrade.
  5. Use a unique slot.name for this connector instance to avoid collisions with other deployments.

Example fix

// before: slot left over from previous failed run
SELECT * FROM pg_drop_replication_slot('dbz_slot');
// after: slot removed; connector can create it fresh on restart
SELECT pg_drop_replication_slot('dbz_slot'); -- returns true, restart connector
Defensive patterns

Strategy: try-catch

Validate before calling

-- verify no conflicting slot and plugin availability before creating
SELECT slot_name, plugin FROM pg_replication_slots WHERE slot_name = 'my_slot';
SELECT * FROM pg_available_extensions WHERE name IN ('pgoutput','wal2json','decoderbufs');

Try / catch

try {
    connection.initReplicationSlot();
} catch (ConnectException e) {
    if ("No replication slot found".equals(e.getMessage())) {
        // drop stale slot or reuse existing one, verify output plugin, retry
    } else {
        throw e;
    }
}

Prevention

When it happens

Trigger: Executing CREATE_REPLICATION_SLOT <name> LOGICAL <plugin> on the replication connection returns a result set with zero rows: the server refused or no-op'd the creation (e.g. slot already existed and creation failed silently, unsupported command variant, or the connection is not in replication mode).

Common situations: Slot already exists from a previous run (server errors instead of returning a row on some versions); openGauss/Postgres fork divergences in CREATE_REPLICATION_SLOT syntax (e.g. missing EXPORT_SNAPSHOT support); replication connection not properly established so the command is not recognized as a replication command.

Understand the failure class

Background: EmptyResultError / "no results found": when an API or scraper succeeds but returns zero rows — this error's family across 9 libraries.

Related errors


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