0

我正在开发一个 MobileFirst 平台适配器。当我单击“调用 MobileFirst 适配器”时,它给了我“过程调用失败。读取超时”错误。请查看完整的日志,让我知道出了什么问题

    [ERROR   ] FWLSE0099E: An error occurred while invoking procedure  [project         SecApp]MyRestAdapter1/HttpRequestFWLSE0100E:  parameters: [project SecApp]
    Http request failed: org.apache.http.conn.HttpHostConnectException: Connect to Javatechig.com:80 [Javatechig.com/198.1.121.188] failed: Connection timed out: connect
   FWLSE0101E: Caused by:  [project SecApp]org.apache.http.conn.HttpHostConnectException: Connect to Javatechig.com:80 [Javatechig.com/198.1.121.188] failed: Connection timed out: connectjava.lang.RuntimeException: Http request failed: org.apache.http.conn.HttpHostConnectException: Connect to Javatechig.com:80 [Javatechig.com/198.1.121.188] failed: Connection timed out: connect
at com.worklight.adapters.http.HTTPConnectionManager.execute(HTTPConnectionManager.java:271)
at com.worklight.adapters.http.HttpClientContext.doExecute(HttpClientContext.java:201)
at com.worklight.adapters.http.HttpClientContext.execute(HttpClientContext.java:185)
at com.worklight.adapters.http.HTTP.execRequest(HTTP.java:155)
at com.worklight.adapters.http.HTTP.invoke(HTTP.java:141)
at com.worklight.integration.model.ProcedureInvoker.invokeProcedure(ProcedureInvoker.java:54)
at com.worklight.integration.model.Procedure.invoke(Procedure.java:166)
at com.worklight.integration.services.impl.DataAccessServiceImpl.callProcedureInternal(DataAccessServiceImpl.java:676)
at com.worklight.integration.services.impl.DataAccessServiceImpl.callProcedure(DataAccessServiceImpl.java:622)
at com.worklight.integration.services.impl.DataAccessServiceImpl.access$100(DataAccessServiceImpl.java:69)
at com.worklight.integration.services.impl.DataAccessServiceImpl$3.execute(DataAccessServiceImpl.java:504)
at com.worklight.core.auth.impl.AuthenticationServiceBean.accessResource(AuthenticationServiceBean.java:76)
at com.worklight.integration.services.impl.DataAccessServiceImpl.invokeProcedureInternal(DataAccessServiceImpl.java:501)
at com.worklight.integration.services.impl.DataAccessServiceImpl.invokeDynamicProcedure(DataAccessServiceImpl.java:579)
at com.worklight.integration.services.impl.DataAccessServiceImpl.invokeDynamicProcedureWithEnclosingProcedureProperties(DataAccessServiceImpl.java:563)
at com.worklight.integration.js.JavaScriptIntegrationLibraryImplementation.invokeDynamicProcedure(JavaScriptIntegrationLibraryImplementation.java:145)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at org.mozilla.javascript.MemberBox.invoke(MemberBox.java:126)
at org.mozilla.javascript.NativeJavaMethod.call(NativeJavaMethod.java:225)
at org.mozilla.javascript.optimizer.OptRuntime.callN(OptRuntime.java:52)
at org.mozilla.javascript.gen._integration_js_1._c_anonymous_12(/integration.js:103)
at org.mozilla.javascript.gen._integration_js_1.call(/integration.js)
at org.mozilla.javascript.Interpreter.interpretLoop(Interpreter.java:1473)
at org.mozilla.javascript.Interpreter.interpret(Interpreter.java:815)
at org.mozilla.javascript.InterpretedFunction.call(InterpretedFunction.java:109)
at org.mozilla.javascript.ContextFactory.doTopCall(ContextFactory.java:394)
at org.mozilla.javascript.ScriptRuntime.doTopCall(ScriptRuntime.java:3091)
at org.mozilla.javascript.InterpretedFunction.call(InterpretedFunction.java:107)
at com.worklight.integration.js.JavaScriptManager.callFunction(JavaScriptManager.java:267)
at com.worklight.integration.js.JavaScriptManager.invokeFunction(JavaScriptManager.java:241)
at com.worklight.integration.js.JavaScriptManager.invokeFunction(JavaScriptManager.java:211)
at com.worklight.integration.services.impl.AdapterManagerImpl.invokeFunction(AdapterManagerImpl.java:125)
at com.worklight.integration.js.JavaScriptProcedureInvoker.invoke(JavaScriptProcedureInvoker.java:42)
at com.worklight.integration.model.ProcedureInvoker.invokeProcedure(ProcedureInvoker.java:54)
at com.worklight.integration.model.Procedure.invoke(Procedure.java:166)
at com.worklight.integration.services.impl.DataAccessServiceImpl.callProcedureInternal(DataAccessServiceImpl.java:676)
at com.worklight.integration.services.impl.DataAccessServiceImpl.callProcedure(DataAccessServiceImpl.java:622)
at com.worklight.integration.services.impl.DataAccessServiceImpl.access$100(DataAccessServiceImpl.java:69)
at com.worklight.integration.services.impl.DataAccessServiceImpl$3.execute(DataAccessServiceImpl.java:504)
at com.worklight.core.auth.impl.AuthenticationServiceBean.accessResource(AuthenticationServiceBean.java:76)
at com.worklight.integration.services.impl.DataAccessServiceImpl.invokeProcedureInternal(DataAccessServiceImpl.java:501)
at com.worklight.integration.services.impl.DataAccessServiceImpl.invokeProcedure(DataAccessServiceImpl.java:155)
at com.worklight.adapters.rest.JSAdapterInvoker.invokeAdapter(JSAdapterInvoker.java:35)
at com.worklight.adapters.rest.JSAdapterRestWrapper.getFeeds1Get(Unknown Source)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at org.apache.wink.server.internal.handlers.InvokeMethodHandler.handleRequest(InvokeMethodHandler.java:63)
at org.apache.wink.server.handlers.AbstractHandler.handleRequest(AbstractHandler.java:33)
at org.apache.wink.server.handlers.RequestHandlersChain.handle(RequestHandlersChain.java:26)
at org.apache.wink.server.handlers.RequestHandlersChain.handle(RequestHandlersChain.java:22)
at org.apache.wink.server.handlers.AbstractHandlersChain.doChain(AbstractHandlersChain.java:63)
at com.worklight.wink.extensions.WorklightWinkHandler$1.run(WorklightWinkHandler.java:50)
at com.worklight.wink.extensions.WorklightWinkHandler$1.run(WorklightWinkHandler.java:45)
at com.worklight.adapters.rest.JAXRSAdapterRequestInterceptor.accessTheResourceWithIdentity(JAXRSAdapterRequestInterceptor.java:98)
at com.worklight.adapters.rest.JAXRSAdapterRequestInterceptor.access$000(JAXRSAdapterRequestInterceptor.java:38)
at com.worklight.adapters.rest.JAXRSAdapterRequestInterceptor$1.run(JAXRSAdapterRequestInterceptor.java:84)
at com.worklight.adapters.rest.JAXRSAdapterRequestInterceptor$1.run(JAXRSAdapterRequestInterceptor.java:81)
at com.worklight.core.auth.impl.OAuthValidatorFilter$1.run(OAuthValidatorFilter.java:143)
at com.worklight.core.auth.impl.OAuthValidatorFilter$1.run(OAuthValidatorFilter.java:134)
at java.security.AccessController.doPrivileged(Native Method)
at javax.security.auth.Subject.doAs(Subject.java:396)
at com.worklight.oauth.validation.ValidationFilterHelper.filterRequest(ValidationFilterHelper.java:60)
at com.worklight.core.auth.impl.OAuthValidatorFilter.securedAccessToResource(OAuthValidatorFilter.java:134)
at com.worklight.core.auth.impl.OAuthValidatorFilter.filterRequest(OAuthValidatorFilter.java:101)
at com.worklight.adapters.rest.JAXRSAdapterRequestInterceptor.handleRequest(JAXRSAdapterRequestInterceptor.java:81)
at com.worklight.wink.extensions.WorklightWinkHandler.handleRequest(WorklightWinkHandler.java:45)
at org.apache.wink.server.handlers.RequestHandlersChain.handle(RequestHandlersChain.java:26)
at org.apache.wink.server.handlers.RequestHandlersChain.handle(RequestHandlersChain.java:22)
at org.apache.wink.server.handlers.AbstractHandlersChain.doChain(AbstractHandlersChain.java:63)
at org.apache.wink.server.internal.handlers.CreateInvocationParametersHandler.handleRequest(CreateInvocationParametersHandler.java:54)
at org.apache.wink.server.handlers.RequestHandlersChain.handle(RequestHandlersChain.java:26)
at org.apache.wink.server.handlers.RequestHandlersChain.handle(RequestHandlersChain.java:22)
at org.apache.wink.server.handlers.AbstractHandlersChain.doChain(AbstractHandlersChain.java:63)
at org.apache.wink.server.internal.handlers.FindResourceMethodHandler.handleSubResourceMethod(FindResourceMethodHandler.java:183)
at org.apache.wink.server.internal.handlers.FindResourceMethodHandler.handleRequest(FindResourceMethodHandler.java:110)
at org.apache.wink.server.handlers.RequestHandlersChain.handle(RequestHandlersChain.java:26)
at org.apache.wink.server.handlers.RequestHandlersChain.handle(RequestHandlersChain.java:22)
at org.apache.wink.server.handlers.AbstractHandlersChain.doChain(AbstractHandlersChain.java:63)
at org.apache.wink.server.internal.handlers.FindRootResourceHandler.handleRequest(FindRootResourceHandler.java:95)
at org.apache.wink.server.handlers.RequestHandlersChain.handle(RequestHandlersChain.java:26)
at org.apache.wink.server.handlers.RequestHandlersChain.handle(RequestHandlersChain.java:22)
at org.apache.wink.server.handlers.AbstractHandlersChain.doChain(AbstractHandlersChain.java:63)
at org.apache.wink.server.internal.handlers.HeadMethodHandler.handleRequest(HeadMethodHandler.java:53)
at org.apache.wink.server.handlers.RequestHandlersChain.handle(RequestHandlersChain.java:26)
at org.apache.wink.server.handlers.RequestHandlersChain.handle(RequestHandlersChain.java:22)
at org.apache.wink.server.handlers.AbstractHandlersChain.doChain(AbstractHandlersChain.java:63)
at org.apache.wink.server.internal.handlers.OptionsMethodHandler.handleRequest(OptionsMethodHandler.java:46)
at org.apache.wink.server.handlers.RequestHandlersChain.handle(RequestHandlersChain.java:26)
at org.apache.wink.server.handlers.RequestHandlersChain.handle(RequestHandlersChain.java:22)
at org.apache.wink.server.handlers.AbstractHandlersChain.doChain(AbstractHandlersChain.java:63)
at org.apache.wink.server.internal.handlers.SearchResultHandler.handleRequest(SearchResultHandler.java:33)
at org.apache.wink.server.handlers.RequestHandlersChain.handle(RequestHandlersChain.java:26)
at org.apache.wink.server.handlers.RequestHandlersChain.handle(RequestHandlersChain.java:22)
at org.apache.wink.server.handlers.AbstractHandlersChain.doChain(AbstractHandlersChain.java:63)
at org.apache.wink.server.internal.log.ResourceInvocation.handleRequest(ResourceInvocation.java:92)
at org.apache.wink.server.handlers.RequestHandlersChain.handle(RequestHandlersChain.java:26)
at org.apache.wink.server.handlers.RequestHandlersChain.handle(RequestHandlersChain.java:22)
at org.apache.wink.server.handlers.AbstractHandlersChain.doChain(AbstractHandlersChain.java:63)
at org.apache.wink.server.internal.log.Requests.handleRequest(Requests.java:76)
at org.apache.wink.server.handlers.RequestHandlersChain.handle(RequestHandlersChain.java:26)
at org.apache.wink.server.handlers.RequestHandlersChain.handle(RequestHandlersChain.java:22)
at org.apache.wink.server.handlers.AbstractHandlersChain.doChain(AbstractHandlersChain.java:63)
at org.apache.wink.server.handlers.AbstractHandlersChain.run(AbstractHandlersChain.java:48)
at org.apache.wink.server.internal.RequestProcessor.handleRequestWithoutFaultBarrier(RequestProcessor.java:207)
at org.apache.wink.server.internal.RequestProcessor.handleRequest(RequestProcessor.java:154)
at org.apache.wink.server.internal.servlet.RestServlet.service(RestServlet.java:119)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:668)
at com.worklight.adapters.rest.JAXRSSandbox.handleRequest(JAXRSSandbox.java:255)
at com.worklight.adapters.rest.RESTAdaptersServiceServlet.doService(RESTAdaptersServiceServlet.java:69)
at com.worklight.adapters.rest.RESTAdaptersServlet.service(RESTAdaptersServlet.java:64)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:668)
at com.ibm.ws.webcontainer.servlet.ServletWrapper.service(ServletWrapper.java:1275)
at com.ibm.ws.webcontainer.servlet.ServletWrapper.handleRequest(ServletWrapper.java:766)
at com.ibm.ws.webcontainer.servlet.ServletWrapper.handleRequest(ServletWrapper.java:472)
at com.ibm.ws.webcontainer.filter.WebAppFilterChain.invokeTarget(WebAppFilterChain.java:135)
at com.ibm.ws.webcontainer.filter.WebAppFilterChain.doFilter(WebAppFilterChain.java:74)
at com.ibm.ws.webcontainer.filter.WebAppFilterManager.doFilter(WebAppFilterManager.java:975)
at com.ibm.ws.webcontainer.filter.WebAppFilterManager.invokeFilters(WebAppFilterManager.java:1097)
at com.ibm.ws.webcontainer.servlet.CacheServletWrapper.handleRequest(CacheServletWrapper.java:81)
at com.ibm.ws.webcontainer.WebContainer.handleRequest(WebContainer.java:912)
at com.ibm.ws.webcontainer.osgi.DynamicVirtualHost$2.run(DynamicVirtualHost.java:262)
at com.ibm.ws.http.dispatcher.internal.channel.HttpDispatcherLink$TaskWrapper.run(HttpDispatcherLink.java:938)
at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:895)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:918)
at java.lang.Thread.run(Thread.java:662)
    Caused by: org.apache.http.conn.HttpHostConnectException: Connect to Javatechig.com:80 [Javatechig.com/198.1.121.188] failed: Connection timed out: connect
at org.apache.http.impl.conn.HttpClientConnectionOperator.connect(HttpClientConnectionOperator.java:140)
at org.apache.http.impl.conn.PoolingHttpClientConnectionManager.connect(PoolingHttpClientConnectionManager.java:318)
at org.apache.http.impl.execchain.MainClientExec.establishRoute(MainClientExec.java:363)
at org.apache.http.impl.execchain.MainClientExec.execute(MainClientExec.java:219)
at org.apache.http.impl.execchain.ProtocolExec.execute(ProtocolExec.java:195)
at org.apache.http.impl.execchain.RetryExec.execute(RetryExec.java:86)
at org.apache.http.impl.execchain.RedirectExec.execute(RedirectExec.java:108)
at org.apache.http.impl.client.InternalHttpClient.doExecute(InternalHttpClient.java:184)
at org.apache.http.impl.client.CloseableHttpClient.execute(CloseableHttpClient.java:72)
at com.worklight.adapters.http.HTTPConnectionManager.execute(HTTPConnectionManager.java:269)
... 129 more
    Caused by: java.net.ConnectException: Connection timed out: connect
at java.net.PlainSocketImpl.socketConnect(Native Method)
at java.net.PlainSocketImpl.doConnect(PlainSocketImpl.java:351)
at java.net.PlainSocketImpl.connectToAddress(PlainSocketImpl.java:213)
at java.net.PlainSocketImpl.connect(PlainSocketImpl.java:200)
at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:366)
at java.net.Socket.connect(Socket.java:529)
at org.apache.http.conn.socket.PlainConnectionSocketFactory.connectSocket(PlainConnectionSocketFactory.java:72)
at org.apache.http.impl.conn.HttpClientConnectionOperator.connect(HttpClientConnectionOperator.java:123)
... 138 more
4

2 回答 2

0

你要超时了...

  • 确保您尝试连接到正确的地址
  • 尝试增加适配器 XML 文件中过程的超时规范
  • 确保没有防火墙或类似的方式阻止连接或延迟连接
  • 您还可以在 Wireshark 中检查网络流量
于 2015-05-18T11:30:26.960 回答
0

假设您在 soapui 中测试了服务并且后端在适配器 xml 中定义的超时范围内工作。以下可能是问题所在。

如果您使用应该可以正常工作的“调用 MobileFirst 后端服务”。

我遇到了同样的问题。看起来这是 Mobilefirst 客户端“Invoke MobileFirst Adapter”的问题。如果您在适配器 JS 中打印响应,您会注意到测试客户端只是放弃了适配器打印读取超时。但适配器仍在工作,并将在几秒钟后在日志中打印响应。这显然是测试客户端超时而不是适配器本身的问题。

var result =invokeWebService(request, headers, soapAction);
WL.Logger.warn(result);

希望这可以帮助。我浪费了一整天的时间来弄清楚这一点。哦,IBM。:)

于 2016-03-03T06:16:57.643 回答