IBM MFP-身份验证时间歇出现SocketTimeoutException

时间:2018-08-29 14:34:02

标签: authentication ibm-mobilefirst

我们在Google Cloud上提供了IBM MFP 8.0.0.00-20171220-1341版本。 我们正在使用身份验证适配器进行登录。

在进行登录时,我们收到java.net.SocketTimeoutException:超时异常。 请检查以下日志。


    com.mfpauth.impl.Authentication                             E java.net.SocketTimeoutException: timeout
            at okio.Okio$4.newTimeoutException(Okio.java:230)
            at okio.AsyncTimeout.exit(AsyncTimeout.java:285)
            at okio.AsyncTimeout$2.read(AsyncTimeout.java:241)
            at okio.RealBufferedSource.indexOf(RealBufferedSource.java:345)
            at okio.RealBufferedSource.readUtf8LineStrict(RealBufferedSource.java:217)
            at okio.RealBufferedSource.readUtf8LineStrict(RealBufferedSource.java:211)
            at okhttp3.internal.http1.Http1Codec.readResponseHeaders(Http1Codec.java:189)
            at okhttp3.internal.http.CallServerInterceptor.intercept(CallServerInterceptor.java:75)
            at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.java:92)
            at okhttp3.internal.connection.ConnectInterceptor.intercept(ConnectInterceptor.java:45)
            at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.java:92)
            at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.java:67)
            at okhttp3.internal.cache.CacheInterceptor.intercept(CacheInterceptor.java:93)
            at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.java:92)
            at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.java:67)
            at okhttp3.internal.http.BridgeInterceptor.intercept(BridgeInterceptor.java:93)
            at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.java:92)
            at okhttp3.internal.http.RetryAndFollowUpInterceptor.intercept(RetryAndFollowUpInterceptor.java:120)
            at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.java:92)
            at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.java:67)
            at okhttp3.RealCall.getResponseWithInterceptorChain(RealCall.java:185)
            at okhttp3.RealCall.execute(RealCall.java:69)
            at com.mfpauth.impl.Authentication.callAdapterWebService(Authentication.java:118)
            at com.mfpauth.impl.Authentication.getDealerProfileAttributes(Authentication.java:551)
            at com.mfpauth.impl.Authentication.validateCredentials(Authentication.java:229)
            at com.ibm.mfp.security.checks.base.CredentialsValidationSecurityCheck.authorize(CredentialsValidationSecurityCheck.java:59)
            at com.ibm.mfp.security.checks.base.UserAuthenticationSecurityCheck.authorize(UserAuthenticationSecurityCheck.java:68)
            at com.mfpauth.impl.Authentication.authorize(Authentication.java:99)
            at com.ibm.mfp.server.security.internal.context.ClientSecurityContextImpl$1.visit(ClientSecurityContextImpl.java:380)
            at com.ibm.mfp.server.security.internal.context.ClientSecurityContextImpl.iterateThroughSecurityChecks(ClientSecurityContextImpl.java:461)
            at com.ibm.mfp.server.security.internal.context.ClientSecurityContextImpl.processAuthorizationRequest(ClientSecurityContextImpl.java:370)
            at sun.reflect.GeneratedMethodAccessor360.invoke(Unknown Source)
            at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:55)
            at java.lang.reflect.Method.invoke(Method.java:508)
            at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:317)
            at org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:190)
            at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:157)
            at org.springframework.aop.support.DelegatingIntroductionInterceptor.doProceed(DelegatingIntroductionInterceptor.java:133)
            at org.springframework.aop.support.DelegatingIntroductionInterceptor.invoke(DelegatingIntroductionInterceptor.java:121)
            at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:179)
            at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:207)
            at com.sun.proxy.$Proxy246.processAuthorizationRequest(Unknown Source)
            at com.ibm.mfp.server.security.internal.services.PreAuthorizationServiceImpl.authorize(PreAuthorizationServiceImpl.java:36)
            at com.ibm.mfp.server.security.internal.rest.PreAuthorizationEndpoint$1.call(PreAuthorizationEndpoint.java:82)
            at com.ibm.mfp.server.security.internal.rest.PreAuthorizationEndpoint$1.call(PreAuthorizationEndpoint.java:79)
            at com.ibm.mfp.server.persistency.internal.transaction.StorageManagerImpl.doWithStorage(StorageManagerImpl.java:49)
            at com.ibm.mfp.server.security.internal.rest.PreAuthorizationEndpoint.authorize(PreAuthorizationEndpoint.java:78)
            at sun.reflect.GeneratedMethodAccessor359.invoke(Unknown Source)
            at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:55)
            at java.lang.reflect.Method.invoke(Method.java:508)
            at org.springframework.web.method.support.InvocableHandlerMethod.doInvoke(InvocableHandlerMethod.java:221)
            at org.springframework.web.method.support.InvocableHandlerMethod.invokeForRequest(InvocableHandlerMethod.java:137)
            at org.springframework.web.servlet.mvc.method.annotation.ServletInvocableHandlerMethod.invokeAndHandle(ServletInvocableHandlerMethod.java:110)
            at org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter.invokeHandleMethod(RequestMappingHandlerAdapter.java:776)
            at org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter.handleInternal(RequestMappingHandlerAdapter.java:705)
            at org.springframework.web.servlet.mvc.method.AbstractHandlerMethodAdapter.handle(AbstractHandlerMethodAdapter.java:85)
            at org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:959)
            at org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:893)
            at org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:966)
            at org.springframework.web.servlet.FrameworkServlet.doPost(FrameworkServlet.java:868)
            at javax.servlet.http.HttpServlet.service(HttpServlet.java:595)
            at org.springframework.web.servlet.FrameworkServlet.service(FrameworkServlet.java:842)
            at javax.servlet.http.HttpServlet.service(HttpServlet.java:668)
            at com.ibm.ws.webcontainer.servlet.ServletWrapper.service(ServletWrapper.java:1290)
            at com.ibm.ws.webcontainer.servlet.ServletWrapper.handleRequest(ServletWrapper.java:778)
            at com.ibm.ws.webcontainer.servlet.ServletWrapper.handleRequest(ServletWrapper.java:475)
            at com.ibm.ws.webcontainer.filter.WebAppFilterManager.invokeFilters(WebAppFilterManager.java:1161)
            at com.ibm.ws.webcontainer.servlet.CacheServletWrapper.handleRequest(CacheServletWrapper.java:82)
            at com.ibm.ws.webcontainer.WebContainer.handleRequest(WebContainer.java:956)
            at com.ibm.ws.webcontainer.osgi.DynamicVirtualHost$2.run(DynamicVirtualHost.java:280)
            at com.ibm.ws.http.dispatcher.internal.channel.HttpDispatcherLink$TaskWrapper.run(HttpDispatcherLink.java:967)
            at com.ibm.ws.http.dispatcher.internal.channel.HttpDispatcherLink.wrapHandlerAndExecute(HttpDispatcherLink.java:359)
            at com.ibm.ws.http.dispatcher.internal.channel.HttpDispatcherLink.ready(HttpDispatcherLink.java:318)
            at com.ibm.ws.http.channel.internal.inbound.HttpInboundLink.handleDiscrimination(HttpInboundLink.java:471)
            at com.ibm.ws.http.channel.internal.inbound.HttpInboundLink.handleNewRequest(HttpInboundLink.java:405)
            at com.ibm.ws.http.channel.internal.inbound.HttpInboundLink.processRequest(HttpInboundLink.java:285)
            at com.ibm.ws.http.channel.internal.inbound.HttpICLReadCallback.complete(HttpICLReadCallback.java:66)
            at com.ibm.ws.tcpchannel.internal.WorkQueueManager.requestComplete(WorkQueueManager.java:504)
            at com.ibm.ws.tcpchannel.internal.WorkQueueManager.attemptIO(WorkQueueManager.java:574)
            at com.ibm.ws.tcpchannel.internal.WorkQueueManager.workerRun(WorkQueueManager.java:929)
            at com.ibm.ws.tcpchannel.internal.WorkQueueManager$Worker.run(WorkQueueManager.java:1018)
            at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1160)
            at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:635)
            at java.lang.Thread.run(Thread.java:811)
        Caused by: java.net.SocketException: Socket closed
            at java.net.SocketInputStream.read(SocketInputStream.java:215)
            at java.net.SocketInputStream.read(SocketInputStream.java:152)
            at okio.Okio$2.read(Okio.java:139)
            at okio.AsyncTimeout$2.read(AsyncTimeout.java:237)
            ... 81 more

什么是阻塞,因为我们遇到了间歇性问题。是由于Google Cloud发生此问题吗?

1 个答案:

答案 0 :(得分:0)

这可能与Google Cloud无关。在安全检查中,您似乎正在以下位置调用后端:

        at com.mfpauth.impl.Authentication.callAdapterWebService(Authentication.java:118)

为此,您正在使用okhttp库。

okhttp3库的默认超时为10秒。您可能需要增加超时值,并检查是否可以解决问题。

有关更多详细信息,请参阅:

Timeouts

okhttp3 timeout