apache/seatunnel · warning
Error clearing scrollId
Error message
Error clearing scrollId
What it means
A WARN logged by EasysearchClient.clearScroll when the scroll-clear DELETE request throws an IOException. The scroll context is not released and will remain until its TTL expires; the method returns false.
Source
Thrown at seatunnel-connectors-v2/connector-easysearch/src/main/java/org/apache/seatunnel/connectors/seatunnel/easysearch/client/EasysearchClient.java:321
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,
List<String> source,
Map<String, Object> query,
String scrollTime,
int scrollSize) {View on GitHub (pinned to cf67b549a7)
Solutions
- Retry clearScroll with backoff — the exception is often transient.
- Verify connectivity to the configured hosts/ports (`curl` the cluster health endpoint).
- Check RestClient timeout settings and increase socket/connect timeouts if the cluster is slow.
- Rely on scroll TTL expiry as a safety net if the context cannot be cleared.
Defensive patterns
Strategy: retry
Try / catch
try {
client.clearScroll(scrollId);
} catch (IOException e) {
// retry once, then rely on scroll TTL expiry
} Prevention
- Increase RestClient socket/connect timeouts
- Verify host/port reachability before running jobs
- Monitor node restarts and network stability
When it happens
Trigger: Calling clearScroll while the network connection fails: connection reset, node unreachable, DNS failure, or socket timeout during the DELETE request.
Common situations: Easysearch node restart/crash mid-read; network partition between SeaTunnel worker and cluster; short read timeouts configured for large cluster load.
Related errors
- Failed to clear Easysearch scrollId:
- DELETE {} response null when clearing scrollId {}
- Failed to clear scrollId {}, status code={}
- Failed to clear scroll ID: ${scrollId}
- SCROLL_REQUEST_ERROR
AI-assisted analysis of apache/seatunnel@cf67b549a7 (2026-09-10).
Data as JSON: /api/errors/e130dde06b303039.
Report an issue: GitHub.