apache/seatunnel · warning
[%d] request http failed
Error message
[%d] request http failed
What it means
HttpClientProvider uses Guava Retryer to execute HTTP requests. When an attempt fails with an exception, the RetryListener's onRetry callback logs this warning with the attempt number and the underlying exception. It is not the terminal failure itself — it signals that a request attempt failed and the retryer will try again (until retries are exhausted, after which the last exception propagates).
Source
Thrown at seatunnel-connectors-v2/connector-http/connector-http-base/src/main/java/org/apache/seatunnel/connectors/seatunnel/http/client/HttpClientProvider.java:108
private Retryer<CloseableHttpResponse> buildRetryer(HttpParameter httpParameter) {
if (httpParameter.getRetry() < 1) {
return RetryerBuilder.<CloseableHttpResponse>newBuilder().build();
}
return RetryerBuilder.<CloseableHttpResponse>newBuilder()
.retryIfException(ex -> ExceptionUtils.indexOfType(ex, IOException.class) != -1)
.withStopStrategy(StopStrategies.stopAfterAttempt(httpParameter.getRetry()))
.withWaitStrategy(
WaitStrategies.fibonacciWait(
httpParameter.getRetryBackoffMultiplierMillis(),
httpParameter.getRetryBackoffMaxMillis(),
TimeUnit.MILLISECONDS))
.withRetryListener(
new RetryListener() {
@Override
public <V> void onRetry(Attempt<V> attempt) {
if (attempt.hasException()) {
log.warn(
String.format(
"[%d] request http failed",
attempt.getAttemptNumber()),
attempt.getExceptionCause());
}
}
})
.build();
}
public HttpResponse execute(
String url,
String method,
Map<String, String> headers,
Map<String, String> params,
String body,
boolean keepParamsAsForm)
throws Exception {View on GitHub (pinned to cf67b549a7)
Solutions
- Inspect the logged attempt.getExceptionCause() to identify the root cause (timeout vs connect refused vs SSL).
- Verify the target URL, port, and proxy configuration in the HTTP source/sink options.
- Increase connection/request timeout options to accommodate slow endpoints.
- Check network connectivity from the SeaTunnel worker node (curl the endpoint) and DNS resolution.
- If failures persist across all attempts, address the underlying endpoint availability rather than raising retry counts.
Example fix
// before retryer.call(() -> client.execute(url, request), stopStrategy); // after // raise timeouts so transient slowness does not consume retry attempts .setConnectionTimeoutMs(60000) .setRequestTimeoutMs(120000)
Defensive patterns
Strategy: retry
Validate before calling
// pre-check endpoint reachability before job submission
new URL(url).toURI(); // validate URL format
Process p = Runtime.getRuntime().exec(new String[]{"curl","-sS","-o","/dev/null","-w","%{http_code}",url}); Try / catch
try {
retryer.call(callable);
} catch (RetryException e) {
Throwable cause = e.getCause();
LOG.error("HTTP request failed after all retry attempts", cause);
throw new RuntimeException("HTTP request failed after retries", cause);
} catch (ExecutionException e) {
throw new RuntimeException("HTTP request failed", e.getCause());
} Prevention
- Validate endpoint URL and credentials in job config before submission.
- Set realistic connection/read timeouts for the target API.
- Test connectivity from the SeaTunnel worker nodes, not just the client machine.
- Monitor the '[N] request http failed' warnings; repeated occurrences at high attempt numbers indicate systemic issues.
- Use a proxy option if workers lack direct egress to the endpoint.
When it happens
Trigger: Any exception thrown during an HTTP request executed through HttpClientProvider (connection timeouts, connect refused, socket read timeouts, SSL handshake failures, DNS resolution errors) while the retryer still has attempts remaining.
Common situations: Target endpoint unreachable or slow (firewall, wrong host/port, server overload); transient network flaps in containers/Kubernetes; missing or wrong proxy settings; TLS certificate issues; request timeout configured too low for a slow API.
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
- Failed to fetch metadata from Gravitino for metadata: %s
- fail get tableSchema:
- Failed to execute HTTP request to %s after %d attempts
- SEND_RESPONSE_FAILED
- REST_SERVICE_FAILED
AI-assisted analysis of apache/seatunnel@cf67b549a7 (2026-09-10).
Data as JSON: /api/errors/6ba67c6cabada241.
Report an issue: GitHub.