WebSphere Commerce 7 | SoapUI | REST Calls over HTTPS | SSLHandshakeException

I tried to use SoapUI tool for testing my WebSphere Commerce REST Services. It is working fine with HTTP URLs and not the HTTPS URLS and it is showing the following exceptions in SoapUI,
Wed May 03 16:42:27 ART 2017:DEBUG:Attempt 1 to execute request
Wed May 03 16:42:27 ART 2017:DEBUG:Sending request: POST /wcs/resources/store/10151/guestidentity?updateCookies=true HTTP/1.1
Wed May 03 16:42:27 ART 2017:DEBUG:I/O error closing connection
   javax.net.ssl.SSLException: Connection has been shutdown: javax.net.ssl.SSLHandshakeException: Remote host closed connection during handshake
       at sun.security.ssl.SSLSocketImpl.checkEOF(Unknown Source)
       at sun.security.ssl.SSLSocketImpl.checkWrite(Unknown Source)
       at sun.security.ssl.AppOutputStream.write(Unknown Source)
    .......
    .......
   Caused by: java.io.EOFException: SSL peer shut down incorrectly
       at sun.security.ssl.InputRecord.read(Unknown Source)
       ... 27 more
Wed May 03 16:42:27 ART 2017:DEBUG:Closing the connection.
Wed May 03 16:42:27 ART 2017:DEBUG:Connection closed
Wed May 03 16:42:27 ART 2017:DEBUG:Connection shut down
Wed May 03 16:42:27 ART 2017:ERROR:Exception in request: javax.net.ssl.SSLHandshakeException: Remote host closed connection during handshake
Wed May 03 16:42:27 ART 2017:ERROR:An error occurred [Remote host closed connection during handshake], see error log for details
Wed May 03 16:42:27 ART 2017:INFO:Error getting response for [https://localhost.guestidentity:Request 1]; javax.net.ssl.SSLHandshakeException: Remote host closed connection during handshake.





And in my WebSphere Commerce logs, here is the error message,
[5/3/17 12:13:50:289 ART] 0000004e SSLHandshakeE E   SSLC0008E: Unable to initialize SSL connection.  Unauthorized access was denied or security settings have expired.  Exception is javax.net.ssl.SSLHandshakeException: Client requested protocol TLSv1 not enabled or not supported
    at com.ibm.jsse2.kb.z(kb.java:241)
    at com.ibm.jsse2.SSLEngineImpl.b(SSLEngineImpl.java:19)
    at com.ibm.jsse2.SSLEngineImpl.c(SSLEngineImpl.java:169)
    at com.ibm.jsse2.SSLEngineImpl.wrap(SSLEngineImpl.java:184)
    at javax.net.ssl.SSLEngine.wrap(SSLEngine.java:5)
    at com.ibm.ws.ssl.channel.impl.SSLUtils.handleHandshake(SSLUtils.java:744)
    at com.ibm.ws.ssl.channel.impl.SSLConnectionLink.readyInbound(SSLConnectionLink.java:566)
    at com.ibm.ws.ssl.channel.impl.SSLConnectionLink.ready(SSLConnectionLink.java:295)
    at com.ibm.ws.tcp.channel.impl.NewConnectionInitialReadCallback.sendToDiscriminators(NewConnectionInitialReadCallback.java:214)
    at com.ibm.ws.tcp.channel.impl.NewConnectionInitialReadCallback.complete(NewConnectionInitialReadCallback.java:113)
    at com.ibm.ws.tcp.channel.impl.AioReadCompletionListener.futureCompleted(AioReadCompletionListener.java:175)
    at com.ibm.io.async.AbstractAsyncFuture.invokeCallback(AbstractAsyncFuture.java:217)
    at com.ibm.io.async.AsyncChannelFuture.fireCompletionActions(AsyncChannelFuture.java:161)
    at com.ibm.io.async.AsyncFuture.completed(AsyncFuture.java:138)
    at com.ibm.io.async.ResultHandler.complete(ResultHandler.java:204)
    at com.ibm.io.async.ResultHandler.runEventProcessingLoop(ResultHandler.java:775)
    at com.ibm.io.async.ResultHandler$2.run(ResultHandler.java:905)
    at com.ibm.ws.util.ThreadPool$Worker.run(ThreadPool.java:1656)
Caused by: javax.net.ssl.SSLHandshakeException: Client requested protocol TLSv1 not enabled or not supported


Issue:
SoapUI is not enabled with TLS 1.2

Resolution to enabled the SoapUI with TLS 1.2,
1. Close the SoapUI
2. Open the following file, C:\Program Files\SmartBear\SoapUI-5.2.1\bin\SoapUI-5.2.1.vmoptions
3. Add the following lines at the end,
    -Dsun.security.ssl.allowUnsafeRenegotiation=true
    -Dsoapui.https.protocols=SSLv3,TLSv1.2

 
4. Open the SoapUI again and it should start working,


1 comment:

  1. I had same issue..It's working fine after adding those two lines...Thank you So much!!

    ReplyDelete

My Writings........

HCL Commerce v9.1 | Local Store Vs Remote Store

  Local Store Remote Store Project Type Migrated (Lift & Shift) - Newly Imp...