Soap ui SSl error ERROR:javax.net.ssl.SSLException: Received fatal alert: protocol_version
Asked Answered
D

4

6

I am seeing below error when I hit a service over https. I've tried changing TLS version in Soap ui VM options file as below:

-Dsoapui.https.protocols=TLSv1.0 -Dsoapui.https.protocols=TLSv1.2

and no luck. Please advise

    Thu Sep 07 11:32:47 BST 2017:ERROR:javax.net.ssl.SSLException: Received fatal alert: protocol_version
   javax.net.ssl.SSLException: Received fatal alert: protocol_version
    at sun.security.ssl.Alerts.getSSLException(Unknown Source)
    at sun.security.ssl.Alerts.getSSLException(Unknown Source)
    at sun.security.ssl.SSLSocketImpl.recvAlert(Unknown Source)
    at sun.security.ssl.SSLSocketImpl.readRecord(Unknown Source)
    at sun.security.ssl.SSLSocketImpl.performInitialHandshake(Unknown Source)
    at sun.security.ssl.SSLSocketImpl.writeRecord(Unknown Source)
    at sun.security.ssl.AppOutputStream.write(Unknown Source)
    at org.apache.http.impl.io.AbstractSessionOutputBuffer.flushBuffer(AbstractSessionOutputBuffer.java:131)
    at org.apache.http.impl.io.AbstractSessionOutputBuffer.flush(AbstractSessionOutputBuffer.java:138)
    at org.apache.http.impl.conn.LoggingSessionOutputBuffer.flush(LoggingSessionOutputBuffer.java:95)
    at org.apache.http.impl.AbstractHttpClientConnection.doFlush(AbstractHttpClientConnection.java:270)
    at org.apache.http.impl.AbstractHttpClientConnection.flush(AbstractHttpClientConnection.java:275)
    at org.apache.http.impl.conn.AbstractClientConnAdapter.flush(AbstractClientConnAdapter.java:197)
    at org.apache.http.protocol.HttpRequestExecutor.doSendRequest(HttpRequestExecutor.java:258)
    at com.eviware.soapui.impl.wsdl.support.http.HttpClientSupport$SoapUIHttpRequestExecutor.doSendRequest(HttpClientSupport.java:119)
    at org.apache.http.protocol.HttpRequestExecutor.execute(HttpRequestExecutor.java:123)
    at org.apache.http.impl.client.DefaultRequestDirector.tryExecute(DefaultRequestDirector.java:633)
    at org.apache.http.impl.client.DefaultRequestDirector.execute(DefaultRequestDirector.java:454)
    at org.apache.http.impl.client.AbstractHttpClient.execute(AbstractHttpClient.java:820)
    at org.apache.http.impl.client.AbstractHttpClient.execute(AbstractHttpClient.java:754)
    at com.eviware.soapui.impl.wsdl.support.http.HttpClientSupport$Helper.execute(HttpClientSupport.java:233)
    at com.eviware.soapui.impl.wsdl.support.http.HttpClientSupport.execute(HttpClientSupport.java:323)
    at com.eviware.soapui.impl.wsdl.submit.transports.http.HttpClientRequestTransport.submitRequest(HttpClientRequestTransport.java:297)
    at com.eviware.soapui.impl.wsdl.submit.transports.http.HttpClientRequestTransport.sendRequest(HttpClientRequestTransport.java:227)
    at com.eviware.soapui.impl.wsdl.WsdlSubmit.run(WsdlSubmit.java:119)
    at java.util.concurrent.Executors$RunnableAdapter.call(Unknown Source)
    at java.util.concurrent.FutureTask.run(Unknown Source)
    at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
    at java.lang.Thread.run(Unknown Source)

Note: SoapUI version is 5.3.0 and Java version is

Duvalier answered 7/9, 2017 at 10:39 Comment(3)
Try to use one version. either 1.0, or 1.1 or 1.2 but not together.Jackdaw
@Jackdaw yes, I've been trying one at a time.. but no luck..Duvalier
@Nareshsadu Did you manage to find a solution to this problem? I am seeing the same problem using the same version.Justen
Q
12

Please add -Dsoapui.https.protocols=SSLv3,TLSv1.2 to SoapUI-5.3.0.vmoptions file and it should solve the issue.

Qianaqibla answered 4/4, 2018 at 15:4 Comment(1)
javax.net.ssl.SSLHandshakeException: No appropriate protocol (protocol is disabled or cipher suites are inappropriate) - Getting this error after adding above linesSausage
T
4

For those still unable to get SoapUI to work after altering your vmoptions file, here is the next thing to try.

Accourding to SiKing, the issue is with the provided version of Java bundled with SoapUI. SoapUI is smart enough to look for a local version if it can't find its own, so simply renaming the jre folder solves the problem.

  1. Go to your SoapUI installation folder
  2. Rename the jre folder jre.ignore
  3. Restart SoapUI.

This solved my problem.

Turkestan answered 5/2, 2019 at 22:12 Comment(0)
H
2

Fix SSL error when you run SOAP UI

I have faced the same issue with the following error javax.net.ssl.SSLException: Received fatal alert: protocol_version in SoapUI. But resolved by adding https.protocols system property in the file SoapUI-5.3.0.vmoptions

enter image description here

  • Open the file using Notepad.
  • Add this protocol at the bottom “-Dsoapui.https.protocols=SSLv3,TLSv1.2” and save the changes.
  • Close SOAP UI and relaunch. It works with no SSL error when you make API call. (Perform test ping call to check).

Add (-Dsoapui.https.protocols=SSLv3,TLSv1.2) in the VMOPTIONS file under the Bin folder. Eg:C:\Softwares\SoapUI-5.3.0\bin\SoapUI-5.3.0.vmoptions

-XX:MinHeapFreeRatio=20
-XX:MaxHeapFreeRatio=40
-Xms128m
-Xmx1000m
-Dsoapui.properties=soapui.properties
-Dsoapui.home=C:\Softwares\SoapUI-5.3.0/bin
-Dsoapui.ext.libraries=C:\Softwares\SoapUI-5.3.0/bin/ext
-Dsoapui.ext.listeners=C:\Softwares\SoapUI-5.3.0/bin/listeners
-Dsoapui.ext.actions=C:\Softwares\SoapUI-5.3.0/bin/actions
-Dwsi.dir=C:\Softwares\SoapUI-5.3.0/wsi-test-tools
-Djava.library.path=C:\Softwares\SoapUI-5.3.0/bin
-Djava.util.Arrays.useLegacyMergeSort=true
-splash:SoapUI-Spashscreen.png
-Dsoapui.https.protocols=SSLv3,TLSv1.2

Full error Log:

Mon Sep 14 07:47:30 CEST 2020:DEBUG:I/O error closing connection
   javax.net.ssl.SSLException: Connection has been shutdown: javax.net.ssl.SSLException: Received fatal alert: protocol_version
    at sun.security.ssl.SSLSocketImpl.checkEOF(Unknown Source)
    at sun.security.ssl.SSLSocketImpl.checkWrite(Unknown Source)
    at sun.security.ssl.AppOutputStream.write(Unknown Source)
    at org.apache.http.impl.io.AbstractSessionOutputBuffer.flushBuffer(AbstractSessionOutputBuffer.java:131)
    at org.apache.http.impl.io.AbstractSessionOutputBuffer.flush(AbstractSessionOutputBuffer.java:138)
    at org.apache.http.impl.conn.LoggingSessionOutputBuffer.flush(LoggingSessionOutputBuffer.java:95)
    at org.apache.http.impl.AbstractHttpClientConnection.doFlush(AbstractHttpClientConnection.java:270)
    at org.apache.http.impl.SocketHttpClientConnection.close(SocketHttpClientConnection.java:245)
    at org.apache.http.impl.conn.DefaultClientConnection.close(DefaultClientConnection.java:164)
    at org.apache.http.impl.conn.AbstractPooledConnAdapter.close(AbstractPooledConnAdapter.java:152)
    at org.apache.http.protocol.HttpRequestExecutor.closeConnection(HttpRequestExecutor.java:142)
    at org.apache.http.protocol.HttpRequestExecutor.execute(HttpRequestExecutor.java:129)
    at org.apache.http.impl.client.DefaultRequestDirector.tryExecute(DefaultRequestDirector.java:633)
    at org.apache.http.impl.client.DefaultRequestDirector.execute(DefaultRequestDirector.java:454)
    at org.apache.http.impl.client.AbstractHttpClient.execute(AbstractHttpClient.java:820)
    at org.apache.http.impl.client.AbstractHttpClient.execute(AbstractHttpClient.java:754)
    at com.eviware.soapui.impl.wsdl.support.http.HttpClientSupport$Helper.execute(HttpClientSupport.java:233)
    at com.eviware.soapui.impl.wsdl.support.http.HttpClientSupport.execute(HttpClientSupport.java:323)
    at com.eviware.soapui.impl.wsdl.submit.transports.http.HttpClientRequestTransport.submitRequest(HttpClientRequestTransport.java:297)
    at com.eviware.soapui.impl.wsdl.submit.transports.http.HttpClientRequestTransport.sendRequest(HttpClientRequestTransport.java:227)
    at com.eviware.soapui.impl.wsdl.WsdlSubmit.run(WsdlSubmit.java:119)
    at java.util.concurrent.Executors$RunnableAdapter.call(Unknown Source)
    at java.util.concurrent.FutureTask.run(Unknown Source)
    at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
    at java.lang.Thread.run(Unknown Source)
   Caused by: javax.net.ssl.SSLException: Received fatal alert: protocol_version
    at sun.security.ssl.Alerts.getSSLException(Unknown Source)
    at sun.security.ssl.Alerts.getSSLException(Unknown Source)
    at sun.security.ssl.SSLSocketImpl.recvAlert(Unknown Source)
    at sun.security.ssl.SSLSocketImpl.readRecord(Unknown Source)
    at sun.security.ssl.SSLSocketImpl.performInitialHandshake(Unknown Source)
    at sun.security.ssl.SSLSocketImpl.writeRecord(Unknown Source)
    at sun.security.ssl.AppOutputStream.write(Unknown Source)
    at org.apache.http.impl.io.AbstractSessionOutputBuffer.flushBuffer(AbstractSessionOutputBuffer.java:131)
    at org.apache.http.impl.io.AbstractSessionOutputBuffer.write(AbstractSessionOutputBuffer.java:151)
    at org.apache.http.impl.conn.LoggingSessionOutputBuffer.write(LoggingSessionOutputBuffer.java:74)
    at org.apache.http.impl.io.ContentLengthOutputStream.write(ContentLengthOutputStream.java:114)
    at org.apache.http.impl.io.ContentLengthOutputStream.write(ContentLengthOutputStream.java:120)
    at org.apache.http.entity.ByteArrayEntity.writeTo(ByteArrayEntity.java:68)
    at org.apache.http.entity.HttpEntityWrapper.writeTo(HttpEntityWrapper.java:96)
    at org.apache.http.impl.client.EntityEnclosingRequestWrapper$EntityWrapper.writeTo(EntityEnclosingRequestWrapper.java:108)
    at org.apache.http.impl.entity.EntitySerializer.serialize(EntitySerializer.java:120)
    at org.apache.http.impl.AbstractHttpClientConnection.sendRequestEntity(AbstractHttpClientConnection.java:263)
    at org.apache.http.impl.conn.AbstractClientConnAdapter.sendRequestEntity(AbstractClientConnAdapter.java:227)
    at org.apache.http.protocol.HttpRequestExecutor.doSendRequest(HttpRequestExecutor.java:255)
    at com.eviware.soapui.impl.wsdl.support.http.HttpClientSupport$SoapUIHttpRequestExecutor.doSendRequest(HttpClientSupport.java:119)
    at org.apache.http.protocol.HttpRequestExecutor.execute(HttpRequestExecutor.java:123)
    ... 14 more
Mon Sep 14 07:47:30 CEST 2020:DEBUG:Closing the connection.
Mon Sep 14 07:47:30 CEST 2020:DEBUG:Connection closed
Mon Sep 14 07:47:30 CEST 2020:DEBUG:Connection shut down
Mon Sep 14 07:47:30 CEST 2020:ERROR:Exception in request: javax.net.ssl.SSLException: Received fatal alert: protocol_version
Mon Sep 14 07:47:30 CEST 2020:ERROR:An error occurred [Received fatal alert: protocol_version], see error log for details
Mon Sep 14 07:47:30 CEST 2020:INFO:Error getting response for [ScheduleSoap11.SendScheduleMessage:Request 1]; javax.net.ssl.SSLException: Received fatal alert: protocol_version

@See

Hatchel answered 14/9, 2020 at 6:48 Comment(0)
O
0

You can configure supported versions of SSL in your SoapUI-5.3.1.vmoptions file, by adding a line e.g.:

-Dsoapui.https.protocols=SSLv3,TLSv1.2

Overdraft answered 22/11, 2018 at 0:55 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.