apache/seatunnel · warning
Failed to clear scrollId {}, status code={}
Error message
Failed to clear scrollId {}, status code={} What it means
A WARN logged by EasysearchClient.clearScroll when the DELETE scroll-clear request returns a non-200 status code. The scroll context may not have been released; the method returns false so callers can fall back to scroll TTL expiry.
Source
Thrown at seatunnel-connectors-v2/connector-easysearch/src/main/java/org/apache/seatunnel/connectors/seatunnel/easysearch/client/EasysearchClient.java:317
}
String endpoint = "/_search/scroll";
Request request = new Request("DELETE", endpoint);
Map<String, String> param = new HashMap<>();
param.put("scroll_id", scrollId);
request.setJsonEntity(JsonUtils.toJsonString(param));
try {
Response response = restClient.performRequest(request);
if (response == null) {
log.warn("DELETE {} response null when clearing scrollId {}", endpoint, scrollId);
return false;
}
int statusCode = response.getStatusLine().getStatusCode();
if (statusCode == HttpStatus.SC_OK) {
return true;
} else {
log.warn("Failed to clear scrollId {}, status code={}", scrollId, statusCode);
return false;
}
} catch (IOException e) {
log.warn("Error clearing scrollId " + scrollId, e);
return false;
}
}
/**
* first time to request search documents by scroll call /${index}/_search?scroll=${scroll}
*
* @param index index name
* @param source select fields
* @param scrollTime such as:1m
* @param scrollSize fetch documents count in one request
*/
public ScrollResult searchByScroll(
String index,View on GitHub (pinned to cf67b549a7)
Solutions
- Check the status code and server logs; 404/400 usually means the scroll already expired and is safe to ignore.
- Increase the scroll keep-alive (`scroll` timeout in search requests) if scrolls expire before the reader finishes.
- Retry clearScroll on transient 5xx responses.
- Ensure the cluster is healthy; investigate 5xx causes (disk, queue capacity).
Defensive patterns
Strategy: fallback
Try / catch
if (!client.clearScroll(scrollId)) {
log.debug("clearScroll returned non-200; relying on scroll TTL expiry");
} Prevention
- Set scroll keep-alive longer than the longest fetch cycle
- Monitor cluster health to avoid 5xx during cleanup
- Treat cleanup failures as non-fatal
When it happens
Trigger: Calling clearScroll and the server responds with a status other than 200 — e.g. 400 for a malformed/already-expired scroll_id, 404 for unknown scroll id, or 5xx for server-side errors.
Common situations: Scroll context already expired (TTL elapsed) before cleanup; network path returning error pages; Easysearch cluster under stress returning 5xx.
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
- DELETE {} response null when clearing scrollId {}
- Error clearing scrollId
- Failed to clear Easysearch scrollId:
- DELETE {} response status code={}, body={} for scroll ID: {}
- SCROLL_REQUEST_ERROR
AI-assisted analysis of apache/seatunnel@cf67b549a7 (2026-09-10).
Data as JSON: /api/errors/3e56b7355364c266.
Report an issue: GitHub.