Testing SSL enabled Restful service from Devtest Workstation with error as "SSLHandshakeException: Remote host closed connection during handshake"
search cancel

Testing SSL enabled Restful service from Devtest Workstation with error as "SSLHandshakeException: Remote host closed connection during handshake"

book

Article ID: 46930

calendar_today

Updated On:

Products

CA Application Test CA Continuous Application Insight (PathFinder) Service Virtualization

Issue/Introduction

Testing a SSL enabled RESTful service from DevTest Workstation and getting below error: 

===========================================================================

| HTTP

============================================================================

| Message:     javax.net.ssl.SSLHandshakeException: Remote host closed connection during handshake

----------------------------------------------------------------------------

| Trapped Exception: Remote host closed connection during handshake

| Trapped Message:   javax.net.ssl.SSLHandshakeException: Remote host closed connection during handshake

----------------------------------------------------------------------------

STACK TRACE

javax.net.ssl.SSLHandshakeException: Remote host closed connection during handshake

at sun.security.ssl.SSLSocketImpl.readRecord(Unknown Source)

at sun.security.ssl.SSLSocketImpl.performInitialHandshake(Unknown Source)

at sun.security.ssl.SSLSocketImpl.startHandshake(Unknown Source)

at sun.security.ssl.SSLSocketImpl.startHandshake(Unknown Source)

at org.apache.http.conn.ssl.SSLSocketFactory.connectSocket(SSLSocketFactory.java:535)

at org.apache.http.conn.ssl.SSLSocketFactory.connectSocket(SSLSocketFactory.java:403)

at org.apache.http.impl.conn.DefaultClientConnectionOperator.openConnection(DefaultClientConnectionOperator.java:177)

at org.apache.http.impl.conn.ManagedClientConnectionImpl.open(ManagedClientConnectionImpl.java:304)

at org.apache.http.impl.client.DefaultRequestDirector.tryConnect(DefaultRequestDirector.java:611)

at org.apache.http.impl.client.DefaultRequestDirector.execute(DefaultRequestDirector.java:446)

at org.apache.http.impl.client.AbstractHttpClient.doExecute(AbstractHttpClient.java:863)

at org.apache.http.impl.client.CloseableHttpClient.execute(CloseableHttpClient.java:72)

at com.itko.lisa.test.CommTrans.doSend(CommTrans.java:1025)

at com.itko.lisa.test.CommTrans.send(CommTrans.java:814)

at com.itko.lisa.test.CommTrans.sendPOST(CommTrans.java:792)

at com.itko.lisa.ws.rest.RESTNode.doSend(RESTNode.java:214)

at com.itko.lisa.ws.rest.RESTNode.doWebTrans(RESTNode.java:168)

at com.itko.lisa.ws.rest.RESTNodeBase.execute(RESTNodeBase.java:362)

at com.itko.lisa.ws.rest.RESTNodeEditor$4.doCallback(RESTNodeEditor.java:895)

at com.itko.util.swing.panels.ProcessingDialog$2.run(ProcessingDialog.java:194)

at java.lang.Thread.run(Unknown Source)

Caused by: java.io.EOFException: SSL peer shut down incorrectly

at sun.security.ssl.InputRecord.read(Unknown Source)

 

Environment

All supported DevTest releases.

Cause

If JAVA defaults to TLS 1.0, which can cause this error when that protocol is not accepted.

Resolution

Add the below property in Workstation.vmoptions file and restart the Workstation. 

-Dhttps.protocols=TLSv1.1,TLSv1.2

 

Additional Information

As of DevTest 10.7.0 this is set by default in the lisa.properties file:

https.protocols=TLSv1.2