我不知道为什么我的EndPoint被标记为SUSPENDED而我的应用程序没有收到服务返回。
这显示在日志上:
TID: [0] [ESB] [2014-09-01 11:00:32,269] INFO {org.apache.synapse.mediators.builtin.LogMediator} - To: /services/MonitoramentoServico.MonitoramentoServicoHttpSoap11Endpoint, WSAction: urn:BuscarCaminhoTask, SOAPAction: urn:BuscarCaminhoTask, MessageID: urn:uuid:78e22483-c74e-4673-8286-8a18294135b3, Direction: request {org.apache.synapse.mediators.builtin.LogMediator}
TID: [0] [ESB] [2014-09-01 11:00:33,259] WARN {org.apache.synapse.transport.passthru.TargetHandler} - http-outgoing-15546: Connection time out while in state: REQUEST_DONE {org.apache.synapse.transport.passthru.TargetHandler}
TID: [0] [ESB] [2014-09-01 11:00:33,260] WARN {org.apache.synapse.endpoints.EndpointContext} - Endpoint : MonitoramentoEndPoint will be marked SUSPENDED as it failed {org.apache.synapse.endpoints.EndpointContext}
TID: [0] [ESB] [2014-09-01 11:00:33,260] WARN {org.apache.synapse.endpoints.EndpointContext} - Suspending endpoint : MonitoramentoEndPoint - last suspend duration was : 30000ms and current suspend duration is : 30000ms - Next retry after : Mon Sep 01 11:01:03 BRT 2014 {org.apache.synapse.endpoints.EndpointContext}
TID: [0] [ESB] [2014-09-01 11:01:01,196] INFO {org.apache.synapse.mediators.builtin.LogMediator} - To: /services/MonitoramentoServico.MonitoramentoServicoHttpSoap11Endpoint, WSAction: urn:BuscaServicosMonitorar, SOAPAction: urn:BuscaServicosMonitorar, MessageID: urn:uuid:e5ce0a3c-e5d1-4364-a7aa-897363392c4d, Direction: request {org.apache.synapse.mediators.builtin.LogMediator}
TID: [0] [ESB] [2014-09-01 11:01:01,203] INFO {org.apache.synapse.mediators.builtin.LogMediator} - To: /services/MonitoramentoServico.MonitoramentoServicoHttpSoap11Endpoint, WSAction: urn:BuscaHardwaresMonitorar, SOAPAction: urn:BuscaHardwaresMonitorar, MessageID: urn:uuid:e74ab088-1eb0-47cc-8447-7b9e016edcec, Direction: request {org.apache.synapse.mediators.builtin.LogMediator}
TID: [0] [ESB] [2014-09-01 11:01:01,208] INFO {org.apache.synapse.mediators.builtin.LogMediator} - To: /services/MonitoramentoServico.MonitoramentoServicoHttpSoap11Endpoint, WSAction: urn:BuscarCaminhoTask, SOAPAction: urn:BuscarCaminhoTask, MessageID: urn:uuid:18dad64b-292e-4c79-908e-6d9b638e1d8a, Direction: request {org.apache.synapse.mediators.builtin.LogMediator}
TID: [0] [ESB] [2014-09-01 11:01:01,291] WARN {org.apache.synapse.transport.passthru.TargetHandler} - http-outgoing-15544: Connection time out while in state: REQUEST_DONE {org.apache.synapse.transport.passthru.TargetHandler}
TID: [0] [ESB] [2014-09-01 11:01:01,292] WARN {org.apache.synapse.endpoints.EndpointContext} - Endpoint : MonitoramentoEndPoint will be marked SUSPENDED as it failed {org.apache.synapse.endpoints.EndpointContext}
TID: [0] [ESB] [2014-09-01 11:01:01,292] WARN {org.apache.synapse.endpoints.EndpointContext} - Suspending endpoint : MonitoramentoEndPoint - last suspend duration was : 30000ms and current suspend duration is : 30000ms - Next retry after : Mon Sep 01 11:01:31 BRT 2014 {org.apache.synapse.endpoints.EndpointContext}
TID: [0] [ESB] [2014-09-01 11:01:02,210] WARN {org.apache.synapse.transport.passthru.SourceHandler} - Connection time out after request is read: http-incoming-388 {org.apache.synapse.transport.passthru.SourceHandler}
EndPoint会在几秒钟后自动返回,但我怎么知道什么是错的?
收到我的请求后出现错误:
TID: [0] [ESB] [2014-09-01 15:27:42,746] DEBUG {org.apache.synapse.transport.http.wire} - << "POST /services/MonitoramentoDS HTTP/1.1[\r][\n]" {org.apache.synapse.transport.http.wire}
TID: [0] [ESB] [2014-09-01 15:27:42,746] DEBUG {org.apache.synapse.transport.http.wire} - << "Expect: 100-continue[\r][\n]" {org.apache.synapse.transport.http.wire}
TID: [0] [ESB] [2014-09-01 15:27:42,746] DEBUG {org.apache.synapse.transport.http.wire} - << "Content-Type: text/xml; charset=utf-8[\r][\n]" {org.apache.synapse.transport.http.wire}
TID: [0] [ESB] [2014-09-01 15:27:42,746] DEBUG {org.apache.synapse.transport.http.wire} - << "SOAPAction: "urn:UpdateServidor"[\r][\n]" {org.apache.synapse.transport.http.wire}
TID: [0] [ESB] [2014-09-01 15:27:42,746] DEBUG {org.apache.synapse.transport.http.wire} - << "Transfer-Encoding: chunked[\r][\n]" {org.apache.synapse.transport.http.wire}
TID: [0] [ESB] [2014-09-01 15:27:42,746] DEBUG {org.apache.synapse.transport.http.wire} - << "Host: localhost:9763[\r][\n]" {org.apache.synapse.transport.http.wire}
TID: [0] [ESB] [2014-09-01 15:27:42,746] DEBUG {org.apache.synapse.transport.http.wire} - << "Connection: Keep-Alive[\r][\n]" {org.apache.synapse.transport.http.wire}
TID: [0] [ESB] [2014-09-01 15:27:42,746] DEBUG {org.apache.synapse.transport.http.wire} - << "User-Agent: Synapse-PT-HttpComponents-NIO[\r][\n]" {org.apache.synapse.transport.http.wire}
TID: [0] [ESB] [2014-09-01 15:27:42,746] DEBUG {org.apache.synapse.transport.http.wire} - << "[\r][\n]" {org.apache.synapse.transport.http.wire}
TID: [0] [ESB] [2014-09-01 15:27:42,746] DEBUG {org.apache.synapse.transport.http.wire} - >> "HTTP/1.1 100 Continue[\r][\n]" {org.apache.synapse.transport.http.wire}
TID: [0] [ESB] [2014-09-01 15:27:42,747] DEBUG {org.apache.synapse.transport.http.wire} - >> "[\r][\n]" {org.apache.synapse.transport.http.wire}
TID: [0] [ESB] [2014-09-01 15:27:42,750] DEBUG {org.apache.synapse.transport.http.wire} - << "19a[\r][\n]" {org.apache.synapse.transport.http.wire}
TID: [0] [ESB] [2014-09-01 15:27:42,750] DEBUG {org.apache.synapse.transport.http.wire} - << "<?xml version='1.0' encoding='utf-8'?><soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"><soap:Body><UpdateServidor xmlns="http://ws.wso2.org/dataservice"><situacao>0</situacao><id>2</id><sithard>1</sithard><sitserv>1</sitserv><sittask>0</sittask></UpdateServidor></soap:Body></soap:Envelope>[\r][\n]" {org.apache.synapse.transport.http.wire}
TID: [0] [ESB] [2014-09-01 15:27:42,750] DEBUG {org.apache.synapse.transport.http.wire} - << "0[\r][\n]" {org.apache.synapse.transport.http.wire}
TID: [0] [ESB] [2014-09-01 15:27:42,750] DEBUG {org.apache.synapse.transport.http.wire} - << "[\r][\n]" {org.apache.synapse.transport.http.wire}
TID: [0] [ESB] [2014-09-01 15:27:42,750] DEBUG {org.apache.synapse.transport.http.wire} - >> "HTTP/1.1 202 Accepted[\r][\n]" {org.apache.synapse.transport.http.wire}
TID: [0] [ESB] [2014-09-01 15:27:42,750] DEBUG {org.apache.synapse.transport.http.wire} - >> "Content-Type: text/xml;charset=utf-8[\r][\n]" {org.apache.synapse.transport.http.wire}
TID: [0] [ESB] [2014-09-01 15:27:42,750] DEBUG {org.apache.synapse.transport.http.wire} - >> "Transfer-Encoding: chunked[\r][\n]" {org.apache.synapse.transport.http.wire}
TID: [0] [ESB] [2014-09-01 15:27:42,750] DEBUG {org.apache.synapse.transport.http.wire} - >> "Date: Mon, 01 Sep 2014 18:27:42 GMT[\r][\n]" {org.apache.synapse.transport.http.wire}
TID: [0] [ESB] [2014-09-01 15:27:42,750] DEBUG {org.apache.synapse.transport.http.wire} - >> "Server: WSO2 Carbon Server[\r][\n]" {org.apache.synapse.transport.http.wire}
TID: [0] [ESB] [2014-09-01 15:27:42,750] DEBUG {org.apache.synapse.transport.http.wire} - >> "[\r][\n]" {org.apache.synapse.transport.http.wire}
TID: [0] [ESB] [2014-09-01 15:27:42,750] DEBUG {org.apache.synapse.transport.http.wire} - >> "0[\r][\n]" {org.apache.synapse.transport.http.wire}
TID: [0] [ESB] [2014-09-01 15:27:42,750] DEBUG {org.apache.synapse.transport.http.wire} - >> "[\r][\n]" {org.apache.synapse.transport.http.wire}
TID: [0] [ESB] [2014-09-01 15:27:42,753] ERROR {org.apache.axis2.transport.base.threads.NativeWorkerPool} - Uncaught exception {org.apache.axis2.transport.base.threads.NativeWorkerPool}
java.lang.UnsupportedOperationException: An access occurred that is not valid.
at org.apache.axis2.description.InOnlyAxisOperation.getMessage(InOnlyAxisOperation.java:117)
at org.apache.synapse.core.axis2.SynapseCallbackReceiver.handleMessage(SynapseCallbackReceiver.java:283)
at org.apache.synapse.core.axis2.SynapseCallbackReceiver.receive(SynapseCallbackReceiver.java:166)
at org.apache.axis2.engine.AxisEngine.receive(AxisEngine.java:180)
at org.apache.synapse.transport.passthru.ClientWorker.run(ClientWorker.java:222)
at org.apache.axis2.transport.base.threads.NativeWorkerPool$1.run(NativeWorkerPool.java:172)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1146)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
at java.lang.Thread.run(Thread.java:701)
答案 0 :(得分:1)
当ESB无法通过该特定端点发送消息时,端点将被暂停。您可以在端点配置中找到端点挂起参数。
如果您看到http-outgoing-15544: Connection time out while in state: REQUEST_DONE
,则会发生这种情况,因为ESB与后端服务器之间的连接超时。默认套接字
超时是60秒。您可以将其增加到120秒并检查。为此,编辑
passthru-http.properties文件为;
http.socket.timeout = 120000
启用ESB wirelogs,以便您可以找到更多信息。 @ log4j属性文件,添加以下行并重启服务器。
log4j.logger.org.apache.synapse.transport.http.wire=DEBUG