apache/seatunnel · warning
Failed to close Fluss admin for {}
Error message
Failed to close Fluss admin for {} What it means
FlussAdminClient.close() closes the Fluss Admin client and its underlying connection inside a TemporaryClassLoaderContext so classes resolve against the connector's classloader. If admin.close() throws while releasing resources, the exception is swallowed and only logged as this warning with the client's description, so shutdown proceeds to close the connection. Resources may be left unclosed on the Fluss server/broker side until they time out.
Source
Thrown at seatunnel-connectors-v2/connector-fluss/src/main/java/org/apache/seatunnel/connectors/seatunnel/fluss/source/FlussAdminClient.java:166
private static com.alibaba.fluss.metadata.TablePath toFlussTablePath(TablePath tablePath) {
return com.alibaba.fluss.metadata.TablePath.of(
tablePath.getDatabaseName(), tablePath.getTableName());
}
@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
- Check the logged stack trace (the warning carries the exception) to identify why admin.close() failed and address that root cause.
- Verify the Fluss brokers are reachable and healthy at shutdown time; transient unavailability usually means resources are cleaned up server-side by timeout.
- Ensure Fluss client dependency versions match the Fluss server version to avoid close-time protocol mismatches.
- If the warning is noisy but harmless, it can be tolerated — close() continues to release the connection regardless.
Defensive patterns
Strategy: try-catch
Validate before calling
// before shutdown, confirm the admin is usable so close() is likely clean admin.getTableDescriptor(tablePath); // throws if the client/broker is already broken
Try / catch
try {
adminClient.close();
} catch (Exception e) {
// close() swallows admin.close()/connection.close() errors internally;
// reaching here means an unexpected failure outside resource release
log.error("Unexpected failure closing FlussAdminClient", e);
} Prevention
- Ensure Fluss brokers are reachable during job cancellation/teardown windows.
- Keep Fluss client and server versions aligned to avoid close-time protocol errors.
- Close the admin client exactly once in the reader lifecycle to avoid double-close issues.
- Treat the warning as informational: server-side resources are reclaimed by timeout if close RPCs fail.
When it happens
Trigger: Calling close() on FlussAdminClient when the Fluss Admin's close() throws — e.g. broker unreachable during shutdown, RPC timeout, or classloader-related linkage errors that occur despite the TemporaryClassLoaderContext.
Common situations: Job cancellation or task shutdown while the Fluss cluster is briefly unavailable; network partitions at teardown; Fluss client/server version skew causing close-time protocol errors.
Related errors
- Failed to close Fluss connection for {}
- Failed to close Google Pub/Sub subscriber
- Failed to close Pulsar admin.
- Failed to close Pulsar consumer.
- Failed to close connection
AI-assisted analysis of apache/seatunnel@cf67b549a7 (2026-09-10).
Data as JSON: /api/errors/4c9f9d59c330c93a.
Report an issue: GitHub.