apache/seatunnel · warning
Failed to close Fluss connection for {}
Error message
Failed to close Fluss connection for {} What it means
FlussAdminClient.close() closes the underlying Fluss Connection after closing the Admin, both inside a TemporaryClassLoaderContext to ensure correct classloading. If connection.close() throws, the exception is swallowed and logged as this warning with the client's description; close() still completes without propagating an error to the caller.
Source
Thrown at seatunnel-connectors-v2/connector-fluss/src/main/java/org/apache/seatunnel/connectors/seatunnel/fluss/source/FlussAdminClient.java:171
@Override
public void close() {
// Best-effort: this client only backs short-lived schema/offset discovery, so a failure to
// release it must not fail a job (or a discovery) whose data was already fetched. Both the
// admin and the connection are always attempted; failures are logged, not thrown.
// Pin the connector classloader (see createConnection): teardown may run on a framework
// thread whose context classloader is not the connector's, and Fluss can lazily load
// classes while closing.
try (TemporaryClassLoaderContext ignored =
TemporaryClassLoaderContext.of(FlussAdminClient.class.getClassLoader())) {
try {
admin.close();
} catch (Exception e) {
log.warn("Failed to close Fluss admin for {}", description, e);
}
try {
connection.close();
} catch (Exception e) {
log.warn("Failed to close Fluss connection for {}", description, e);
}
}
}
}
View on GitHub (pinned to cf67b549a7)
Solutions
- Inspect the logged stack trace attached to this warning for the underlying cause (unreachable server, timeout, already-closed).
- Confirm Fluss server reachability and that the job teardown happens after the cluster is stable.
- Avoid closing the client twice; ensure the source reader lifecycle closes the client exactly once.
- Typically safe to ignore — the warning only means server-side resources will be reclaimed by timeout.
Defensive patterns
Strategy: try-catch
Validate before calling
// before shutdown, drop stale connections so close() is likely clean if (!connection.is reachableCheckEnabled()) pingBroker(); // replace with your health probe
Try / catch
try {
adminClient.close();
} catch (Exception e) {
// connection-close errors are logged internally and not rethrown;
// handle only unexpected outer failures here
log.error("Unexpected failure closing FlussAdminClient", e);
} Prevention
- Avoid cancelling jobs during known Fluss maintenance windows or restarts.
- Verify network/firewall stability between workers and Fluss servers.
- Close each connection once; guard lifecycle code against duplicate close() calls.
- Ignore benign already-closed warnings; investigate only if they repeat with real I/O errors.
When it happens
Trigger: Calling close() on FlussAdminClient when the Fluss Connection's close() throws — e.g. connection already broken, network failure to the Fluss server during teardown, or a timeout closing remote resources.
Common situations: Shutdown after a network outage; killing tasks while a connection is mid-RPC; duplicate close() invocations on an already-closed connection; Fluss server restarting at the same time the job is cancelled.
Related errors
- Failed to close Fluss admin for {}
- CLOSE_CQL_SESSION_FAILED
- Failed to close Google Pub/Sub subscriber
- Error closing MQTT client
- Failed to close Pulsar consumer.
AI-assisted analysis of apache/seatunnel@cf67b549a7 (2026-09-10).
Data as JSON: /api/errors/82c5f1e8a4019ca8.
Report an issue: GitHub.