We Are Going To Discuss About How to solve “I/O error on POST request” from restTemplate. So lets Start this Java Article.
How to solve “I/O error on POST request” from restTemplate
- How to solve “I/O error on POST request” from restTemplate
Hi Julia This quite feels like the protocol issue. The AWS is fully TLS 1.2 or higher supporting, but the client is not. The Rest Template if not configured otherwise, will start negotiation with TLS 1.0. You have to forcefully make the client to connect only with 1.2 or 1.3 protocol stacks.
- “I/O error on POST request” from restTemplate
Hi Julia This quite feels like the protocol issue. The AWS is fully TLS 1.2 or higher supporting, but the client is not. The Rest Template if not configured otherwise, will start negotiation with TLS 1.0. You have to forcefully make the client to connect only with 1.2 or 1.3 protocol stacks.
Solution 1
Hi Julia This quite feels like the protocol issue. The AWS is fully TLS 1.2 or higher supporting, but the client is not. The Rest Template if not configured otherwise, will start negotiation with TLS 1.0. You have to forcefully make the client to connect only with 1.2 or 1.3 protocol stacks.
SSLContext context = SSLContext.getInstance("TLSv1.2");
context.init(null, null, null);
CloseableHttpClient httpClient = HttpClientBuilder.create().setSSLContext(context)
.build();
HttpComponentsClientHttpRequestFactory factory = new HttpComponentsClientHttpRequestFactory(httpClient);
RestTemplate restTemplate = new RestTemplate(factory);
Original Author Of This Content
Solution 2
I/O error on POST request for "http://{ip}:{port}/face/emp"
It seems you do not set a valid host:port
Check your host
and reqUri
UriComponents uri = UriComponentsBuilder.fromHttpUrl(host+reqUri).build();
Original Author Of This Content
Conclusion
So This is all About This Tutorial. Hope This Tutorial Helped You. Thank You.