35

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)

katrin
  • 1,167
  • 1
  • 13
  • 24
  • 1
    It may be useful for somebody: issue doesn't occur if start SoapUI from ${SOAPUI_HOME}/bin/SoapUI.bat – katrin Jun 21 '11 at 08:50
  • 1
    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 May 14 '13 at 14:13
  • 1
    Note that there is also a per request timeout that overrides the global setting. In the left bottom pane: "Request Properties" – David Balažic Aug 03 '15 at 21:16

5 Answers5

57

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

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

Cengiz
  • 4,898
  • 6
  • 45
  • 72
23

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

thomdask
  • 967
  • 1
  • 9
  • 18
7

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

Bandham Manikanta
  • 1,273
  • 13
  • 18
JeSa
  • 419
  • 4
  • 10
7

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.

Steve Miskiewicz
  • 1,044
  • 1
  • 10
  • 20
  • 2
    "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. – рüффп May 24 '12 at 08:45
  • 1
    http://www.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. – Steve Miskiewicz May 25 '12 at 01:43
  • 3
    In fact I noticed there is a socketTimeout setting in the testCase Option as well: [forum entry here](http://www.soapui.org/forum/viewtopic.php?f=2&t=10912&p=27494&hilit=socket+timeout&sid=9576267b5cb2f3a7d4b36f6beae52cbe#p27562). It is not very well documented... – рüффп May 25 '12 at 14:17
  • 1
    This advice only helps if your server is very slow. If it works normally, the timeout shouldn't matter. – mcv May 14 '13 at 14:11
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.

Rima
  • 465
  • 4
  • 11