apache/seatunnel · critical · DatabendConnectorException

CONNECT_FAILED

CONNECT_FAILED

Error message

Failed to initialize DatabendSinkAggregatedCommitter: {e.getMessage()}

What it means

DatabendSinkAggregatedCommitter.init failed to acquire its JDBC connection or prepare commit state, wrapped as CONNECT_FAILED. The committer aggregates writer results and commits them; without initialization the job cannot commit. The exception is logged with the instance id and rethrown with the original cause.

Source

Thrown at seatunnel-connectors-v2/connector-databend/src/main/java/org/apache/seatunnel/connectors/seatunnel/databend/sink/DatabendSinkAggregatedCommitter.java:111

            this.connection = DatabendUtil.createConnection(databendSinkConfig);
            log.info(
                    "[Instance {}] Databend connection created successfully: {}",
                    instanceId,
                    connection);

            // CDC infrastructure is now initialized in DatabendSink.setJobContext
            // Just log that we're in CDC mode
            if (isCdcMode) {
                log.info("[Instance {}] Running in CDC mode", instanceId);
            }
        } catch (SQLException e) {
            log.error(
                    "[Instance {}] Failed to initialize DatabendSinkAggregatedCommitter: {}",
                    instanceId,
                    e.getMessage(),
                    e);
            throw new DatabendConnectorException(
                    DatabendConnectorErrorCode.CONNECT_FAILED,
                    "Failed to initialize DatabendSinkAggregatedCommitter: " + e.getMessage(),
                    e);
        } catch (Exception e) {
            log.error(
                    "[Instance {}] Unexpected error during initialization: {}",
                    instanceId,
                    e.getMessage(),
                    e);
            throw e;
        }
    }

    private String getCurrentTimestamp() {
        return LocalDateTime.now().format(DateTimeFormatter.ofPattern("yyyyMMddHHmmssSSS"));
    }

    @Override

View on GitHub (pinned to cf67b549a7)

Solutions

  1. Verify Databend connectivity and credentials on the node running the committer
  2. Retry the job; transient outages during init are the most common cause
  3. Check the cause's message for auth vs. network errors and fix the sink config accordingly
  4. Ensure the sink url/username/password are identical across writers and committers
Defensive patterns

Strategy: retry

Validate before calling

try (Connection c = DriverManager.getConnection(url, user, pass)) {
    if (!c.isValid(5)) throw new IllegalStateException("Databend unreachable");
}

Try / catch

try {
    // job with aggregated commit
} catch (DatabendConnectorException e) {
    if (e.getErrorCode() == DatabendConnectorErrorCode.CONNECT_FAILED
            && e.getMessage().contains("AggregatedCommitter")) {
        // retry with backoff after verifying Databend availability
    } else { throw e; }
}

Prevention

When it happens

Trigger: init opening a Databend connection via the configured options and receiving a SQLException — unreachable server, bad credentials, or driver misconfiguration.

Common situations: Databend temporarily down or restarting when the job reaches commit stage; credentials changed between job submit and commit; network policy blocking the driver on the coordinator node.

Understand the failure class

Background: ECONNREFUSED and "connection refused" / "could not connect to server" errors: what they mean and how to fix them — this error's family across 44 libraries.

Related errors


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