Soap UI:错误:java.net.SocketException:连接重置

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/42973954/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me): StackOverFlow

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-08-12 00:33:38  来源:igfitidea点击:

Soap UI: ERROR:java.net.SocketException: Connection reset

javasoapui

提问by ChanGan

I am getting ERROR:

我收到错误:

java.net.SocketException: Connection reset.

java.net.SocketException: 连接重置。

I have followed the below link to resolve the issue. But no luck..

我已按照以下链接解决此问题。但没有运气..

I have given the error logs below. Can any one look this and let me know how to resolve this issue?

我已经给出了下面的错误日志。任何人都可以看看这个并让我知道如何解决这个问题?

Thu Mar 23 16:11:51 IST 2017:ERROR:java.net.SocketException: Connection reset
   java.net.SocketException: Connection reset
    at java.net.SocketInputStream.read(Unknown Source)
    at java.net.SocketInputStream.read(Unknown Source)
    at sun.security.ssl.InputRecord.readFully(Unknown Source)
    at sun.security.ssl.InputRecord.read(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:113)
    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:247)
    at com.eviware.soapui.impl.wsdl.support.http.HttpClientSupport.execute(HttpClientSupport.java:362)
    at com.eviware.soapui.impl.wsdl.submit.transports.http.HttpClientRequestTransport.submitRequest(HttpClientRequestTransport.java:324)
    at com.eviware.soapui.impl.wsdl.submit.transports.http.HttpClientRequestTransport.sendRequest(HttpClientRequestTransport.java:237)
    at com.eviware.soapui.impl.wsdl.WsdlSubmit.run(WsdlSubmit.java:127)
    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)

采纳答案by ChanGan

By removing protocols TLS 1.0 in the registry works fine.

通过删除注册表中的协议 TLS 1.0 工作正常。

Invoke-WebRequest SSL fails?this post is useful to resolve this issue.

Invoke-WebRequest SSL 失败?这篇文章对解决这个问题很有用。

回答by Sumit Kumar

I think you are using company connection and company firewall is blocking the connection.

我认为您正在使用公司连接并且公司防火墙阻止了连接。

回答by SergiSPN

WINDOWS

视窗

Option 1:

选项1:

  1. find the following file on your computer (make sure you have write access to the file): C:\Program Files\SmartBear\SoapUI-5.2.1\bin\SoapUI-5.2.1.vmoptions

  2. Add the following line to the file:

  1. 在您的计算机上找到以下文件(确保您对该文件具有写权限): C:\Program Files\SmartBear\SoapUI-5.2.1\bin\SoapUI-5.2.1.vmoptions

  2. 将以下行添加到文件中:

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

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

  1. Run SoapUI with the .exe file (SoapUI-5.2.1.exe)
  1. 使用 .exe 文件 ( SoapUI-5.2.1.exe)运行 SoapUI

Option 2: (if option 1 does not work for you).

选项 2:(如果选项 1 不适合您)。

  1. Edit the following batch file on your computer (make sure you have write access to the file): C:\Program Files\SmartBear\SoapUI-5.2.1\bin\soapui.bat
  2. Add the following line to the file (after: if "%SOAPUI_HOME%" == "" goto START):
  1. 在您的计算机上编辑以下批处理文件(确保您对该文件具有写入权限): C:\Program Files\SmartBear\SoapUI-5.2.1\bin\soapui.bat
  2. 将以下行添加到文件中(之后:)if "%SOAPUI_HOME%" == "" goto START

set JAVA_OPTS=%JAVA_OPTS% -Dsoapui.https.protocols="SSLv3,TLSv1.2"

set JAVA_OPTS=%JAVA_OPTS% -Dsoapui.https.protocols="SSLv3,TLSv1.2"

  1. Run SoapUI with the batch file (soapui.bat)
  1. 使用批处理文件 ( soapui.bat)运行 SoapUI

MAC (OSX)

MAC (OSX)

The default install location for Mac is in the root Applications folder, and the vmoptions.txtfile is in there. Right-click the SOAPUI .app file (in the /Applications folder), and choose "Show Package Contents" to get to the internal files.

Mac 的默认安装位置在根应用程序文件夹中,vmoptions.txt文件就在那里。右键单击 SOAPUI .app 文件(在 /Applications 文件夹中),然后选择“显示包内容”以访问内部文件。

/Applications/SoapUI-X.X.X.app/Contents/vmoptions.txt

Add the following line to the vmoptions.txtfile:

将以下行添加到vmoptions.txt文件中:

-Dsoapui.https.protocols=TLSv1.2

LINUX

LINUX

  1. Edit: bin/SoapUI-5.3.0.vmoptionsin SoapUI directory

  2. Add the following line to the file:

  1. 编辑:bin/SoapUI-5.3.0.vmoptions在 SoapUI 目录中

  2. 将以下行添加到文件中:

-Dsoapui.https.protocols=TLSv1.2

-Dsoapui.https.protocols=TLSv1.2

I hope it helps.

我希望它有帮助。

回答by TomEberhard

For testing purposes only: If all else fails, you can also just use http instead of https. Just edit the url in the SoapUI window for the request.

仅用于测试目的:如果所有其他方法都失败了,您也可以只使用 http 而不是 https。只需在 SoapUI 窗口中编辑请求的 url。

回答by Krzysztof Cie?liński

Tried all solutions but nothing worked. It started to work after ignoring jre directory in SoapUI. So if above solutions won't work for you then try this:

尝试了所有解决方案,但没有任何效果。它在忽略 SoapUI 中的 jre 目录后开始工作。因此,如果上述解决方案对您不起作用,请尝试以下操作:

  1. Close SoapUI
  2. Go to SoapUi directory for example: C:\Program Files\SmartBear\SoapUI-5.3.0\
  3. Rename directory "jre" to "jre.ignore"
  4. Done. Open SoapUi and it should work now.
  1. 关闭 SoapUI
  2. 转到 SoapUi 目录,例如:C:\Program Files\SmartBear\SoapUI-5.3.0\
  3. 将目录“jre”重命名为“jre.ignore”
  4. 完毕。打开 SoapUi,它现在应该可以工作了。