SoapUI:ConnectException:连接超时:

发布于 2024-11-16 10:09:07 字数 1878 浏览 3 评论 0原文

我尝试通过 REST 发送请求。 使用 Firefox Rest-Client 时我得到成功响应, 但在 SoapUI 中我得到下面附加的异常。 如何解决这个问题? 谢谢。

java.net.ConnectException:连接 超时:连接于 java.net.PlainSocketImpl.socketConnect(本机 方法)在 java.net.PlainSocketImpl.doConnect(未知 来源)于 java.net.PlainSocketImpl.connectToAddress(未知 来源)于 java.net.PlainSocketImpl.connect(未知 来源)于 java.net.SocksSocketImpl.connect(未知 来源)于 java.net.Socket.connect(未知 来源)于 java.net.Socket.connect(未知 来源)于 java.net.Socket。(来源不明) 在 java.net.Socket 处。(未知 来源)于 org.apache.commons.httpclient.protocol.DefaultProtocolSocketFactory.createSocket(DefaultProtocolSocketFactory.java:80) 在 org.apache.commons.httpclient.protocol.DefaultProtocolSocketFactory.createSocket(DefaultProtocolSocketFactory.java:122) 在 org.apache.commons.httpclient.HttpConnection.open(HttpConnection.java:707) 在 com.eviware.soapui.impl.wsdl.support.http.SoapUIMultiThreadedHttpConnectionManager$HttpConnectionAdapter.open(SoapUIMultiThreadedHttpConnectionManager.java:1637) 在 org.apache.commons.httpclient.HttpMethodDirector.executeWithRetry(HttpMethodDirector.java:387) 在 org.apache.commons.httpclient.HttpMethodDirector.executeMethod(HttpMethodDirector.java:171) 在 org.apache.commons.httpclient.HttpClient.executeMethod(HttpClient.java:397) 在 com.eviware.soapui.impl.wsdl.submit.transports.http.HttpClientRequestTransport.sendRequest(HttpClientRequestTransport.java:202) 在 com.eviware.soapui.impl.wsdl.WsdlSubmit.run(WsdlSubmit.java:123) 在 java.util.concurrent.Executors$RunnableAdapter.call(未知 来源)于 java.util.concurrent.FutureTask$Sync.innerRun(未知 来源)于 java.util.concurrent.FutureTask.run(未知 来源)于 java.util.concurrent.ThreadPoolExecutor$Worker.runTask(未知 来源)于 java.util.concurrent.ThreadPoolExecutor$Worker.run(未知 来源)于 java.lang.Thread.run(来源不明)

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)

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(5

謸气贵蔟 2024-11-23 10:09:07

默认套接字超时设置为 60000 毫秒。
您可以更改它:

文件->首选项-> HTTP 设置 ->套接字超时

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

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

沩ん囻菔务 2024-11-23 10:09:07

您也可以将该值设置为 0,这样就不会超时。
使用 SoapUI 4.5.0 进行测试

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

时光礼记 2024-11-23 10:09:07

您还可以为请求设置超时,它位于左下请求属性,这对我有帮助(SoapUI 5.4.0)

在此处输入图像描述

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

-柠檬树下少年和吉他 2024-11-23 10:09:07

我会尝试在 SoapUI 首选项中调整套接字超时。 SoapUI 的标准超时为 60000 毫秒。我会尝试将其放大,看看您是否有同样的问题。这之前已经为我自己解决了超时问题。

您还可以直接在soapui-settings.xml 中编辑此设置。

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

如果这没有帮助,请尝试在 eviware 论坛

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.

累赘 2024-11-23 10:09:07

除了调整超时之外,如果此问题仍然存在,则可能是因为 SoapUI 所需的插件很少未加载。因为这些插件存在于其他需要权限访问的地方。

如果您检查日志,您可以找到此跟踪:

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)

直接从 bin 启动 SoapUI 时不会出现问题

另外您也可以使用管理权限运行。

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.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文