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

Document ID : KB000046930
Last Modified Date : 14/02/2018
Show Technical Document Details

Problem: 

   We are testing a SSL enabled RESTfull 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)

Cause: 

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

Resolution:

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

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