{"record":{"id":"b9222707189ecf69","repo":"alibaba/canal","slug":"requestpost-https-remote-error-request","errorCode":null,"errorMessage":"requestPost(Https) remote error, request : {}","messagePattern":"requestPost\\(Https\\) remote error, request : (.+?)","errorType":"exception","errorClass":"RuntimeException","httpStatus":null,"severity":"error","filePath":"parse/src/main/java/com/alibaba/otter/canal/parse/inbound/mysql/rds/HttpHelper.java","lineNumber":173,"sourceCode":"                .setSocketTimeout(timeout)\n                .build();\n            httpGet = new HttpGet(uri);\n            HttpClientContext context = HttpClientContext.create();\n            context.setRequestConfig(config);\n            response = httpClient.execute(httpGet, context);\n            int statusCode = response.getStatusLine().getStatusCode();\n            if (statusCode == HttpStatus.SC_OK) {\n                return EntityUtils.toString(response.getEntity());\n            } else {\n                String errorMsg = EntityUtils.toString(response.getEntity());\n                throw new RuntimeException(\"requestGet remote error, url=\" + uri.toString() + \", code=\" + statusCode\n                                           + \", error msg=\" + errorMsg);\n            }\n        } catch (Throwable t) {\n            long end = System.currentTimeMillis();\n            long cost = end - start;\n            String curlRequest = getCurlRequest(url, cookieStore, params, cost);\n            throw new RuntimeException(\"requestPost(Https) remote error, request : \" + curlRequest, t);\n        } finally {\n            long end = System.currentTimeMillis();\n            long cost = end - start;\n            printCurlRequest(url, null, null, cost);\n            if (response != null) {\n                try {\n                    response.close();\n                } catch (IOException e) {\n                }\n            }\n            if (httpGet != null) {\n                httpGet.releaseConnection();\n            }\n        }\n    }\n\n    private static String postIgnoreCerf(String url, CookieStore cookieStore, Map<String, String> params, int timeout) {\n        long start = System.currentTimeMillis();","sourceCodeStart":155,"sourceCodeEnd":191,"githubUrl":"https://github.com/alibaba/canal/blob/87be50e87686a3e8af08c368d0e1ffd1f59eb04a/parse/src/main/java/com/alibaba/otter/canal/parse/inbound/mysql/rds/HttpHelper.java#L155-L191","documentation":"Thrown by the catch (Throwable t) block in getIgnoreCerf() as an outer wrapper for ANY exception during the HTTPS GET. Note: the message incorrectly says 'requestPost(Https)' even though this method performs a GET — this is a copy-paste bug in the source. The original exception is attached as the cause and a curl-equivalent string is included.","triggerScenarios":"Any Throwable during getIgnoreCerf(): the inner non-200 status throw (error 422), SSL handshake failure despite certificate bypass, connection timeout, socket read timeout, or network unreachable. The misleading 'requestPost' label can cause confusion during debugging.","commonSituations":"HTTPS connection timeout to RDS endpoint; TLS version mismatch (server requires TLSv1.2+ but client default is lower); firewall blocking outbound 443; transient network blips during RDS binlog file listing.","solutions":["Look at the cause exception to find the real failure — do not be misled by the 'requestPost' text, this is actually a GET operation.","If cause is SSLException, ensure the JVM supports the TLS version required by RDS (TLSv1.2).","If cause is SocketTimeoutException, increase the timeout parameter.","If the cause is the inner RuntimeException (error 422), address the non-200 response per error 422 solutions."],"exampleFix":null,"handlingStrategy":"retry","validationCode":"// Validate URL is reachable before calling\nURI uri = new URI(httpsUrl);\nif (uri.getHost() == null || uri.getHost().isEmpty()) {\n    throw new IllegalArgumentException(\"Invalid RDS URL: \" + httpsUrl);\n}","typeGuard":null,"tryCatchPattern":"try {\n    String result = HttpHelper.get(httpsUrl, timeout);\n} catch (RuntimeException e) {\n    Throwable cause = e.getCause() != null ? e.getCause() : e;\n    // Note: message says 'requestPost' but this is actually a GET — do not be misled\n    if (cause instanceof javax.net.ssl.SSLException) {\n        // TLS issue\n    }\n}","preventionTips":["Be aware that the error message says 'requestPost(Https)' but this path is triggered by GET requests — check the cause.","Ensure JVM supports TLSv1.2 which RDS requires.","Verify outbound port 443 is open from the canal host."],"tags":["https","rds","network","error-wrapping","misleading-message"],"backgroundTag":null,"analyzedSha":"87be50e87686a3e8af08c368d0e1ffd1f59eb04a","analyzedAt":"2026-08-14T04:30:11.918Z","schemaVersion":2},"datasetVersion":"2026-08-14T05:17:29.042Z"}