apache/seatunnel · critical · InfluxdbConnectorException

CONNECT_FAILED

CONNECT_FAILED

Error message

connect influxdb failed, due to influxdb version info is unknown, the url is: {%s}

What it means

InfluxdbSourceReader.connect() obtains a read client via InfluxDBClient.getInfluxDB(config) and pings the server. If ping().isGood() is false, the source cannot reach a healthy InfluxDB and throws CONNECT_FAILED with the configured URL.

Source

Thrown at seatunnel-connectors-v2/connector-influxdb/src/main/java/org/apache/seatunnel/connectors/seatunnel/influxdb/source/InfluxdbSourceReader.java:76

    InfluxdbSourceReader(
            InfluxDBConfig config,
            Context readerContext,
            SeaTunnelRowType seaTunnelRowType,
            List<Integer> columnsIndexList) {
        this.config = config;
        this.pendingSplits = new LinkedList<>();
        this.context = readerContext;
        this.seaTunnelRowType = seaTunnelRowType;
        this.columnsIndexList = columnsIndexList;
    }

    public void connect() throws ConnectException {
        if (influxdb == null) {
            influxdb = InfluxDBClient.getInfluxDB(config);
            String version = influxdb.version();
            if (!influxdb.ping().isGood()) {
                throw new InfluxdbConnectorException(
                        InfluxdbConnectorErrorCode.CONNECT_FAILED,
                        String.format(
                                "connect influxdb failed, due to influxdb version info is unknown, the url is: {%s}",
                                config.getUrl()));
            }
            log.info("connect influxdb successful. sever version :{}.", version);
        }
    }

    @Override
    public void open() throws Exception {
        connect();
    }

    @Override
    public void close() {
        if (influxdb != null) {
            influxdb.close();

View on GitHub (pinned to cf67b549a7)

Solutions

  1. Test the URL manually with curl against the InfluxDB /ping endpoint.
  2. Verify source config url, database/retention and auth settings.
  3. Ensure network reachability from all SeaTunnel nodes to InfluxDB.
  4. Match client protocol/auth to the actual InfluxDB version.

Example fix

// before
url = "https://influx.internal:8086" // TLS not enabled on server
// after
url = "http://influx.internal:8086"
Defensive patterns

Strategy: retry

Validate before calling

// preflight ping
HttpResponse<String> resp = client.send(HttpRequest.newBuilder(URI.create(url + "/ping")).build(), HttpResponse.BodyHandlers.ofString());
if (resp.statusCode() >= 400) throw new IllegalStateException("InfluxDB ping failed: " + resp.statusCode());

Try / catch

try {
    reader.connect();
} catch (ConnectException | InfluxdbConnectorException e) {
    // retry with backoff before failing the job
    retryWithBackoff(() -> reader.connect(), 3);
}

Prevention

When it happens

Trigger: Source reader open() -> connect() when the InfluxDB endpoint is down, misconfigured, unreachable over the network, or responding unhealthily to ping.

Common situations: Wrong source URL/port config, InfluxDB service stopped, k8s network policy or firewall blocking the workers, TLS/protocol mismatch, or wrong version endpoint (1.x vs 2.x).

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/3e5e8e820822ee27. Report an issue: GitHub.