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

允我心安 提交于 2020-12-08 08:03:11

问题


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


回答1:


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




回答2:


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.




回答3:


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




回答4:


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

  • 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

  • Java: javax.net.ssl.SSLException: Received fatal alert: protocol_version
  • Apache Tomcat: javax.net.ssl.SSLHandshakeException: No appropriate protocol 8 How to fix SSL error when you run SOAP UI | Adobe Sign


来源:https://stackoverflow.com/questions/46094256/soap-ui-ssl-error-errorjavax-net-ssl-sslexception-received-fatal-alert-protoc

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!