apache/seatunnel · warning
Failed to connect to address:{}
Error message
Failed to connect to address:{} What it means
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.
Source
Thrown at seatunnel-connectors-v2/connector-starrocks/src/main/java/org/apache/seatunnel/connectors/seatunnel/starrocks/client/HttpHelper.java:229
new DefaultRedirectStrategy() {
@Override
protected boolean isRedirectable(String method) {
return true;
}
});
return httpClientBuilder.build();
}
public boolean tryHttpConnection(String host) {
try {
URL url = new URL(host);
HttpURLConnection co = (HttpURLConnection) url.openConnection();
co.setConnectTimeout(DEFAULT_CONNECT_TIMEOUT);
co.connect();
co.disconnect();
return true;
} catch (Exception e1) {
log.warn("Failed to connect to address:{}", host, e1);
return false;
}
}
}
View on GitHub (pinned to cf67b549a7)
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
Example fix
// before
String host = "fe.internal"; // unresolved DNS
// after
String host = "starrocks-fe.default.svc.cluster.local"; // correct resolvable address
if (!httpHelper.tryHttpConnection(host)) {
throw new IllegalStateException("Cannot reach StarRocks at " + host);
} Defensive patterns
Strategy: validation
Validate before calling
// Pre-flight connectivity check in deployment scripts
nc -zv fe-host 8030 || echo "StarRocks HTTP port unreachable"
// In code:
if (!httpHelper.tryHttpConnection(host)) {
throw new IllegalStateException("Cannot reach StarRocks: " + host);
} Prevention
- 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
When it happens
Trigger: tryHttpConnection(host) when url.openConnection() or co.connect() throws — DNS resolution failure, connection refused/timeout, security manager denial, or malformed host string.
Common situations: 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.
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
- HOST_IS_NULL
- CONNECT_FAILED
- QUEST_QUERY_PLAN_FAILED
- Connect to doris {} failed.
- Get Error URL failed. {}
AI-assisted analysis of apache/seatunnel@cf67b549a7 (2026-09-10).
Data as JSON: /api/errors/7e46853641cebb16.
Report an issue: GitHub.