SoapUI: ConnectException: Connection timed out:
Asked Answered
P

5

34

i try to send request via REST. I get success response when using firefox rest-client, but in SoapUI i get exception attached below. How to resolve this issue? Thanks.

java.net.ConnectException: Connection timed out: connect at java.net.PlainSocketImpl.socketConnect(Native Method) at java.net.PlainSocketImpl.doConnect(Unknown Source) at java.net.PlainSocketImpl.connectToAddress(Unknown Source) at java.net.PlainSocketImpl.connect(Unknown Source) at java.net.SocksSocketImpl.connect(Unknown Source) at java.net.Socket.connect(Unknown Source) at java.net.Socket.connect(Unknown Source) at java.net.Socket.(Unknown Source) at java.net.Socket.(Unknown Source) at org.apache.commons.httpclient.protocol.DefaultProtocolSocketFactory.createSocket(DefaultProtocolSocketFactory.java:80) at org.apache.commons.httpclient.protocol.DefaultProtocolSocketFactory.createSocket(DefaultProtocolSocketFactory.java:122) at org.apache.commons.httpclient.HttpConnection.open(HttpConnection.java:707) at com.eviware.soapui.impl.wsdl.support.http.SoapUIMultiThreadedHttpConnectionManager$HttpConnectionAdapter.open(SoapUIMultiThreadedHttpConnectionManager.java:1637) at org.apache.commons.httpclient.HttpMethodDirector.executeWithRetry(HttpMethodDirector.java:387) at org.apache.commons.httpclient.HttpMethodDirector.executeMethod(HttpMethodDirector.java:171) at org.apache.commons.httpclient.HttpClient.executeMethod(HttpClient.java:397) at com.eviware.soapui.impl.wsdl.submit.transports.http.HttpClientRequestTransport.sendRequest(HttpClientRequestTransport.java:202) at com.eviware.soapui.impl.wsdl.WsdlSubmit.run(WsdlSubmit.java:123) at java.util.concurrent.Executors$RunnableAdapter.call(Unknown Source) at java.util.concurrent.FutureTask$Sync.innerRun(Unknown Source) at java.util.concurrent.FutureTask.run(Unknown Source) at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(Unknown Source) at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source) at java.lang.Thread.run(Unknown Source)

Preoccupancy answered 20/6, 2011 at 15:8 Comment(3)
It may be useful for somebody: issue doesn't occur if start SoapUI from ${SOAPUI_HOME}/bin/SoapUI.batPreoccupancy
I've got the same problem: I get a timeout, while the server responds quickly when coworkers try it. My settings are identical to theirs. The only difference is that I'm on a Mac while they use Windows. This is in SoapUI 4.5.1.Filia
Note that there is also a per request timeout that overrides the global setting. In the left bottom pane: "Request Properties"Sarmiento
G
61

Default socket timeout is set to 60000 milliseconds. You can change it:

File -> Preferences -> HTTP Settings -> Socket Timeout

Gaberdine answered 13/12, 2012 at 14:59 Comment(0)
C
23

You can also set the value to 0 and then it doesn't time out. Tested it with SoapUI 4.5.0

Choose answered 28/6, 2012 at 11:27 Comment(0)
S
11

You can also set timeout for your request, it's on left bottom Request properties, that helped me (SoapUI 5.4.0)

enter image description here

Sciomancy answered 19/6, 2018 at 14:57 Comment(0)
W
8

I would try adjusting the socket timeout in SoapUI preferences. SoapUI has a standard timeout of 60000 milliseconds. I would try making that much larger to see if you have the same issue. This has fixed a timeout issue for myself before.

You can also edit this setting directly in the soapui-settings.xml

    <con:setting id="HttpSettings@socket_timeout">120000</con:setting>

If this doesn't help, try asking on the eviware forum.

Waite answered 19/7, 2011 at 1:51 Comment(4)
"SoapUI has a standard timeout of 60000"; are you sure? Because I have a timeout occuring at 10 seconds only and we did not set that value anywhere.Groundhog
soapui.org/forum/viewtopic.php?f=5&t=1872 SmartBear support says its 60 seconds (60000 milliseconds). Of course that was from 2009. You can check the preferences, the forum post will show you where to find it in the documentation.Waite
In fact I noticed there is a socketTimeout setting in the testCase Option as well: forum entry here. It is not very well documented...Groundhog
This advice only helps if your server is very slow. If it works normally, the timeout shouldn't matter.Filia
T
0

Apart from adjusting timeouts, if this issue still persists then it could be because few of the plugins needed by SoapUI are not loaded. Because these plugins are present in some other place that require permission to access.

If u check your logs u can find this trace :

java.lang.ClassNotFoundException: com.eviware.soapui.plugins.auto.factories.AutoImportMethodFactory
    at java.net.URLClassLoader$1.run(Unknown Source)
    at java.net.URLClassLoader$1.run(Unknown Source)
    at java.security.AccessController.doPrivileged(Native Method)
    at java.net.URLClassLoader.findClass(Unknown Source)

The problem does not occur when starting the SoapUI directly from bin

Also you can run with Administrative privileges.

Trencherman answered 22/4, 2016 at 11:9 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.