apache/seatunnel · error · EasysearchConnectorException
DROP_INDEX_FAILED
DROP_INDEX_FAILED
Error message
DELETE /%s response null
What it means
EasysearchClient.dropIndex sends a DELETE /{index} request via the low-level RestClient. If performRequest returns a null Response, the client cannot confirm the index was dropped, so it throws EasysearchConnectorException with DROP_INDEX_FAILED. This guards against silently treating an empty response as success.
Source
Thrown at seatunnel-connectors-v2/connector-easysearch/src/main/java/org/apache/seatunnel/connectors/seatunnel/easysearch/client/EasysearchClient.java:546
throw new EasysearchConnectorException(
EasysearchConnectorErrorCode.CREATE_INDEX_FAILED,
String.format(
"PUT %s response status code=%d",
endpoint, response.getStatusLine().getStatusCode()));
}
} catch (IOException ex) {
throw new EasysearchConnectorException(
EasysearchConnectorErrorCode.CREATE_INDEX_FAILED, ex);
}
}
public void dropIndex(String tableName) {
String endpoint = String.format("/%s", tableName);
Request request = new Request("DELETE", endpoint);
try {
Response response = restClient.performRequest(request);
if (response == null) {
throw new EasysearchConnectorException(
EasysearchConnectorErrorCode.DROP_INDEX_FAILED,
"DELETE " + endpoint + " response null");
}
// todo: if the index doesn't exist, the response status code is 200?
if (response.getStatusLine().getStatusCode() == HttpStatus.SC_OK) {
return;
} else {
throw new EasysearchConnectorException(
EasysearchConnectorErrorCode.DROP_INDEX_FAILED,
String.format(
"DELETE %s response status code=%d",
endpoint, response.getStatusLine().getStatusCode()));
}
} catch (IOException ex) {
throw new EasysearchConnectorException(
EasysearchConnectorErrorCode.DROP_INDEX_FAILED, ex);
}
}View on GitHub (pinned to cf67b549a7)
Solutions
- Verify the cluster URL/hosts configured for the Easysearch catalog are reachable and use the correct http/https scheme.
- Check RestClient configuration (connection timeout, request timeout) so transient issues don't yield empty responses.
- Upgrade/align the elasticsearch-rest-high-level-client version used by the connector with the cluster version.
- Retry the dropIndex call; if the failure persists, inspect proxy/interceptor settings between the job and the cluster.
Example fix
// before
client.dropIndex("my_index");
// after
try {
client.dropIndex("my_index");
} catch (EasysearchConnectorException e) {
if (e.getErrorCode() == EasysearchConnectorErrorCode.DROP_INDEX_FAILED) {
// check cluster connectivity, then retry or log
}
} Defensive patterns
Strategy: try-catch
Validate before calling
boolean indexExists = client.performRequest(new Request("HEAD", "/" + tableName)).getStatusLine().getStatusCode() == 200; Type guard
null
Try / catch
try { client.dropIndex(tableName); } catch (EasysearchConnectorException e) { if (e.getErrorCode() == DROP_INDEX_FAILED) { /* check connectivity, retry */ } } Prevention
- Verify cluster URL and scheme before running the job
- Set sane connection/request timeouts
- Make index dropping idempotent
When it happens
Trigger: Calling dropIndex(tableName) when the Easysearch/Elasticsearch REST client returns null from performRequest (typically a client-side or transport-level anomaly rather than a normal HTTP response).
Common situations: Misconfigured or partially-initialized RestClient (wrong addresses scheme), interrupted connections returning an empty response, custom interceptors or proxies swallowing the response body.
Understand the failure class
Background: "API error: {status}" and "HTTP 401/403/404/429/5xx" errors: non-2xx HTTP responses explained — this error's family across 27 libraries.
Related errors
- SQL_OPERATION_FAILED
- close easysearch connection error
- DELETE {} response null when clearing scrollId {}
- Error clearing scrollId
- Failed to clear Easysearch scrollId:
AI-assisted analysis of apache/seatunnel@cf67b549a7 (2026-09-10).
Data as JSON: /api/errors/08a92d70714c5762.
Report an issue: GitHub.