apache/seatunnel · warning
Request failed with empty response.
Error message
Request failed with empty response.
What it means
In HttpHelper.getHttpEntity, after a 200 status, if the response has no entity body the helper logs this warning and returns null. It signals a success-status response with an empty body, which callers treat as a failed/invalid response.
Source
Thrown at seatunnel-connectors-v2/connector-starrocks/src/main/java/org/apache/seatunnel/connectors/seatunnel/starrocks/client/HttpHelper.java:67
private static final int DEFAULT_CONNECT_TIMEOUT = 1000000;
private SinkConfig sinkConfig;
public HttpHelper() {}
public HttpHelper(SinkConfig sinkConfig) {
this.sinkConfig = sinkConfig;
}
public HttpEntity getHttpEntity(CloseableHttpResponse resp) {
int code = resp.getStatusLine().getStatusCode();
if (HttpStatus.SC_OK != code) {
log.warn("Request failed with code:{}", code);
return null;
}
HttpEntity respEntity = resp.getEntity();
if (null == respEntity) {
log.warn("Request failed with empty response.");
return null;
}
return respEntity;
}
public String doHttpPost(String postUrl, Map<String, String> header, String postBody)
throws IOException {
log.info("Executing POST from {}.", postUrl);
try (CloseableHttpClient httpClient = HttpClients.createDefault()) {
HttpPost httpPost = new HttpPost(postUrl);
if (null != header) {
for (Map.Entry<String, String> entry : header.entrySet()) {
httpPost.setHeader(entry.getKey(), String.valueOf(entry.getValue()));
}
}
httpPost.setEntity(new ByteArrayEntity(postBody.getBytes()));
try (CloseableHttpResponse resp = httpClient.execute(httpPost)) {
HttpEntity respEntity = getHttpEntity(resp);View on GitHub (pinned to cf67b549a7)
Solutions
- Inspect which endpoint returned the bodyless response and test it with curl
- Check proxy/load balancer configuration for body stripping or connection resets
- Retry the request; if persistent, verify StarRocks FE/BE versions compatibility
Defensive patterns
Strategy: type-guard
Validate before calling
// Probe endpoint with curl to confirm it returns a body:
// curl -i http://fe-host:8030/api/{db}/{table}/_stream_load Type guard
HttpEntity entity = resp.getEntity();
if (entity == null) {
throw new IOException("Empty response body from StarRocks");
} Prevention
- Check proxy/LB configs for body stripping or aggressive timeouts
- Test endpoints with curl before integration
- Retry bodyless 200 responses with backoff
- Keep HttpClient and HttpCore versions consistent
When it happens
Trigger: HTTP 200 response from StarRocks whose CloseableHttpResponse.getEntity() is null — typically server responses with no body (e.g. some 204-like behavior, proxies stripping the body, or aborted connections).
Common situations: Intermediary proxy/load balancer swallowing the body; connection closed early; StarRocks endpoint returning a bodyless success response.
Related errors
- REQUEST_FAILED
- QUEST_QUERY_PLAN_FAILED
- Request failed with code:{}, err:{}
- Failed to get response from Doris FE {}, http code is {}
- Request failed with code:{}
AI-assisted analysis of apache/seatunnel@cf67b549a7 (2026-09-10).
Data as JSON: /api/errors/7dc191daa81143d5.
Report an issue: GitHub.