'Mule error "Remote host closed connection. Possible SSL/TLS handshake issue." on HTTP request

I would like to seek for your advice if you have any idea or you have already encountered this issue “SSL/TLS handshake Issue” ?

To give you a summary, we’re getting an error the error below when connecting to Coupa (ERP) through HTTP.

Remote host closed connection. Possible SSL/TLS handshake issue. Check protocols, cipher suites and certificate set up. Use  -Djavax.net.debug=ssl for further debugging.

We have several HTTP requests using the same HTTP config, but there’s this only one specific request that gives the said error. Also, this HTTP request works in postman. This occurs only in one Mule environment (UAT Environment). It works fine in our sandbox environment.

We are not sure whether the SSL connection/Handshake is closed on our end or server end.

If ever its on our end, how do we identify the fix for that?

If it’s on the server end, what should be the proof that we need to provide to them to say that the issue is on their end.



Solution 1:[1]

The server -Coupa in this case- is closing the connection just after it was opened by the client -a Mule application- probably before the client can send the HTTP request. The server could do this by any of a number of causes and the client does not receive any error messages or codes to indicate a reason. You will need to learn the reason from the server side.

Usual reasons are because an HTTPS connection doesn't match thee required ciphers suites or protocol versions accepted by the server, or because the client IP is not whitelisted. In those situations documentation from what's acceptable to the server side is useful. There could some other reasons that are known only to the server side.

A method to troubleshoot TLS connection issues is to do a traffic capture of the TCP packets, ideally from both sides, but if you don't control the server it will be only possible from the client. Another option if you are using HTTPS is to enable Java SSL Debug log in the Mule runtime to print the HTTPS connection information. You need to understand how to troubleshoot TLS to use these tools.

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1 aled