{"record":{"id":"6ba67c6cabada241","repo":"apache/seatunnel","slug":"d-request-http-failed","errorCode":null,"errorMessage":"[%d] request http failed","messagePattern":"\\[(.+?)\\] request http failed","errorType":"console","errorClass":null,"httpStatus":null,"severity":"warning","filePath":"seatunnel-connectors-v2/connector-http/connector-http-base/src/main/java/org/apache/seatunnel/connectors/seatunnel/http/client/HttpClientProvider.java","lineNumber":108,"sourceCode":"\n    private Retryer<CloseableHttpResponse> buildRetryer(HttpParameter httpParameter) {\n        if (httpParameter.getRetry() < 1) {\n            return RetryerBuilder.<CloseableHttpResponse>newBuilder().build();\n        }\n        return RetryerBuilder.<CloseableHttpResponse>newBuilder()\n                .retryIfException(ex -> ExceptionUtils.indexOfType(ex, IOException.class) != -1)\n                .withStopStrategy(StopStrategies.stopAfterAttempt(httpParameter.getRetry()))\n                .withWaitStrategy(\n                        WaitStrategies.fibonacciWait(\n                                httpParameter.getRetryBackoffMultiplierMillis(),\n                                httpParameter.getRetryBackoffMaxMillis(),\n                                TimeUnit.MILLISECONDS))\n                .withRetryListener(\n                        new RetryListener() {\n                            @Override\n                            public <V> void onRetry(Attempt<V> attempt) {\n                                if (attempt.hasException()) {\n                                    log.warn(\n                                            String.format(\n                                                    \"[%d] request http failed\",\n                                                    attempt.getAttemptNumber()),\n                                            attempt.getExceptionCause());\n                                }\n                            }\n                        })\n                .build();\n    }\n\n    public HttpResponse execute(\n            String url,\n            String method,\n            Map<String, String> headers,\n            Map<String, String> params,\n            String body,\n            boolean keepParamsAsForm)\n            throws Exception {","sourceCodeStart":90,"sourceCodeEnd":126,"githubUrl":"https://github.com/apache/seatunnel/blob/cf67b549a7a6c35fa0beb12d83c62892427ea919/seatunnel-connectors-v2/connector-http/connector-http-base/src/main/java/org/apache/seatunnel/connectors/seatunnel/http/client/HttpClientProvider.java#L90-L126","documentation":"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).","triggerScenarios":"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.","commonSituations":"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.","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."],"exampleFix":"// before\nretryer.call(() -> client.execute(url, request), stopStrategy);\n// after\n// raise timeouts so transient slowness does not consume retry attempts\n.setConnectionTimeoutMs(60000)\n.setRequestTimeoutMs(120000)","handlingStrategy":"retry","validationCode":"// pre-check endpoint reachability before job submission\nnew URL(url).toURI(); // validate URL format\nProcess p = Runtime.getRuntime().exec(new String[]{\"curl\",\"-sS\",\"-o\",\"/dev/null\",\"-w\",\"%{http_code}\",url});","typeGuard":null,"tryCatchPattern":"try {\n    retryer.call(callable);\n} catch (RetryException e) {\n    Throwable cause = e.getCause();\n    LOG.error(\"HTTP request failed after all retry attempts\", cause);\n    throw new RuntimeException(\"HTTP request failed after retries\", cause);\n} catch (ExecutionException e) {\n    throw new RuntimeException(\"HTTP request failed\", e.getCause());\n}","preventionTips":["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."],"tags":["http","retry","network"],"backgroundTag":"http-request-failed","analyzedSha":"cf67b549a7a6c35fa0beb12d83c62892427ea919","analyzedAt":"2026-09-10T21:44:55.265Z","contentChangedAt":"2026-09-10T21:44:55.265Z","schemaVersion":2},"datasetVersion":"2026-09-14T11:17:12.474Z"}