apache/seatunnel · warning
Connection issue detected. Forcing reconnection...
Error message
Connection issue detected. Forcing reconnection...
What it means
Logged as WARN by HugeGraphClient.reconnect() when a connection issue is detected and the client is about to be torn down and rebuilt. It closes the current HugeClient instance (swallowing close errors) before nulling references so the next operation recreates them. This is an expected part of the retry/reconnect loop, not a failure by itself.
Source
Thrown at seatunnel-connectors-v2/connector-hugegraph/src/main/java/org/apache/seatunnel/connectors/seatunnel/hugegraph/client/HugeGraphClient.java:147
try {
this.client = createClient(this.config);
this.schema = this.client.schema();
createPageApis(this.config);
LOG.info("HugeClient initialized successfully.");
} catch (Exception e) {
// Avoid leaking a partially-opened client (e.g. createPageApis failed after the
// HugeClient was created) — release everything before surfacing the failure.
reconnect();
throw new HugeGraphConnectorException(
HugeGraphConnectorErrorCode.BUILD_CLIENT_FAILED,
"Failed to establish initial connection",
e);
}
}
}
private void reconnect() {
LOG.warn("Connection issue detected. Forcing reconnection...");
if (this.client != null) {
try {
this.client.close();
} catch (Exception e) {
LOG.warn("Error closing potentially broken client: {}", e.getMessage());
}
}
this.client = null;
if (this.restClient != null) {
try {
this.restClient.close();
} catch (Exception e) {
LOG.warn("Error closing potentially broken REST client: {}", e.getMessage());
}
}
this.restClient = null;
this.vertexAPI = null;
this.edgeAPI = null;View on GitHub (pinned to cf67b549a7)
Solutions
- Check HugeGraph server availability and address (host/port) in the sink/source configuration
- Inspect preceding logs for the root connection exception (timeout, refused, unknown host)
- Verify network/firewall rules between SeaTunnel workers and the HugeGraph REST port
- If reconnects recur, tune retry attempts/timeout options and investigate server-side load
Defensive patterns
Strategy: retry
Validate before calling
// Before job submission curl -sf http://hugegraph-host:8080/graphs || echo "HugeGraph unreachable"
Try / catch
// The client auto-reconnects; at the job level wrap the sink write phase
try {
sinkWrite();
} catch (HugeGraphConnectorException e) {
if ("BUILD_CLIENT_FAILED".equals(e.getErrorCode())) {
// schedule job retry after checking server health
}
throw e;
} Prevention
- Health-check the HugeGraph endpoint before starting the job
- Raise LB/firewall idle timeouts above the job's inter-request gaps
- Monitor server GC pauses and restarts that trigger client reconnects
- Keep connector retry/timeout options sized to your network's reliability
When it happens
Trigger: Invoked from ensureClientInitialized, executeGraphOperation, or executeReadOperation when a request throws a connection-level exception (ConnectException, timeout, unknown host, socket reset) against the HugeGraph server.
Common situations: HugeGraph server restarted or briefly unavailable, network blips between SeaTunnel worker and server, load balancer idle-timeout dropping keep-alive connections, or wrong host/port making the initial connection fail.
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
- Error closing potentially broken client: {}
- HugeGraph connection failed on attempt {}/{}. Error: {}
- Failed to get connection, interrupted while doing another at
- BUILD_CLIENT_FAILED
- Error closing potentially broken REST client: {}
AI-assisted analysis of apache/seatunnel@cf67b549a7 (2026-09-10).
Data as JSON: /api/errors/8dadb550dc20d96f.
Report an issue: GitHub.