尝试从JBOSS联系Oracle LDAP服务器时连接重置异常

时间:2015-11-30 10:35:12

标签: java oracle jboss ldap oid

尝试从JBOSS联系oracle LDAP时出现以下错误。在部署到JBOSS之后,连接正常工作。大约十分钟后,我收到了这个错误。如果我再次移除并将应用程序重新部署到JBOSS中,同样的事情又会发生。它会在10分钟后停止工作。请提供您宝贵的建议。

2015-11-30_02:25:28 c.t.c.c.CASSelfServiceRestController createUser 116 - INFO  --- 10.48.120.22 SXM 5955d46b-a8f9-251e-9b88-fcc11c0c8328
2015-11-30_02:25:28 c.t.c.c.CASSelfServiceRestController createUser 126 - INFO  --- SXM 5955d46b-a8f9-251e-9b88-fcc11c0c8328 LD_Update_Test_21@gmail.com
2015-11-30_02:25:28 c.t.c.s.s.ServiceProviderImpl createUser 99 - INFO  --- SXM 5955d46b-a8f9-251e-9b88-fcc11c0c8328 LD_Update_Test_21@gmail.com
2015-11-30_02:25:28 c.t.c.d.d.DAOProviderImpl searchUser 995 - INFO  --- SXM 5955d46b-a8f9-251e-9b88-fcc11c0c8328
2015-11-30_02:25:28 c.t.c.d.d.DAOProviderImpl searchUser 1026 - INFO  --- SXM 5955d46b-a8f9-251e-9b88-fcc11c0c8328  Response to Service Layer
2015-11-30_02:25:28 c.t.c.d.d.DAOProviderImpl searchUser 1030 - INFO  --- Query : (uid=LD_Update_Test_21@gmail.com)
2015-11-30_02:25:28 c.t.c.d.d.DAOProviderImpl searchUser 1033 - INFO  --- SXM 5955d46b-a8f9-251e-9b88-fcc11c0c8328  Response to Service Layer
2015-11-30_02:25:28 c.t.c.d.d.DAOProviderImpl searchUser 1039 - INFO  --- Search User : Connection reset; nested exception is javax.naming.CommunicationException: Connection reset [Root exception is java.net.SocketException: Connection reset]; remaining name 'ou=people,ou=lexus,ou=lexusconsumers,o=teds'
2015-11-30_02:25:28 c.t.c.d.d.DAOProviderImpl searchUser 1040 - INFO  --- LdapTemplate Object : org.springframework.ldap.core.LdapTemplate@28f807ec
2015-11-30_02:25:28 c.t.c.d.d.DAOProviderImpl searchUser 1041 - INFO  --- StackTrace : org.springframework.ldap.CommunicationException: Connection reset; nested exception is javax.naming.CommunicationException: Connection reset [Root exception is java.net.SocketException: Connection reset]; remaining name 'ou=people,ou=lexus,ou=lexusconsumers,o=teds'
    at org.springframework.ldap.support.LdapUtils.convertLdapException(LdapUtils.java:100)
    at org.springframework.ldap.core.LdapTemplate.search(LdapTemplate.java:318)
    at org.springframework.ldap.core.LdapTemplate.search(LdapTemplate.java:258)
    at org.springframework.ldap.core.LdapTemplate.search(LdapTemplate.java:570)
    at org.springframework.ldap.core.LdapTemplate.search(LdapTemplate.java:555)
    at com.toyota.casservice.dao.daoproviderimpl.DAOProviderImpl.searchUser(DAOProviderImpl.java:1031)
    at com.toyota.casservice.service.serviceproviderimpl.ServiceProviderImpl.createUser(ServiceProviderImpl.java:119)
    at com.toyota.casservice.controller.CASSelfServiceRestController.createUser(CASSelfServiceRestController.java:129)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke(Method.java:606)
    at org.jboss.resteasy.core.MethodInjectorImpl.invoke(MethodInjectorImpl.java:167)
    at org.jboss.resteasy.core.ResourceMethod.invokeOnTarget(ResourceMethod.java:269)
    at org.jboss.resteasy.core.ResourceMethod.invoke(ResourceMethod.java:227)
    at org.jboss.resteasy.core.ResourceMethod.invoke(ResourceMethod.java:216)
    at org.jboss.resteasy.core.SynchronousDispatcher.getResponse(SynchronousDispatcher.java:542)
    at org.jboss.resteasy.core.SynchronousDispatcher.invoke(SynchronousDispatcher.java:524)
    at org.jboss.resteasy.core.SynchronousDispatcher.invoke(SynchronousDispatcher.java:126)
    at org.jboss.resteasy.plugins.server.servlet.ServletContainerDispatcher.service(ServletContainerDispatcher.java:208)
    at org.jboss.resteasy.plugins.server.servlet.HttpServletDispatcher.service(HttpServletDispatcher.java:55)
    at org.jboss.resteasy.plugins.server.servlet.HttpServletDispatcher.service(HttpServletDispatcher.java:50)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:847)
    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:295)
    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:214)
    at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:330)
    at org.springframework.security.web.access.intercept.FilterSecurityInterceptor.invoke(FilterSecurityInterceptor.java:118)
    at org.springframework.security.web.access.intercept.FilterSecurityInterceptor.doFilter(FilterSecurityInterceptor.java:84)
    at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:342)
    at org.springframework.security.web.access.ExceptionTranslationFilter.doFilter(ExceptionTranslationFilter.java:113)
    at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:342)
    at org.springframework.security.web.session.SessionManagementFilter.doFilter(SessionManagementFilter.java:103)
    at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:342)
    at org.springframework.security.web.authentication.AnonymousAuthenticationFilter.doFilter(AnonymousAuthenticationFilter.java:113)
    at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:342)
    at org.springframework.security.web.servletapi.SecurityContextHolderAwareRequestFilter.doFilter(SecurityContextHolderAwareRequestFilter.java:154)
    at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:342)
    at org.springframework.security.web.savedrequest.RequestCacheAwareFilter.doFilter(RequestCacheAwareFilter.java:45)
    at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:342)
    at org.springframework.security.web.authentication.preauth.AbstractPreAuthenticatedProcessingFilter.doFilter(AbstractPreAuthenticatedProcessingFilter.java:94)
    at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:342)
    at org.springframework.security.web.context.request.async.WebAsyncManagerIntegrationFilter.doFilterInternal(WebAsyncManagerIntegrationFilter.java:50)
    at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107)
    at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:342)
    at org.springframework.security.web.context.SecurityContextPersistenceFilter.doFilter(SecurityContextPersistenceFilter.java:87)
    at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:342)
    at org.springframework.security.web.FilterChainProxy.doFilterInternal(FilterChainProxy.java:192)
    at org.springframework.security.web.FilterChainProxy.doFilter(FilterChainProxy.java:160)
    at org.springframework.web.filter.DelegatingFilterProxy.invokeDelegate(DelegatingFilterProxy.java:344)
    at org.springframework.web.filter.DelegatingFilterProxy.doFilter(DelegatingFilterProxy.java:261)
    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:246)
    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:214)
    at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:230)
    at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:149)
    at org.jboss.modcluster.container.jbossweb.JBossWebContext$RequestListenerValve.event(JBossWebContext.java:91)
    at org.jboss.modcluster.container.jbossweb.JBossWebContext$RequestListenerValve.invoke(JBossWebContext.java:72)
    at org.jboss.as.web.security.SecurityContextAssociationValve.invoke(SecurityContextAssociationValve.java:169)
    at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:145)
    at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:97)
    at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:102)
    at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:336)
    at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:856)
    at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:653)
    at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:920)
    at java.lang.Thread.run(Thread.java:744)
Caused by: javax.naming.CommunicationException: Connection reset [Root exception is java.net.SocketException: Connection reset]; remaining name 'ou=people,ou=lexus,ou=lexusconsumers,o=teds'
    at com.sun.jndi.ldap.LdapCtx.doSearch(LdapCtx.java:2003)
    at com.sun.jndi.ldap.LdapCtx.searchAux(LdapCtx.java:1847)
    at com.sun.jndi.ldap.LdapCtx.c_search(LdapCtx.java:1772)
    at com.sun.jndi.toolkit.ctx.ComponentDirContext.p_search(ComponentDirContext.java:386)
    at com.sun.jndi.toolkit.ctx.PartialCompositeDirContext.search(PartialCompositeDirContext.java:356)
    at com.sun.jndi.toolkit.ctx.PartialCompositeDirContext.search(PartialCompositeDirContext.java:339)
    at javax.naming.directory.InitialDirContext.search(InitialDirContext.java:267)
    at org.springframework.ldap.pool.DelegatingDirContext.search(DelegatingDirContext.java:347)
    at org.springframework.ldap.core.LdapTemplate$4.executeSearch(LdapTemplate.java:252)
    at org.springframework.ldap.core.LdapTemplate.search(LdapTemplate.java:292)
    ... 63 more
Caused by: java.net.SocketException: Connection reset
    at java.net.SocketInputStream.read(SocketInputStream.java:196)
    at java.net.SocketInputStream.read(SocketInputStream.java:122)
    at java.io.BufferedInputStream.fill(BufferedInputStream.java:235)
    at java.io.BufferedInputStream.read1(BufferedInputStream.java:275)
    at java.io.BufferedInputStream.read(BufferedInputStream.java:334)
    at com.sun.jndi.ldap.Connection.run(Connection.java:853)
    ... 1 more

2015-11-30_02:25:28 c.t.c.s.s.ServiceProviderImpl createUser 168 - ERROR --- SXM 5955d46b-a8f9-251e-9b88-fcc11c0c8328 LD_Update_Test_21@gmail.com Error Code: 26
2015-11-30_02:25:28 c.t.c.c.e.GenericExceptionHandler toResponse 28 - ERROR --- SXM 5955d46b-a8f9-251e-9b88-fcc11c0c8328 Error Code: 19
2015-11-30_02:25:28 c.t.c.c.e.GenericExceptionHandler toResponse 32 - INFO  --- SXM 5955d46b-a8f9-251e-9b88-fcc11c0c8328 Error Code: 19 Response Sent Out <--

1 个答案:

答案 0 :(得分:0)

您应该检查上下文是否正确,并且该上下文中有用户:ou=people,ou=lexus,ou=lexusconsumers,o=teds

您可以使用JXplorer之类的内容来验证上下文是否正确。

如果该上下文正确,则尝试增加目录端的读取和连接超时。增加这些值可能允许操作完成并防止连接重置问题。