This might be a bit of a long shot, but I'm hoping someone here can help me. I have a java application running on a jboss backend in a debian linux server. Incoming communications are routed to the correct backend by haproxy on another server.
One of the application's jobs is to provide shipment information to the user. It does this by sending a POST request to a third party API provided by UPS (https://www.ups.com/us/en/services/technology-integration/online-tools-tracking.page?) and displaying the results. Recently, the tracking feature in our application started throwing errors. Digging into the logs for our application I found this:
2021-10-28 10:00:00,142 ERROR [STDERR] Caused by: javax.net.ssl.SSLHandshakeException: Received fatal alert: handshake_failure
2021-10-28 10:00:00,142 ERROR [STDERR] at sun.security.ssl.Alerts.getSSLException(Alerts.java:192)
2021-10-28 10:00:00,142 ERROR [STDERR] at sun.security.ssl.Alerts.getSSLException(Alerts.java:154)
2021-10-28 10:00:00,142 ERROR [STDERR] at sun.security.ssl.SSLSocketImpl.recvAlert(SSLSocketImpl.java:1959)
2021-10-28 10:00:00,142 ERROR [STDERR] at sun.security.ssl.SSLSocketImpl.readRecord(SSLSocketImpl.java:1077)
2021-10-28 10:00:00,142 ERROR [STDERR] at sun.security.ssl.SSLSocketImpl.performInitialHandshake(SSLSocketImpl.java:1312)
2021-10-28 10:00:00,142 ERROR [STDERR] at sun.security.ssl.SSLSocketImpl.writeRecord(SSLSocketImpl.java:702)
2021-10-28 10:00:00,142 ERROR [STDERR] at sun.security.ssl.AppOutputStream.write(AppOutputStream.java:122)
2021-10-28 10:00:00,142 ERROR [STDERR] at java.io.BufferedOutputStream.flushBuffer(BufferedOutputStream.java:82)
2021-10-28 10:00:00,142 ERROR [STDERR] at java.io.BufferedOutputStream.flush(BufferedOutputStream.java:140)
2021-10-28 10:00:00,142 ERROR [STDERR] at org.apache.commons.httpclient.methods.StringRequestEntity.writeRequest(Unknown Source)
2021-10-28 10:00:00,142 ERROR [STDERR] at org.apache.commons.httpclient.methods.EntityEnclosingMethod.writeRequestBody(Unknown Source)
2021-10-28 10:00:00,142 ERROR [STDERR] at org.apache.commons.httpclient.HttpMethodBase.writeRequest(Unknown Source)
2021-10-28 10:00:00,142 ERROR [STDERR] at org.apache.commons.httpclient.HttpMethodBase.execute(Unknown Source)
2021-10-28 10:00:00,142 ERROR [STDERR] at org.apache.commons.httpclient.HttpMethodDirector.executeWithRetry(Unknown Source)
2021-10-28 10:00:00,142 ERROR [STDERR] at org.apache.commons.httpclient.HttpMethodDirector.executeMethod(Unknown Source)
2021-10-28 10:00:00,143 ERROR [STDERR] at org.apache.commons.httpclient.HttpClient.executeMethod(Unknown Source)
2021-10-28 10:00:00,143 ERROR [STDERR] at org.apache.commons.httpclient.HttpClient.executeMethod(Unknown Source)
From what I can tell, this is a problem with the ssl request. For some reason, our application is rejecting the response from the API as insecure. Unfortunately, I'm a bit lost on what to do to actually go about fixing this. How do I determine exactly where the failure is happening? How do I figure out what changes I need to make on my application and/or proxy server to get communication working between my application and the external API?