Uploaded image for project: 'Runtime'
  1. Runtime
  2. RUNTIME-2475

Safemode is launched when we save the configuration with an invalid and used ldapdatasource

    • Icon: Bug Bug
    • Resolution: Duplicate
    • Icon: Major Major
    • 4.5.0
    • 4.0RC4
    • None
    • None

      • Have an unused and invalid datasource
      • Save the cms configuration
      • The cms safe mode is activating

          [RUNTIME-2475] Safemode is launched when we save the configuration with an invalid and used ldapdatasource

          Raphaël Franchet added a comment - - edited

          at first launch, the isInUse is wrong because of a circular dependency
          so it should go to safe mode at first start and it doesn't

          I cannot reproduce your behavior that makes things fall in work with a hot restart

          Raphaël Franchet added a comment - - edited at first launch, the isInUse is wrong because of a circular dependency so it should go to safe mode at first start and it doesn't I cannot reproduce your behavior that makes things fall in work with a hot restart

          After restart log

          
          

          Date: Thu May 18 13:34:32 CEST 2017 (1495107272112)
          Thread: http-nio-8086-exec-4
          Message #: 402
          Level: ERROR
          NDC:
          Category: org.ametys.runtime.plugin.PluginsManager
          Message: Caught an exception loading components.
          Location: org.ametys.runtime.plugin.PluginsManager.init(PluginsManager.java:424)
          Thrown:
          java.lang.Exception: Caught an exception trying to initialize the component org.ametys.core.datasource.LDAPDataSourceManager
          at org.ametys.runtime.plugin.component.ThreadSafeComponentManager.initialize(ThreadSafeComponentManager.java:212)
          at org.ametys.runtime.plugin.PluginsManager.init(PluginsManager.java:420)
          at org.ametys.runtime.cocoon.TreeProcessor.compose(TreeProcessor.java:49)
          at org.apache.avalon.framework.container.ContainerUtil.compose(ContainerUtil.java:174)
          at org.apache.avalon.excalibur.component.DefaultComponentFactory.newInstance(DefaultComponentFactory.java:266)
          at org.apache.avalon.excalibur.component.ThreadSafeComponentHandler.initialize(ThreadSafeComponentHandler.java:108)
          at org.apache.avalon.excalibur.component.ExcaliburComponentManager.initialize(ExcaliburComponentManager.java:524)
          at org.apache.cocoon.components.CocoonComponentManager.initialize(CocoonComponentManager.java:583)
          at org.apache.avalon.framework.container.ContainerUtil.initialize(ContainerUtil.java:245)
          at org.apache.cocoon.Cocoon.initialize(Cocoon.java:345)
          at org.apache.avalon.framework.container.ContainerUtil.initialize(ContainerUtil.java:245)
          at org.ametys.runtime.servlet.RuntimeServlet._createCocoon(RuntimeServlet.java:351)
          at org.ametys.runtime.servlet.RuntimeServlet._initAmetys(RuntimeServlet.java:285)
          at org.ametys.runtime.servlet.RuntimeServlet.restartCocoon(RuntimeServlet.java:621)
          at org.ametys.runtime.servlet.RuntimeServlet.service(RuntimeServlet.java:584)
          at javax.servlet.http.HttpServlet.service(HttpServlet.java:729)
          at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:291)
          at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
          at org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:52)
          at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:239)
          at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
          at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:219)
          at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:106)
          at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:142)
          at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:79)
          at org.apache.catalina.valves.AbstractAccessLogValve.invoke(AbstractAccessLogValve.java:610)
          at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:88)
          at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:518)
          at org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1091)
          at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:668)
          at org.apache.coyote.http11.Http11NioProtocol$Http11ConnectionHandler.process(Http11NioProtocol.java:223)
          at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1517)
          at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.run(NioEndpoint.java:1474)
          at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
          at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
          at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61)
          at java.lang.Thread.run(Thread.java:745)
          Caused by: org.ametys.runtime.parameter.ParameterCheckerTestFailureException: javax.naming.CommunicationException: localhost:636 [Root exception is java.net.ConnectException: Connexion refusée (Connection refused)]
          at org.ametys.plugins.core.impl.checker.LDAPConnectionChecker.check(LDAPConnectionChecker.java:81)
          at org.ametys.core.datasource.LDAPDataSourceManager.checkParameters(LDAPDataSourceManager.java:101)
          at org.ametys.core.datasource.AbstractDataSourceManager.initialize(AbstractDataSourceManager.java:111)
          at org.apache.avalon.framework.container.ContainerUtil.initialize(ContainerUtil.java:245)
          at org.ametys.runtime.plugin.component.ThreadSafeComponentManager$ComponentFactory.configureAndStart(ThreadSafeComponentManager.java:367)
          at org.ametys.runtime.plugin.component.PluginsComponentManager$ProxyComponentFactory.newInstance(PluginsComponentManager.java:156)
          at org.ametys.runtime.plugin.component.PluginsComponentManager$ProxyComponentFactory.newInstance(PluginsComponentManager.java:121)
          at org.ametys.runtime.plugin.component.ThreadSafeComponentManager.initialize(ThreadSafeComponentManager.java:206)
          ... 36 more
          Caused by: javax.naming.CommunicationException: localhost:636 [Root exception is java.net.ConnectException: Connexion refusée (Connection refused)]
          at com.sun.jndi.ldap.Connection.<init>(Connection.java:216)
          at com.sun.jndi.ldap.LdapClient.<init>(LdapClient.java:137)
          at com.sun.jndi.ldap.LdapClient.getInstance(LdapClient.java:1614)
          at com.sun.jndi.ldap.LdapCtx.connect(LdapCtx.java:2746)
          at com.sun.jndi.ldap.LdapCtx.<init>(LdapCtx.java:319)
          at com.sun.jndi.ldap.LdapCtxFactory.getUsingURL(LdapCtxFactory.java:192)
          at com.sun.jndi.ldap.LdapCtxFactory.getUsingURLs(LdapCtxFactory.java:210)
          at com.sun.jndi.ldap.LdapCtxFactory.getLdapCtxInstance(LdapCtxFactory.java:153)
          at com.sun.jndi.ldap.LdapCtxFactory.getInitialContext(LdapCtxFactory.java:83)
          at javax.naming.spi.NamingManager.getInitialContext(NamingManager.java:684)
          at javax.naming.InitialContext.getDefaultInitCtx(InitialContext.java:313)
          at javax.naming.InitialContext.init(InitialContext.java:244)
          at javax.naming.InitialContext.<init>(InitialContext.java:216)
          at javax.naming.directory.InitialDirContext.<init>(InitialDirContext.java:101)
          at org.ametys.plugins.core.impl.checker.LDAPConnectionChecker.check(LDAPConnectionChecker.java:74)
          ... 43 more
          Caused by: java.net.ConnectException: Connexion refusée (Connection refused)
          at java.net.PlainSocketImpl.socketConnect(Native Method)
          at java.net.AbstractPlainSocketImpl.doConnect(AbstractPlainSocketImpl.java:350)
          at java.net.AbstractPlainSocketImpl.connectToAddress(AbstractPlainSocketImpl.java:206)
          at java.net.AbstractPlainSocketImpl.connect(AbstractPlainSocketImpl.java:188)
          at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:392)
          at java.net.Socket.connect(Socket.java:589)
          at sun.security.ssl.SSLSocketImpl.connect(SSLSocketImpl.java:668)
          at sun.security.ssl.SSLSocketImpl.<init>(SSLSocketImpl.java:427)
          at sun.security.ssl.SSLSocketFactoryImpl.createSocket(SSLSocketFactoryImpl.java:88)
          at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
          at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
          at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
          at java.lang.reflect.Method.invoke(Method.java:498)
          at com.sun.jndi.ldap.Connection.createSocket(Connection.java:328)
          at com.sun.jndi.ldap.Connection.<init>(Connection.java:203)
          ... 57 more
          {code]

          Raphaël Franchet added a comment - After restart log Date: Thu May 18 13:34:32 CEST 2017 (1495107272112) Thread: http-nio-8086-exec-4 Message #: 402 Level: ERROR NDC: Category: org.ametys.runtime.plugin.PluginsManager Message: Caught an exception loading components. Location: org.ametys.runtime.plugin.PluginsManager.init(PluginsManager.java:424) Thrown: java.lang.Exception: Caught an exception trying to initialize the component org.ametys.core.datasource.LDAPDataSourceManager at org.ametys.runtime.plugin.component.ThreadSafeComponentManager.initialize(ThreadSafeComponentManager.java:212) at org.ametys.runtime.plugin.PluginsManager.init(PluginsManager.java:420) at org.ametys.runtime.cocoon.TreeProcessor.compose(TreeProcessor.java:49) at org.apache.avalon.framework.container.ContainerUtil.compose(ContainerUtil.java:174) at org.apache.avalon.excalibur.component.DefaultComponentFactory.newInstance(DefaultComponentFactory.java:266) at org.apache.avalon.excalibur.component.ThreadSafeComponentHandler.initialize(ThreadSafeComponentHandler.java:108) at org.apache.avalon.excalibur.component.ExcaliburComponentManager.initialize(ExcaliburComponentManager.java:524) at org.apache.cocoon.components.CocoonComponentManager.initialize(CocoonComponentManager.java:583) at org.apache.avalon.framework.container.ContainerUtil.initialize(ContainerUtil.java:245) at org.apache.cocoon.Cocoon.initialize(Cocoon.java:345) at org.apache.avalon.framework.container.ContainerUtil.initialize(ContainerUtil.java:245) at org.ametys.runtime.servlet.RuntimeServlet._createCocoon(RuntimeServlet.java:351) at org.ametys.runtime.servlet.RuntimeServlet._initAmetys(RuntimeServlet.java:285) at org.ametys.runtime.servlet.RuntimeServlet.restartCocoon(RuntimeServlet.java:621) at org.ametys.runtime.servlet.RuntimeServlet.service(RuntimeServlet.java:584) at javax.servlet.http.HttpServlet.service(HttpServlet.java:729) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:291) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206) at org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:52) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:239) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206) at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:219) at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:106) at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:142) at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:79) at org.apache.catalina.valves.AbstractAccessLogValve.invoke(AbstractAccessLogValve.java:610) at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:88) at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:518) at org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1091) at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:668) at org.apache.coyote.http11.Http11NioProtocol$Http11ConnectionHandler.process(Http11NioProtocol.java:223) at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1517) at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.run(NioEndpoint.java:1474) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61) at java.lang.Thread.run(Thread.java:745) Caused by: org.ametys.runtime.parameter.ParameterCheckerTestFailureException: javax.naming.CommunicationException: localhost:636 [Root exception is java.net.ConnectException: Connexion refusée (Connection refused)] at org.ametys.plugins.core.impl.checker.LDAPConnectionChecker.check(LDAPConnectionChecker.java:81) at org.ametys.core.datasource.LDAPDataSourceManager.checkParameters(LDAPDataSourceManager.java:101) at org.ametys.core.datasource.AbstractDataSourceManager.initialize(AbstractDataSourceManager.java:111) at org.apache.avalon.framework.container.ContainerUtil.initialize(ContainerUtil.java:245) at org.ametys.runtime.plugin.component.ThreadSafeComponentManager$ComponentFactory.configureAndStart(ThreadSafeComponentManager.java:367) at org.ametys.runtime.plugin.component.PluginsComponentManager$ProxyComponentFactory.newInstance(PluginsComponentManager.java:156) at org.ametys.runtime.plugin.component.PluginsComponentManager$ProxyComponentFactory.newInstance(PluginsComponentManager.java:121) at org.ametys.runtime.plugin.component.ThreadSafeComponentManager.initialize(ThreadSafeComponentManager.java:206) ... 36 more Caused by: javax.naming.CommunicationException: localhost:636 [Root exception is java.net.ConnectException: Connexion refusée (Connection refused)] at com.sun.jndi.ldap.Connection.<init>(Connection.java:216) at com.sun.jndi.ldap.LdapClient.<init>(LdapClient.java:137) at com.sun.jndi.ldap.LdapClient.getInstance(LdapClient.java:1614) at com.sun.jndi.ldap.LdapCtx.connect(LdapCtx.java:2746) at com.sun.jndi.ldap.LdapCtx.<init>(LdapCtx.java:319) at com.sun.jndi.ldap.LdapCtxFactory.getUsingURL(LdapCtxFactory.java:192) at com.sun.jndi.ldap.LdapCtxFactory.getUsingURLs(LdapCtxFactory.java:210) at com.sun.jndi.ldap.LdapCtxFactory.getLdapCtxInstance(LdapCtxFactory.java:153) at com.sun.jndi.ldap.LdapCtxFactory.getInitialContext(LdapCtxFactory.java:83) at javax.naming.spi.NamingManager.getInitialContext(NamingManager.java:684) at javax.naming.InitialContext.getDefaultInitCtx(InitialContext.java:313) at javax.naming.InitialContext.init(InitialContext.java:244) at javax.naming.InitialContext.<init>(InitialContext.java:216) at javax.naming.directory.InitialDirContext.<init>(InitialDirContext.java:101) at org.ametys.plugins.core.impl.checker.LDAPConnectionChecker.check(LDAPConnectionChecker.java:74) ... 43 more Caused by: java.net.ConnectException: Connexion refusée (Connection refused) at java.net.PlainSocketImpl.socketConnect(Native Method) at java.net.AbstractPlainSocketImpl.doConnect(AbstractPlainSocketImpl.java:350) at java.net.AbstractPlainSocketImpl.connectToAddress(AbstractPlainSocketImpl.java:206) at java.net.AbstractPlainSocketImpl.connect(AbstractPlainSocketImpl.java:188) at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:392) at java.net.Socket.connect(Socket.java:589) at sun.security.ssl.SSLSocketImpl.connect(SSLSocketImpl.java:668) at sun.security.ssl.SSLSocketImpl.<init>(SSLSocketImpl.java:427) at sun.security.ssl.SSLSocketFactoryImpl.createSocket(SSLSocketFactoryImpl.java:88) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:498) at com.sun.jndi.ldap.Connection.createSocket(Connection.java:328) at com.sun.jndi.ldap.Connection.<init>(Connection.java:203) ... 57 more {code]

            raphael Raphaël Franchet
            lbouchet Loïc Bouchet
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: