apache/seatunnel · error · ElasticsearchConnectorException
DROP_INDEX_FAILED
DROP_INDEX_FAILED
Error message
DELETE {endpoint} response null What it means
Logged/raised inside EsRestClient when a DELETE request against an Elasticsearch endpoint completes without returning a response body, so the deletion result cannot be confirmed. It signals an unexpected empty REST response rather than an HTTP error status.
Source
Thrown at seatunnel-connectors-v2/connector-elasticsearch/src/main/java/org/apache/seatunnel/connectors/seatunnel/elasticsearch/client/EsRestClient.java:644
throw new ElasticsearchConnectorException(
ElasticsearchConnectorErrorCode.CREATE_INDEX_FAILED,
String.format(
"PUT %s response status code=%d, body=%s",
endpoint, response.getStatusLine().getStatusCode(), entity));
}
} catch (IOException ex) {
throw new ElasticsearchConnectorException(
ElasticsearchConnectorErrorCode.CREATE_INDEX_FAILED, ex);
}
}
public void dropIndex(String tableName) {
String endpoint = String.format("/%s", tableName.toLowerCase());
Request request = new Request("DELETE", endpoint);
try {
Response response = restClient.performRequest(request);
if (response == null) {
throw new ElasticsearchConnectorException(
ElasticsearchConnectorErrorCode.DROP_INDEX_FAILED,
"DELETE " + endpoint + " response null");
}
String entity = EntityUtils.toString(response.getEntity(), StandardCharsets.UTF_8);
if (response.getStatusLine().getStatusCode() != HttpStatus.SC_OK) {
throw new ElasticsearchConnectorException(
ElasticsearchConnectorErrorCode.DROP_INDEX_FAILED,
String.format(
"DELETE %s response status code=%d, body=%s",
endpoint, response.getStatusLine().getStatusCode(), entity));
}
} catch (IOException ex) {
throw new ElasticsearchConnectorException(
ElasticsearchConnectorErrorCode.DROP_INDEX_FAILED, ex);
}
}
public void clearIndexData(String indexName) {View on GitHub (pinned to cf67b549a7)
Solutions
- Verify with a manual DELETE (on a test index) that the endpoint permits DELETE verbs end-to-end
- Use the standard ES Low Level REST Client without response-swallowing wrappers
- Inspect proxy/WAF logs for blocked DELETE requests
- Trace the REST client to confirm whether Elasticsearch processed the deletion
Defensive patterns
Strategy: try-catch
Type guard
boolean hasResponse(Response r) { return r != null; } Try / catch
try {
client.dropIndex(tableName);
} catch (ElasticsearchConnectorException e) {
if (e.getMessage().contains("response null")) {
// verify with HEAD /{index} whether the deletion actually happened
if (!client.indexExists(tableName)) return; // already gone
}
throw e;
} Prevention
- Avoid proxies that block or swallow DELETE responses
- Re-check index existence after a null-response failure instead of blindly retrying
- Keep the REST client on standard, supported construction paths
When it happens
Trigger: dropIndex(tableName) invocation where restClient.performRequest returns null for the DELETE request.
Common situations: Wrapped/custom RestClient implementations; intermediaries dropping DELETE responses; DELETE requests blocked by some proxies/WAFs by policy.
Understand the failure class
Background: 'Something went wrong' / 'Request failed (500)' / 'HTTP error! status: 404' — what failed HTTP requests actually mean and how to find the real cause — this error's family across 28 libraries.
Related errors
- GET_INDEX_DOCS_COUNT_FAILED
- LIST_INDEX_FAILED
- CREATE_INDEX_FAILED
- CLEAR_INDEX_DATA_FAILED
- ADD_FIELD_FAILED
AI-assisted analysis of apache/seatunnel@cf67b549a7 (2026-09-10).
Data as JSON: /api/errors/15f07da699b8c2e2.
Report an issue: GitHub.