Get hands-on experience with 20+ free Google Cloud products and $300 in free credit for new customers.

Determine TLS Handshake Failed vs Server Unavailable

Not applicable

I have configured my proxy with 2-way SSL. When TLS hand shake failed, I get error Service temporarily unavailable by default and its default fault.name is "ServiceUnavailable". My usecase would like to change the default error message when TLS Handshake is failed. Because, "ServiceUnavailable" is generic even it is applicable when Server goes down and etc. Is there anyway i can determine the TLS handshake failed and customize the error message. When i see the system log, it shows Hand Shake failed message. But, i need to get something like that in Edge UI as well in order to determine the TLS Handshake failed.

com.apigee.messaging.adaptors.http.flow.data.LBTargetRequestSender$ResponseListenerForLBTarget$1.onException(LBTargetRequestSender.java:469)
[http-adaptor-1.0.0.jar:na]
        at
com.apigee.protocol.http.HTTPClient$Context.handshakeFailed(HTTPClient.java:1286)
[http-1.0.0.jar:na]
        at
com.apigee.nio.SSLTransport.run(SSLTransport.java:156) [nio-1.0.0.jar:na]
        at
com.apigee.nio.SSLTransport.process(SSLTransport.java:488) [nio-1.0.0.jar:na]
        at
com.apigee.nio.ClientChannel.process(ClientChannel.java:263) [nio-1.0.0.jar:na]
        at
com.apigee.nio.NIOSelector$SelectedIterator.findNext(NIOSelector.java:479)
[nio-1.0.0.jar:na]
        at
com.apigee.nio.NIOSelector$SelectedIterator.findNext(NIOSelector.java:449)
[nio-1.0.0.jar:na]
        at
com.apigee.nio.util.NonNullIterator.computeNext(NonNullIterator.java:16)
[nio-1.0.0.jar:na]
        at
com.apigee.nio.util.AbstractIterator.hasNext(AbstractIterator.java:36)
[nio-1.0.0.jar:na]
        at
com.apigee.nio.NIOSelector$2.findNext(NIOSelector.java:266) [nio-1.0.0.jar:na]
        at
com.apigee.nio.NIOSelector$2.findNext(NIOSelector.java:256) [nio-1.0.0.jar:na]
        at com.apigee.nio.util.NonNullIterator.computeNext(NonNullIterator.java:16)
[nio-1.0.0.jar:na]
        at
com.apigee.nio.util.AbstractIterator.hasNext(AbstractIterator.java:36)
[nio-1.0.0.jar:na]
        at
com.apigee.nio.handlers.NIOThread.run(NIOThread.java:59) [nio-1.0.0.jar:na]
Solved Solved
1 5 765
1 ACCEPTED SOLUTION

Not applicable

Look the variable "fault.subcategory" which will have value of "IOError" in case of TLS handshake Failed. Otherwise, it would be the value of "Connection". So, using value of "fault.subcategory", can determine the service unavailable because of TLS or General connection issue and based on that, we can customized the Fault.

View solution in original post

5 REPLIES 5