App is facing intermittent SSL handshake error "javax.net.ssl.SSLException: Couldn't kickstart handshaking"
search cancel

App is facing intermittent SSL handshake error "javax.net.ssl.SSLException: Couldn't kickstart handshaking"

book

Article ID: 298272

calendar_today

Updated On:

Products

VMware Tanzu Application Service for VMs

Issue/Introduction

An app running in TAS accessing an external endpoint in a high load period, intermitenttly logs
 
javax.net.ssl.SSLException: Couldn't kickstart handshaking

When enabling SSL debug logs in Java by setting JAVA_OPTS as follows,
 
cf set-env <APP_NAME> JAVA_OPTS "-Djavax.net.debug=ssl"

you see these lines 
 
2023-06-06T08:03:41.272-04:00 [APP/PROC/WEB/0] [ERR] javax.net.ssl|SEVERE|1F|http-nio-8080-exec-1|2023-06-06 12:03:41.271 UTC|TransportContext.java:316|Fatal (HANDSHAKE_FAILURE): Couldn't kickstart handshaking (

2023-06-06T08:03:41.272-04:00 [APP/PROC/WEB/0] [ERR] "throwable" : {

2023-06-06T08:03:41.272-04:00 [APP/PROC/WEB/0] [ERR] java.net.SocketException: Connection reset

2023-06-06T08:03:41.272-04:00 [APP/PROC/WEB/0] [ERR] at java.net.SocketOutputStream.socketWrite(SocketOutputStream.java:115)


Environment

Product Version: 2.11

Resolution

The logs show that the connection has been reset by the other end or a device in the middle and, since it happens intermittently, it usually occurs due to flow control on remote side or any device in the middle. E.g: a proxy in your own network is hitting the max connection limit.

A good troubleshooting method would be to trace the packets through the network to identify in which device the connection is reset.