我们在为测试目的而设置的机器(Ubunut 12.04.4 LTS)上遇到奇怪的“501未实现”错误。服务器Web应用程序在Tomcat 7.0.55(使用其他7.x版本测试)和Java 7版本中运行。 Java 8(20)(测试了几个版本)。我们在服务器端使用Jax WS 2.2.8。请求可能具有非常不同的大小,复杂性等。
大约1%的SOAP请求(数千个)最终会出现以下错误:
com.sun.xml.ws.client.ClientTransportException: The server sent HTTP status code 501: Not Implemented
at com.sun.xml.ws.transport.http.client.HttpTransportPipe.checkStatusCode(HttpTransportPipe.java:323)
at com.sun.xml.ws.transport.http.client.HttpTransportPipe.createResponsePacket(HttpTransportPipe.java:272)
at com.sun.xml.ws.transport.http.client.HttpTransportPipe.process(HttpTransportPipe.java:230)
at com.sun.xml.ws.transport.http.client.HttpTransportPipe.processRequest(HttpTransportPipe.java:143)
at com.sun.xml.ws.transport.DeferredTransportPipe.processRequest(DeferredTransportPipe.java:110)
at com.sun.xml.ws.api.pipe.Fiber.__doRun(Fiber.java:1136)
at com.sun.xml.ws.api.pipe.Fiber._doRun(Fiber.java:1050)
at com.sun.xml.ws.api.pipe.Fiber.doRun(Fiber.java:1019)
at com.sun.xml.ws.api.pipe.Fiber.runSync(Fiber.java:877)
at com.sun.xml.ws.client.Stub.process(Stub.java:464)
at com.sun.xml.ws.client.sei.SEIStub.doProcess(SEIStub.java:174)
at com.sun.xml.ws.client.sei.SyncMethodHandler.invoke(SyncMethodHandler.java:108)
at com.sun.xml.ws.client.sei.SyncMethodHandler.invoke(SyncMethodHandler.java:91)
at com.sun.xml.ws.client.sei.SEIStub.invoke(SEIStub.java:154)
at com.sun.proxy.$Proxy89.addToIndex(Unknown Source)
at com.jv.pm.server.ReIndexService$IndexThread.run(ReIndexService.java:85)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
at java.lang.Thread.run(Thread.java:745)
在服务器端,Tomcat记录以下内容:
127.0.0.1 - - [17/Jul/2014:22:10:41 +0200] "/S:Envelope>POST /application/methodname HTTP/1.1" 501 1148
127.0.0.1 - - [18/Jul/2014:09:41:59 +0200] "></S:Envelope>POST /application/methodname HTTP/1.1" 501 1164
127.0.0.1 - - [18/Jul/2014:09:48:55 +0200] "dy></S:Envelope>POST /application/methodname HTTP/1.1" 501 1168
127.0.0.1 - - [11/Aug/2014:14:16:41 +0200] "velope>POST /application/methodname HTTP/1.1" 501 1138
127.0.0.1 - - [11/Aug/2014:16:24:26 +0200] "velope>POST /application/methodname HTTP/1.1" 501 1138
127.0.0.1 - - [11/Aug/2014:16:25:00 +0200] "velope>POST /application/methodname HTTP/1.1" 501 1138
127.0.0.1 - - [11/Aug/2014:16:25:37 +0200] "velope>POST /application/methodname HTTP/1.1" 501 1138
127.0.0.1 - - [11/Aug/2014:16:25:53 +0200] "velope>POST /application/methodname HTTP/1.1" 501 1138
127.0.0.1 - - [11/Aug/2014:16:28:43 +0200] ":Envelope>POST /application/methodname HTTP/1.1" 501 1144
127.0.0.1 - - [12/Aug/2014:19:35:02 +0200] "S:Envelope>POST /application/methodname HTTP/1.1" 501 1146
127.0.0.1 - - [12/Aug/2014:19:35:20 +0200] "></S:Envelope>POST /application/methodname HTTP/1.1" 501 1164
127.0.0.1 - - [12/Aug/2014:19:35:45 +0200] "dy></S:Envelope>POST /application/methodname HTTP/1.1" 501 1168
127.0.0.1 - - [21/Aug/2014:16:51:16 +0200] "Envelope>POST /application/methodname HTTP/1.1" 501 1142
127.0.0.1 - - [21/Aug/2014:16:51:40 +0200] "/S:Envelope>POST /application/methodname HTTP/1.1" 501 1148
127.0.0.1 - - [26/Aug/2014:17:35:29 +0200] "lope>POST /application/methodname HTTP/1.1" 501 1134
127.0.0.1 - - [03/Sep/2014:13:46:11 +0200] "pe>POST /application/methodname HTTP/1.1" 501 1130
127.0.0.1 - - [03/Sep/2014:13:46:12 +0200] "pe>POST /application/methodname HTTP/1.1" 501 1130
127.0.0.1 - - [03/Sep/2014:13:46:26 +0200] "ody></S:Envelope>POST /application/methodname HTTP/1.1" 501 1170
127.0.0.1 - - [04/Sep/2014:13:56:49 +0200] "nvelope>POST /application/methodname HTTP/1.1" 501 1140
127.0.0.1 - - [04/Sep/2014:13:57:03 +0200] "pe>POST /application/methodname HTTP/1.1" 501 1130
127.0.0.1 - - [04/Sep/2014:13:57:28 +0200] "/S:Envelope>POST /application/methodname HTTP/1.1" 501 1148
正如您所看到的,HTTP消息的主体似乎与标题(?)混淆了。更奇怪的是:它发生在任意连接和数据上,因此同一个请求(携带完全相同的数据)可以在HTTP 501响应中结束,在HTTP 200响应中稍后发生。所以对我们来说,感觉是不确定的,如果我们向服务器发送数百个或更多的请求,我们只能可靠地重现它 - 会有可靠的(大约)1%的501错误。
我们面临的问题还在于一个完全不同的Web应用程序,它主要处理二进制输入数据。因此问题似乎完全独立于正在运行的应用程序或SOAP请求的结构。
注意请求正在本地环回接口上运行可能很重要(因此发送SOAP requets的客户端在同一台机器上运行)。在客户端,已经测试了不同的Java版本(7和8)。 Stub创建发生在“wsimport”(在Java 7中)。
我们在某种程度上处于斗智斗勇的结局,如果有人能引导我们走向正确的方向来追踪这一错误,我们真的很感激。
谢谢和最好的问候
答案 0 :(得分:0)
我们可以通过更新到Apache Tomcat 8.0.15版来解决问题。