{"record":{"id":"81cb31bb9f873a35","repo":"apache/seatunnel","slug":"connect-failed-81cb31","errorCode":"CONNECT_FAILED","errorMessage":"connect influxdb failed, due to influxdb version info is unknown, the url is: {%s}","messagePattern":"connect influxdb failed, due to influxdb version info is unknown, the url is: (.+?)","errorType":"error_code","errorClass":"InfluxdbConnectorException","httpStatus":null,"severity":"critical","filePath":"seatunnel-connectors-v2/connector-influxdb/src/main/java/org/apache/seatunnel/connectors/seatunnel/influxdb/sink/InfluxDBSinkWriter.java","lineNumber":157,"sourceCode":"\n        batchList.clear();\n    }\n\n    private void checkFlushException() {\n        if (flushException != null) {\n            throw new InfluxdbConnectorException(\n                    CommonErrorCodeDeprecated.FLUSH_DATA_FAILED,\n                    \"Writing records to InfluxDB failed.\",\n                    flushException);\n        }\n    }\n\n    public void connect() throws ConnectException {\n        if (influxdb == null) {\n            influxdb = InfluxDBClient.getWriteClient(sinkConfig);\n            String version = influxdb.version();\n            if (!influxdb.ping().isGood()) {\n                throw new InfluxdbConnectorException(\n                        InfluxdbConnectorErrorCode.CONNECT_FAILED,\n                        String.format(\n                                \"connect influxdb failed, due to influxdb version info is unknown, the url is: {%s}\",\n                                sinkConfig.getUrl()));\n            }\n            log.info(\"connect influxdb successful. sever version :{}.\", version);\n        }\n    }\n}\n","sourceCodeStart":139,"sourceCodeEnd":167,"githubUrl":"https://github.com/apache/seatunnel/blob/cf67b549a7a6c35fa0beb12d83c62892427ea919/seatunnel-connectors-v2/connector-influxdb/src/main/java/org/apache/seatunnel/connectors/seatunnel/influxdb/sink/InfluxDBSinkWriter.java#L139-L167","documentation":"InfluxDBSinkWriter.connect() creates a write client and pings the server. If influxdb.ping().isGood() returns false, the server is unreachable or did not answer the ping, so a CONNECT_FAILED InfluxdbConnectorException is thrown reporting the configured URL.","triggerScenarios":"Calling connect() during sink writer initialization when the InfluxDB host is down, the URL/port in sink config is wrong, credentials/network block access, or the server responds to version() but ping is not good.","commonSituations":"Typo in sink URL, InfluxDB not started or listening on another port, firewall/DNS issues in containerized deployments, wrong protocol (http vs https), or InfluxDB 1.x vs 2.x endpoint mismatch.","solutions":["Verify the URL in the InfluxDB sink config is reachable (curl the /ping endpoint).","Confirm InfluxDB is running and the port is correct/exposed.","Check network/firewall/DNS between SeaTunnel worker and InfluxDB.","Ensure http vs https and authentication settings match the server version (1.x vs 2.x)."],"exampleFix":"// before\nurl = \"http://influxdb:9999\"\n// after\nurl = \"http://influxdb:8086\" // correct port for InfluxDB ping endpoint","handlingStrategy":"validation","validationCode":"// before job run: health-check the endpoint\nHttpResponse<String> resp = client.send(HttpRequest.newBuilder(URI.create(sinkUrl.replaceAll(\"/$\",\"\") + \"/ping\")).build(), HttpResponse.BodyHandlers.ofString());\nif (resp.statusCode() >= 400) throw new IllegalStateException(\"InfluxDB not reachable at \" + sinkUrl);","typeGuard":null,"tryCatchPattern":"try {\n    writer.connect();\n} catch (InfluxdbConnectorException e) {\n    if (InfluxdbConnectorErrorCode.CONNECT_FAILED.equals(e.getErrorCode())) {\n        // alert / fail fast with URL context\n    }\n    throw e;\n}","preventionTips":["Health-check the InfluxDB /ping endpoint before submitting the job.","Pin and document the correct URL/port per environment.","Verify connectivity from worker nodes, not just the client machine.","Use DNS names stable across restarts."],"tags":["influxdb","connectivity","sink"],"backgroundTag":"connection-refused","analyzedSha":"cf67b549a7a6c35fa0beb12d83c62892427ea919","analyzedAt":"2026-09-10T21:44:55.265Z","contentChangedAt":"2026-09-10T21:44:55.265Z","schemaVersion":2},"datasetVersion":"2026-09-14T11:17:12.474Z"}