15

I am getting ERROR:

java.net.SocketException: Connection reset.

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)
3
  • Is that your client side exception? What does the server say ? Commented Mar 23, 2017 at 13:05
  • The same is working fine in browser. but when call from Soapui i am getting the error. Commented Mar 23, 2017 at 13:10
  • 1
    Please run your client with -Djavax.net.debug=ssl,handshake and post the result in your question. If your server is doing client authentication please also supply the relevant client-side settings. Commented Mar 27, 2017 at 5:16

6 Answers 6

22

WINDOWS

Option 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:

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

  1. Run SoapUI with the .exe file (SoapUI-5.2.1.exe)

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

  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):

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

  1. Run SoapUI with the batch file (soapui.bat)

MAC (OSX)

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

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

Add the following line to the vmoptions.txt file:

-Dsoapui.https.protocols=TLSv1.2

LINUX

  1. Edit: bin/SoapUI-5.3.0.vmoptions in SoapUI directory

  2. Add the following line to the file:

-Dsoapui.https.protocols=TLSv1.2

I hope it helps.

Sign up to request clarification or add additional context in comments.

4 Comments

Thanks - NB: I had to omit the speech marks in the .vmoptions file (Windows), like so: -Dsoapui.https.protocols=SSLv3,TLSv1.2
If you are using windows 7 (for example, if you use iisexpress for dev) you have to enable TLSv1.2 protocol. See: derekseaman.com/2010/06/…
Option1/Windows worked for me in SoapUI 5.3.0. However, I had to remove the quotes to make it work: -Dsoapui.https.protocols=SSLv3,TLSv1.2
Unfortunately neither option worked for me; with or without quotation marks.
3

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:

  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.

5 Comments

I don't understand why someone is downvoting this answer but this bug still occurs in new versions. Whole team of our developers had the sam issue. One week ago even my client had the same issue on Mac. Using default java instead of SoapUI java helps. Most likely mentioned issue can have multiple sources but better don't ignore this one because for me, my colleagues and my clients this solution always helps.
This actually works! Don't know why, but this was the only solution that worked.
When I rename the folder and restart SOAPUI, I get the message 'No JVM could be found on your system...' (SOAPUI 5.4.0)
@Roeland do you have java installed and set java home (system variables path)? It could be related with that.
Hi Krzysztof, I needed to install the 32 bit version instead on64 bit. However, now I still get the Connection Reset message
0

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

1 Comment

He already has a connection he has written to it, and he is reading from it. *Ergo the firewall isn't blocking it.
0

In my case, none of the suggestions above were worked, except for this one. (I've added only this line to SoapUI-X.X.X.vmoptions file located in SergiSPN's answer above)

-Djava.net.preferIPv4Stack=true

There must have been some sort of restriction for IPv6 in our company's infrastructure, which I had no idea what it was.

Comments

-1

By removing protocols TLS 1.0 in the registry works fine.

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

1 Comment

Could you please write a bit more detailed answer about "removing protocols in the registry"?
-2

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.

Comments

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.