{"record":{"id":"7e46853641cebb16","repo":"apache/seatunnel","slug":"failed-to-connect-to-address","errorCode":null,"errorMessage":"Failed to connect to address:{}","messagePattern":"Failed to connect to address:(.+?)","errorType":"console","errorClass":null,"httpStatus":null,"severity":"warning","filePath":"seatunnel-connectors-v2/connector-starrocks/src/main/java/org/apache/seatunnel/connectors/seatunnel/starrocks/client/HttpHelper.java","lineNumber":229,"sourceCode":"                                new DefaultRedirectStrategy() {\n                                    @Override\n                                    protected boolean isRedirectable(String method) {\n                                        return true;\n                                    }\n                                });\n        return httpClientBuilder.build();\n    }\n\n    public boolean tryHttpConnection(String host) {\n        try {\n            URL url = new URL(host);\n            HttpURLConnection co = (HttpURLConnection) url.openConnection();\n            co.setConnectTimeout(DEFAULT_CONNECT_TIMEOUT);\n            co.connect();\n            co.disconnect();\n            return true;\n        } catch (Exception e1) {\n            log.warn(\"Failed to connect to address:{}\", host, e1);\n            return false;\n        }\n    }\n}\n","sourceCodeStart":211,"sourceCodeEnd":234,"githubUrl":"https://github.com/apache/seatunnel/blob/cf67b549a7a6c35fa0beb12d83c62892427ea919/seatunnel-connectors-v2/connector-starrocks/src/main/java/org/apache/seatunnel/connectors/seatunnel/starrocks/client/HttpHelper.java#L211-L234","documentation":"HttpHelper.tryHttpConnection probes an HTTP endpoint by opening an HttpURLConnection; any exception logs this warning and returns false, meaning the StarRocks host is unreachable at connect time. It is a reachability pre-check, not a hard failure.","triggerScenarios":"tryHttpConnection(host) when url.openConnection() or co.connect() throws — DNS resolution failure, connection refused/timeout, security manager denial, or malformed host string.","commonSituations":"Wrong FE/BE hostname or port in sink config; StarRocks node down; firewall or security group blocking the HTTP port; DNS misconfiguration in Kubernetes/containers.","solutions":["Verify the host resolves (nslookup/ping) and the port is open (telnet/curl)","Correct the StarRocks endpoint host/port in the sink configuration","Check firewalls/security groups between the SeaTunnel worker and StarRocks","Confirm the StarRocks FE/BE process is running"],"exampleFix":"// before\nString host = \"fe.internal\"; // unresolved DNS\n// after\nString host = \"starrocks-fe.default.svc.cluster.local\"; // correct resolvable address\nif (!httpHelper.tryHttpConnection(host)) {\n    throw new IllegalStateException(\"Cannot reach StarRocks at \" + host);\n}","handlingStrategy":"validation","validationCode":"// Pre-flight connectivity check in deployment scripts\nnc -zv fe-host 8030 || echo \"StarRocks HTTP port unreachable\"\n// In code:\nif (!httpHelper.tryHttpConnection(host)) {\n    throw new IllegalStateException(\"Cannot reach StarRocks: \" + host);\n}","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Validate host/port in sink config before submitting jobs","Open firewall/security-group paths for StarRocks HTTP ports","Use resolvable DNS names in containerized deployments","Run tryHttpConnection as a startup sanity check"],"tags":["network","starrocks","connectivity"],"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"}