apache/seatunnel · warning
Failed to get clickhouse server config: {}
Error message
Failed to get clickhouse server config: {} What it means
ClickhouseSinkWriter checks whether the ClickHouse server has the experimental lightweight delete feature enabled by querying system tables (SELECT value FROM system.<config>). On SQLException it logs this warning and returns false, so the writer proceeds assuming lightweight delete is disabled.
Source
Thrown at seatunnel-connectors-v2/connector-clickhouse/src/main/java/org/apache/seatunnel/connectors/seatunnel/clickhouse/sink/client/ClickhouseSinkWriter.java:230
private boolean clickhouseServerEnableExperimentalLightweightDelete(
ClickHouseConnectionImpl clickhouseConnection) {
if (!option.isAllowExperimentalLightweightDelete()) {
return false;
}
String configKey = "allow_experimental_lightweight_delete";
try (Statement stmt = clickhouseConnection.createStatement();
ResultSet resultSet =
stmt.executeQuery("SHOW SETTINGS ILIKE '%" + configKey + "%'")) {
while (resultSet.next()) {
String name = resultSet.getString("name");
if (name.equalsIgnoreCase(configKey)) {
return resultSet.getBoolean("value");
}
}
return false;
} catch (SQLException e) {
log.warn("Failed to get clickhouse server config: {}", configKey, e);
return false;
}
}
}
View on GitHub (pinned to cf67b549a7)
Solutions
- Grant the configured ClickHouse user read access to system tables, or check the exact SQLException in the log cause.
- Upgrade ClickHouse if the required config table/feature is absent but lightweight delete is desired.
- Accept the fallback (feature treated as disabled) if your sink config does not rely on lightweight delete.
Defensive patterns
Strategy: try-catch
Validate before calling
// pre-check feature flag before writing SELECT value FROM system.system_settings WHERE name = 'enable_experimental_lightweight_delete';
Try / catch
try {
boolean enabled = writer.checkLightweightDelete();
} catch (SQLException e) {
// connector already falls back to false; log and continue
} Prevention
- Grant the sink user read access to system tables
- Test the feature-flag query against your ClickHouse version during setup
When it happens
Trigger: clickhouseServerEnableExperimentalLightweightDelete executes its config query and the JDBC statement fails — table missing on old ClickHouse versions, connection drop, or permission denied on system tables.
Common situations: ClickHouse versions without the checked system table; limited DB user lacking access to system.* tables; transient network issues between SeaTunnel and ClickHouse.
Understand the failure class
Background: "query failed", "%w: SQL error" — wrapped database query errors in Go libraries explained — this error's family across 3 libraries.
Related errors
- Failed to execute query: %s
- Failed to analyze SQL complexity using EXPLAIN, fallback to
- Failed to split chunks for table " + tableId
- Error to discover tables:
- Error to check tables:
AI-assisted analysis of apache/seatunnel@cf67b549a7 (2026-09-10).
Data as JSON: /api/errors/2e480196cb7de3bb.
Report an issue: GitHub.