35
votes

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)

5
It may be useful for somebody: issue doesn't occur if start SoapUI from ${SOAPUI_HOME}/bin/SoapUI.bat - katrin
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. - mcv
Note that there is also a per request timeout that overrides the global setting. In the left bottom pane: "Request Properties" - David Balažic

5 Answers

58
votes

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

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

23
votes

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

8
votes

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

7
votes

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.

0
votes

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.