我正在测试OpenAm 12(是的,我是新手)并且我正在尝试将Tivoli Directory Server设置为Datasource但收效甚微。
我的设置似乎没问题(我使用JXplorer测试我的绑定)但是收到此错误:
ERROR: Connection factory became offline: CachedConnectionPool(size=0[in:0
+out:0 + pending:0],maxSize=10, blocked=0,
factory=AuthenticatedConnectionFactory(HeartBeatConnectionFactory(LDAPConnection
Factory(MYHOST:PORT)), SimpleBindRequest(name=cn=admin, authentication=simple, controls=[])))
HOST:PORT 已正确设置。
完整的调试堆栈如下:
amIdm:06/17/2015 02:58:20:158 PM CEST: Thread[http-bio-8080-exec-4,5,main]
IdRepoPluginsCache.getIdRepoPlugins orgName: dc=openam,dc=example,dc=com
DJLDAPv3Repo:06/17/2015 02:58:20:159 PM CEST: Thread[http-bio-8080-exec-4,5,main]
getSupportedTypes invoked
amIdm:06/17/2015 02:58:20:159 PM CEST: Thread[http-bio-8080-exec-4,5,main]
IdRepoPluginsCache.getIdRepoPlugins orgName: dc=openam,dc=example,dc=com
DJLDAPv3Repo:06/17/2015 02:58:20:159 PM CEST: Thread[http-bio-8080-exec-4,5,main]
getSupportedTypes invoked
amIdm:06/17/2015 02:58:20:159 PM CEST: Thread[http-bio-8080-exec-4,5,main]
IdRepoPluginsCache.getIdRepoPlugins orgName: dc=openam,dc=example,dc=com
DJLDAPv3Repo:06/17/2015 02:58:20:159 PM CEST: Thread[http-bio-8080-exec-4,5,main]
getSupportedTypes invoked
amIdm:06/17/2015 02:58:20:160 PM CEST: Thread[http-bio-8080-exec-4,5,main]
IdRepoPluginsCache.getIdRepoPlugins orgName: dc=openam,dc=example,dc=com
DJLDAPv3Repo:06/17/2015 02:58:20:160 PM CEST: Thread[http-bio-8080-exec-4,5,main]
getSupportedTypes invoked
amIdm:06/17/2015 02:58:20:160 PM CEST: Thread[http-bio-8080-exec-4,5,main]
IdRepoPluginsCache.getIdRepoPlugins orgName: dc=openam,dc=example,dc=com
DJLDAPv3Repo:06/17/2015 02:58:20:160 PM CEST: Thread[http-bio-8080-exec-4,5,main]
getSupportedTypes invoked
amIdm:06/17/2015 02:58:20:160 PM CEST: Thread[http-bio-8080-exec-4,5,main]
IdRepoPluginsCache.getIdRepoPlugins orgName: dc=openam,dc=example,dc=com
DJLDAPv3Repo:06/17/2015 02:58:20:160 PM CEST: Thread[http-bio-8080-exec-4,5,main]
getSupportedTypes invoked
amIdm:06/17/2015 02:58:20:164 PM CEST: Thread[http-bio-8080-exec-4,5,main]
IdRepoPluginsCache.getIdRepoPlugins orgName: dc=openam,dc=example,dc=com
DJLDAPv3Repo:06/17/2015 02:58:20:164 PM CEST: Thread[http-bio-8080-exec-4,5,main]
getSupportedTypes invoked
amIdm:06/17/2015 02:58:20:175 PM CEST: Thread[http-bio-8080-exec-4,5,main]
IdRepoPluginsCache.getIdRepoPlugins for OrgName: dc=openam,dc=example,dc=com Op: Operation: service Type: IdType: realm
DJLDAPv3Repo:06/17/2015 02:58:20:175 PM CEST: Thread[http-bio-8080-exec-4,5,main]
getAssignedServices invoked
DJLDAPv3Repo:06/17/2015 02:58:20:175 PM CEST: Thread[http-bio-8080-exec-4,5,main]
Assigned services returned: []
amIdm:06/17/2015 02:58:20:176 PM CEST: Thread[http-bio-8080-exec-4,5,main]
IdRepoPluginsCache.getIdRepoPlugins for OrgName: dc=openam,dc=example,dc=com Op: Operation: read Type: IdType: user
amIdm:06/17/2015 02:58:20:176 PM CEST: Thread[http-bio-8080-exec-4,5,main]
IdRepoPluginsCache.getIdRepoPlugins orgName: dc=openam,dc=example,dc=com
DJLDAPv3Repo:06/17/2015 02:58:20:176 PM CEST: Thread[http-bio-8080-exec-4,5,main]
getSupportedTypes invoked
DJLDAPv3Repo:06/17/2015 02:58:20:176 PM CEST: Thread[http-bio-8080-exec-4,5,main]
getSupportedOperations invoked
amIdm:06/17/2015 02:58:20:176 PM CEST: Thread[http-bio-8080-exec-4,5,main]
IdRepoPluginsCache.getIdRepoPlugins retuned for OrgName: dc=openam,dc=example,dc=com Op: Operation: read Type: IdType: user Plugins: [org.forgerock.openam.idrepo.ldap.DJLDAPv3Repo, com.sun.identity.idm.plugins.internal.SpecialRepo]
DJLDAPv3Repo:06/17/2015 02:58:20:177 PM CEST: Thread[http-bio-8080-exec-4,5,main]
search invoked with type: IdType: user pattern: * avPairs: null maxTime: 5 maxResults: 100 returnAttrs: null returnAllAttrs: false filterOp: 0 recursive: false
LDAPUtils:06/17/2015 02:58:20:212 PM CEST: Thread[http-bio-8080-exec-4,5,main]
ERROR: Connection factory became offline: CachedConnectionPool(size=0[in:0 + out:0 + pending:0], maxSize=10, blocked=0, factory=AuthenticatedConnectionFactory(HeartBeatConnectionFactory(LDAPConnectionFactory(MYHOST:PORT)), SimpleBindRequest(name=cn=admin, authentication=simple, controls=[])))
org.forgerock.opendj.ldap.ConnectionException: Server Connection Closed
at org.forgerock.opendj.ldap.ErrorResultException.newErrorResult(ErrorResultException.java:210)
at com.forgerock.opendj.ldap.AbstractLDAPFutureResultImpl.setResultOrError(AbstractLDAPFutureResultImpl.java:138)
at com.forgerock.opendj.ldap.AbstractLDAPFutureResultImpl.adaptErrorResult(AbstractLDAPFutureResultImpl.java:127)
at com.forgerock.opendj.ldap.LDAPConnection.close(LDAPConnection.java:690)
at com.forgerock.opendj.ldap.LDAPClientFilter.handleClose(LDAPClientFilter.java:480)
at org.glassfish.grizzly.filterchain.ExecutorResolver$4.execute(ExecutorResolver.java:76)
at org.glassfish.grizzly.filterchain.DefaultFilterChain.executeFilter(DefaultFilterChain.java:291)
at org.glassfish.grizzly.filterchain.DefaultFilterChain.executeChainPart(DefaultFilterChain.java:209)
at org.glassfish.grizzly.filterchain.DefaultFilterChain.execute(DefaultFilterChain.java:137)
at org.glassfish.grizzly.filterchain.DefaultFilterChain.process(DefaultFilterChain.java:115)
at org.glassfish.grizzly.ProcessorExecutor.execute(ProcessorExecutor.java:77)
at org.glassfish.grizzly.nio.transport.TCPNIOTransport.fireIOEvent(TCPNIOTransport.java:550)
at org.glassfish.grizzly.nio.NIOConnection.preClose(NIOConnection.java:744)
at org.glassfish.grizzly.nio.transport.TCPNIOConnection.preClose(TCPNIOConnection.java:97)
at org.glassfish.grizzly.nio.NIOConnection.close0(NIOConnection.java:475)
at org.glassfish.grizzly.nio.transport.TCPNIOConnection.close0(TCPNIOConnection.java:292)
at org.glassfish.grizzly.nio.transport.TCPNIOTransport.read(TCPNIOTransport.java:623)
at org.glassfish.grizzly.nio.transport.TCPNIOTemporarySelectorReader.readNow0(TCPNIOTemporarySelectorReader.java:65)
at org.glassfish.grizzly.nio.tmpselectors.TemporarySelectorReader.read0(TemporarySelectorReader.java:171)
at org.glassfish.grizzly.nio.tmpselectors.TemporarySelectorReader.read0(TemporarySelectorReader.java:141)
at org.glassfish.grizzly.nio.tmpselectors.TemporarySelectorReader.read(TemporarySelectorReader.java:113)
at org.glassfish.grizzly.nio.tmpselectors.TemporarySelectorReader.read(TemporarySelectorReader.java:75)
at org.glassfish.grizzly.AbstractReader.read(AbstractReader.java:72)
at org.glassfish.grizzly.nio.transport.TCPNIOTransportFilter.handleRead(TCPNIOTransportFilter.java:77)
at org.glassfish.grizzly.filterchain.TransportFilter.handleRead(TransportFilter.java:173)
at org.glassfish.grizzly.filterchain.ExecutorResolver$9.execute(ExecutorResolver.java:119)
at org.glassfish.grizzly.filterchain.DefaultFilterChain.executeFilter(DefaultFilterChain.java:291)
at org.glassfish.grizzly.filterchain.DefaultFilterChain.executeChainPart(DefaultFilterChain.java:209)
at org.glassfish.grizzly.filterchain.DefaultFilterChain.execute(DefaultFilterChain.java:137)
at org.glassfish.grizzly.filterchain.DefaultFilterChain.process(DefaultFilterChain.java:115)
at org.glassfish.grizzly.ProcessorExecutor.execute(ProcessorExecutor.java:77)
at org.glassfish.grizzly.nio.transport.TCPNIOTransport.fireIOEvent(TCPNIOTransport.java:550)
at org.glassfish.grizzly.strategies.AbstractIOStrategy.fireIOEvent(AbstractIOStrategy.java:112)
at org.glassfish.grizzly.strategies.WorkerThreadIOStrategy.run0(WorkerThreadIOStrategy.java:117)
at org.glassfish.grizzly.strategies.WorkerThreadIOStrategy.access$100(WorkerThreadIOStrategy.java:56)
at org.glassfish.grizzly.strategies.WorkerThreadIOStrategy$WorkerThreadRunnable.run(WorkerThreadIOStrategy.java:137)
at org.glassfish.grizzly.threadpool.AbstractThreadPool$Worker.doWork(AbstractThreadPool.java:565)
at org.glassfish.grizzly.threadpool.AbstractThreadPool$Worker.run(AbstractThreadPool.java:545)
at java.lang.Thread.run(Unknown Source)
DJLDAPv3Repo:06/17/2015 02:58:20:212 PM CEST: Thread[http-bio-8080-exec-4,5,main]
ERROR: Unexpected error occurred during search
org.forgerock.opendj.ldap.ConnectionException: Connect Error: No operational connection factories available
at org.forgerock.opendj.ldap.ErrorResultException.newErrorResult(ErrorResultException.java:210)
at org.forgerock.opendj.ldap.ErrorResultException.newErrorResult(ErrorResultException.java:172)
at org.forgerock.opendj.ldap.ErrorResultException.newErrorResult(ErrorResultException.java:142)
at org.forgerock.opendj.ldap.AbstractLoadBalancingAlgorithm.getMonitoredConnectionFactory(AbstractLoadBalancingAlgorithm.java:389)
at org.forgerock.opendj.ldap.AbstractLoadBalancingAlgorithm.access$100(AbstractLoadBalancingAlgorithm.java:55)
at org.forgerock.opendj.ldap.AbstractLoadBalancingAlgorithm$MonitoredConnectionFactory.getConnection(AbstractLoadBalancingAlgorithm.java:84)
at org.forgerock.opendj.ldap.LoadBalancer.getConnection(LoadBalancer.java:53)
at org.forgerock.openam.idrepo.ldap.DJLDAPv3Repo.search(DJLDAPv3Repo.java:1124)
at com.sun.identity.idm.server.IdServicesImpl.search(IdServicesImpl.java:1528)
at com.sun.identity.idm.server.IdCachedServicesImpl.search(IdCachedServicesImpl.java:640)
at com.sun.identity.idm.AMIdentityRepository.searchIdentities(AMIdentityRepository.java:298)
at com.sun.identity.console.idm.model.EntitiesModelImpl.getEntityNames(EntitiesModelImpl.java:196)
at com.sun.identity.console.idm.EntitiesViewBean.getEntityNames(EntitiesViewBean.java:248)
at com.sun.identity.console.idm.EntitiesViewBean.beginDisplay(EntitiesViewBean.java:192)
at com.iplanet.jato.taglib.UseViewBeanTag.doStartTag(UseViewBeanTag.java:149)
at org.apache.jsp.console.idm.Entities_jsp._jspService(Entities_jsp.java:143)
at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:70)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:731)
at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:439)
at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:395)
at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:339)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:731)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:303)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208)
at org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:52)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:241)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208)
at org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispatcher.java:748)
at org.apache.catalina.core.ApplicationDispatcher.processRequest(ApplicationDispatcher.java:486)
at org.apache.catalina.core.ApplicationDispatcher.doForward(ApplicationDispatcher.java:411)
at org.apache.catalina.core.ApplicationDispatcher.forward(ApplicationDispatcher.java:338)
at com.iplanet.jato.view.ViewBeanBase.forward(ViewBeanBase.java:340)
at com.iplanet.jato.view.ViewBeanBase.forwardTo(ViewBeanBase.java:261)
at com.sun.identity.console.base.AMViewBeanBase.forwardTo(AMViewBeanBase.java:161)
at com.sun.identity.console.base.AMPrimaryMastHeadViewBean.forwardTo(AMPrimaryMastHeadViewBean.java:116)
at com.sun.identity.console.idm.HomeViewBean.forwardTo(HomeViewBean.java:96)
at com.sun.identity.console.realm.RealmPropertiesBase.nodeClicked(RealmPropertiesBase.java:77)
at com.sun.web.ui.view.tabs.CCTabs.handleTabHrefRequest(CCTabs.java:129)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at com.iplanet.jato.view.command.DefaultRequestHandlingCommand.execute(DefaultRequestHandlingCommand.java:183)
at com.iplanet.jato.view.RequestHandlingViewBase.handleRequest(RequestHandlingViewBase.java:308)
at com.iplanet.jato.view.ViewBeanBase.dispatchInvocation(ViewBeanBase.java:802)
at com.iplanet.jato.view.ViewBeanBase.invokeRequestHandlerInternal(ViewBeanBase.java:740)
at com.iplanet.jato.view.ViewBeanBase.invokeRequestHandlerInternal(ViewBeanBase.java:760)
at com.iplanet.jato.view.ViewBeanBase.invokeRequestHandler(ViewBeanBase.java:571)
at com.iplanet.jato.ApplicationServletBase.dispatchRequest(ApplicationServletBase.java:957)
at com.iplanet.jato.ApplicationServletBase.processRequest(ApplicationServletBase.java:615)
at com.iplanet.jato.ApplicationServletBase.doGet(ApplicationServletBase.java:459)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:624)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:731)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:303)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208)
at org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:52)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:241)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208)
at org.forgerock.openam.validation.ResponseValidationFilter.doFilter(ResponseValidationFilter.java:44)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:241)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208)
at com.sun.identity.setup.AMSetupFilter.doFilter(AMSetupFilter.java:100)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:241)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:220)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:122)
at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:505)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:170)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:103)
at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:957)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:116)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:423)
at org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1079)
at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:620)
at org.apache.tomcat.util.net.JIoEndpoint$SocketProcessor.run(JIoEndpoint.java:318)
at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61)
at java.lang.Thread.run(Unknown Source)
Caused by: org.forgerock.opendj.ldap.ConnectionException: Server Connection Closed
at org.forgerock.opendj.ldap.ErrorResultException.newErrorResult(ErrorResultException.java:210)
at com.forgerock.opendj.ldap.AbstractLDAPFutureResultImpl.setResultOrError(AbstractLDAPFutureResultImpl.java:138)
at com.forgerock.opendj.ldap.AbstractLDAPFutureResultImpl.adaptErrorResult(AbstractLDAPFutureResultImpl.java:127)
at com.forgerock.opendj.ldap.LDAPConnection.close(LDAPConnection.java:690)
at com.forgerock.opendj.ldap.LDAPClientFilter.handleClose(LDAPClientFilter.java:480)
at org.glassfish.grizzly.filterchain.ExecutorResolver$4.execute(ExecutorResolver.java:76)
at org.glassfish.grizzly.filterchain.DefaultFilterChain.executeFilter(DefaultFilterChain.java:291)
at org.glassfish.grizzly.filterchain.DefaultFilterChain.executeChainPart(DefaultFilterChain.java:209)
at org.glassfish.grizzly.filterchain.DefaultFilterChain.execute(DefaultFilterChain.java:137)
at org.glassfish.grizzly.filterchain.DefaultFilterChain.process(DefaultFilterChain.java:115)
at org.glassfish.grizzly.ProcessorExecutor.execute(ProcessorExecutor.java:77)
at org.glassfish.grizzly.nio.transport.TCPNIOTransport.fireIOEvent(TCPNIOTransport.java:550)
at org.glassfish.grizzly.nio.NIOConnection.preClose(NIOConnection.java:744)
at org.glassfish.grizzly.nio.transport.TCPNIOConnection.preClose(TCPNIOConnection.java:97)
at org.glassfish.grizzly.nio.NIOConnection.close0(NIOConnection.java:475)
at org.glassfish.grizzly.nio.transport.TCPNIOConnection.close0(TCPNIOConnection.java:292)
at org.glassfish.grizzly.nio.transport.TCPNIOTransport.read(TCPNIOTransport.java:623)
at org.glassfish.grizzly.nio.transport.TCPNIOTemporarySelectorReader.readNow0(TCPNIOTemporarySelectorReader.java:65)
at org.glassfish.grizzly.nio.tmpselectors.TemporarySelectorReader.read0(TemporarySelectorReader.java:171)
at org.glassfish.grizzly.nio.tmpselectors.TemporarySelectorReader.read0(TemporarySelectorReader.java:141)
at org.glassfish.grizzly.nio.tmpselectors.TemporarySelectorReader.read(TemporarySelectorReader.java:113)
at org.glassfish.grizzly.nio.tmpselectors.TemporarySelectorReader.read(TemporarySelectorReader.java:75)
at org.glassfish.grizzly.AbstractReader.read(AbstractReader.java:72)
at org.glassfish.grizzly.nio.transport.TCPNIOTransportFilter.handleRead(TCPNIOTransportFilter.java:77)
at org.glassfish.grizzly.filterchain.TransportFilter.handleRead(TransportFilter.java:173)
at org.glassfish.grizzly.filterchain.ExecutorResolver$9.execute(ExecutorResolver.java:119)
at org.glassfish.grizzly.filterchain.DefaultFilterChain.executeFilter(DefaultFilterChain.java:291)
at org.glassfish.grizzly.filterchain.DefaultFilterChain.executeChainPart(DefaultFilterChain.java:209)
at org.glassfish.grizzly.filterchain.DefaultFilterChain.execute(DefaultFilterChain.java:137)
at org.glassfish.grizzly.filterchain.DefaultFilterChain.process(DefaultFilterChain.java:115)
at org.glassfish.grizzly.ProcessorExecutor.execute(ProcessorExecutor.java:77)
at org.glassfish.grizzly.nio.transport.TCPNIOTransport.fireIOEvent(TCPNIOTransport.java:550)
at org.glassfish.grizzly.strategies.AbstractIOStrategy.fireIOEvent(AbstractIOStrategy.java:112)
at org.glassfish.grizzly.strategies.WorkerThreadIOStrategy.run0(WorkerThreadIOStrategy.java:117)
at org.glassfish.grizzly.strategies.WorkerThreadIOStrategy.access$100(WorkerThreadIOStrategy.java:56)
at org.glassfish.grizzly.strategies.WorkerThreadIOStrategy$WorkerThreadRunnable.run(WorkerThreadIOStrategy.java:137)
at org.glassfish.grizzly.threadpool.AbstractThreadPool$Worker.doWork(AbstractThreadPool.java:565)
at org.glassfish.grizzly.threadpool.AbstractThreadPool$Worker.run(AbstractThreadPool.java:545)
... 1 more
如果有人可以帮助我,我会很感激。
答案 0 :(得分:0)
似乎这个错误来自于我的LDAP目录不允许匿名连接这一事实。当匿名启用时,一切都按预期工作,但当我在生产中部署时,这不是一个可接受的解决方案。
我猜插件org.forgerock.openam.idrepo.ldap.DJLDAPv3Repo
完成的心跳并没有尝试使用提供的" admin"凭证,但确实使用它们进行搜索。
使用插件com.sun.identity.idm.plugins.ldapv3.LDAPv3Repo
可以让我连接到我的LDAP目录,但是在使用OpenAm身份验证时我会遇到其他类型的错误,因此它不是真正的解决方案。
------------编辑------------
解决方案是由OpenAm论坛的成员提供给我的。我必须通过将openam-auth-ldap-heartbeat-interval
设置为0来关闭LDAP心跳请求。
有关详细信息,请参阅https://forgerock.org/topic/tivoli-ldap-with-annonymous-connection-disabled/#post-4520
<强> ------------------------------ 强>