Axis2请求期间突然发生SocketTimeoutException

时间:2012-12-12 12:49:38

标签: java sockets httpclient axis2

所以我有一个Web应用程序(在tomcat中),它使用来自外部提供程序的Axis2 Web服务。我根据提供者的WSDL生成了我的Web服务客户端的代码。

代码现在正常工作至少6个月。 6天前它停止工作,我得到了一个SocketTimeoutException。至少一个月没有触及测试服务器,所以我可以排除对服务器中Java二进制文件或设置的更改。

这是我的堆栈跟踪的多汁部分:

[2012-12-12 13:33:15.718 MEZ]: org.apache.axis2.AxisFault: Read timed out
[2012-12-12 13:33:15.718 MEZ]:  at org.apache.axis2.AxisFault.makeFault(AxisFault.java:430)
[2012-12-12 13:33:15.718 MEZ]:  at org.apache.axis2.transport.http.HTTPSender.sendViaPost(HTTPSender.java:193)
[2012-12-12 13:33:15.718 MEZ]:  at org.apache.axis2.transport.http.HTTPSender.send(HTTPSender.java:75)
[2012-12-12 13:33:15.718 MEZ]:  at org.apache.axis2.transport.http.CommonsHTTPTransportSender.writeMessageWithCommons(CommonsHTTPTransportSender.java:389)
[2012-12-12 13:33:15.718 MEZ]:  at org.apache.axis2.transport.http.CommonsHTTPTransportSender.invoke(CommonsHTTPTransportSender.java:222)
[2012-12-12 13:33:15.718 MEZ]:  at org.apache.axis2.engine.AxisEngine.send(AxisEngine.java:435)
[2012-12-12 13:33:15.734 MEZ]:  at org.apache.axis2.description.OutInAxisOperationClient.send(OutInAxisOperation.java:402)
[2012-12-12 13:33:15.734 MEZ]:  at org.apache.axis2.description.OutInAxisOperationClient.executeImpl(OutInAxisOperation.java:229)
[2012-12-12 13:33:15.734 MEZ]:  at org.apache.axis2.client.OperationClient.execute(OperationClient.java:165)
[2012-12-12 13:33:15.734 MEZ]:  at my.generated.webservice.client.Quoting_ServiceStub.getQuotesByRequest(Quoting_ServiceStub.java:4215)
...
[2012-12-12 13:33:15.781 MEZ]: Caused by: java.net.SocketTimeoutException: Read timed out
[2012-12-12 13:33:15.781 MEZ]:  at java.net.SocketInputStream.socketRead0(Native Method)
[2012-12-12 13:33:15.781 MEZ]:  at java.net.SocketInputStream.read(SocketInputStream.java:129)
[2012-12-12 13:33:15.781 MEZ]:  at java.io.BufferedInputStream.fill(BufferedInputStream.java:218)
[2012-12-12 13:33:15.781 MEZ]:  at java.io.BufferedInputStream.read(BufferedInputStream.java:237)
[2012-12-12 13:33:15.796 MEZ]:  at org.apache.commons.httpclient.HttpParser.readRawLine(HttpParser.java:78)
[2012-12-12 13:33:15.796 MEZ]:  at org.apache.commons.httpclient.HttpParser.readLine(HttpParser.java:106)
[2012-12-12 13:33:15.796 MEZ]:  at org.apache.commons.httpclient.HttpConnection.readLine(HttpConnection.java:1116)

这种情况发生在所有测试和生产系统(Windows和Linux)上。 对于通信我正在使用HttpClient 3.1(Apache commons)并且已经重新启动了应用程序和机器而没有成功。

现在这里有一个奇怪的事情:我调试了我的Web服务客户端,并能够使用SoapUI(在Windows上)和curl(在Linux上)将请求XML发送到Web服务服务器并得到响应(在1以内合理快速, 5秒)。所以它也没有DNS,防火墙或许可问题。

我很感激如何解决这个问题。

0 个答案:

没有答案