Uploaded image for project: 'Nuxeo Platform'
  1. Nuxeo Platform
  2. NXP-29866

Fix "NuxeoException: Cannot register standby command" when changing context root

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Critical
    • Resolution: Not A Bug
    • Affects Version/s: 10.10-HF34
    • Fix Version/s: None
    • Component/s: Core
    • Environment:
      changed context root

      Description

      What: when changing context root /nuxeo to something else, an exception NuxeoException: Cannot register standby command is thrown at startup since 10.10-HF34

      How to reproduce

      1. unzip the Nuxeo 10.10 ZIP installer
      2. nuxeoctl register # use a token
      3. change templates/common-base/conf/Catalina/localhost/nuxeo.xml.nxftl into templates/common-base/conf/Catalina/localhost/example.xml.nxftl
      4. nuxeoctl mp-install nuxeo-web-ui-2.4.0 nuxeo-jsf-ui-10.10.0 nuxeo-dam-6.4.3 nuxeo-template-rendering-6.8.3 nuxeo-10.10-HF34 --accept=true
      5. change in bin/nuxeo.conf to have:
        #org.nuxeo.dev=true
        nuxeo.wizard.done=true
        org.nuxeo.ecm.contextPath=/example
        org.nuxeo.ecm.product.name=example
        
      6. nuxeoctl console

      Notice at the end of the boot the exception in the console

      Warning: Nashorn engine is planned to be removed from a future JDK release
      2020-11-17T19:07:23,952 ERROR [OSGiAdapter] Error during Framework Listener execution : class org.nuxeo.runtime.osgi.OSGiRuntimeService
      org.nuxeo.ecm.core.api.NuxeoException: Cannot register standby command
              at org.nuxeo.ecm.core.management.standby.StandbyComponent.activate(StandbyComponent.java:78) ~[nuxeo-core-management-10.10-HF19.jar:?]
              at org.nuxeo.runtime.model.impl.ComponentInstanceImpl.activate(ComponentInstanceImpl.java:123) ~[nuxeo-runtime-10.10-HF10.jar:?]
              at org.nuxeo.runtime.model.impl.RegistrationInfoImpl.activate(RegistrationInfoImpl.java:428) ~[nuxeo-runtime-10.10-HF10.jar:?]
              at org.nuxeo.runtime.model.impl.ComponentManagerImpl.activateComponent(ComponentManagerImpl.java:547) ~[nuxeo-runtime-10.10-HF10.jar:?]
              at org.nuxeo.runtime.model.impl.ComponentManagerImpl.activateComponents(ComponentManagerImpl.java:526) ~[nuxeo-runtime-10.10-HF10.jar:?]
              at org.nuxeo.runtime.model.impl.ComponentManagerImpl.start(ComponentManagerImpl.java:786) ~[nuxeo-runtime-10.10-HF10.jar:?]
              at org.nuxeo.runtime.osgi.OSGiRuntimeService.startComponents(OSGiRuntimeService.java:447) ~[nuxeo-runtime-10.10-HF10.jar:?]
              at org.nuxeo.runtime.osgi.OSGiRuntimeService.frameworkEvent(OSGiRuntimeService.java:462) ~[nuxeo-runtime-10.10-HF10.jar:?]
              at org.nuxeo.osgi.OSGiAdapter.fireFrameworkEvent(OSGiAdapter.java:223) [nuxeo-runtime-osgi-10.10.jar:?]
              at org.nuxeo.osgi.application.loader.FrameworkLoader.doStart(FrameworkLoader.java:225) [nuxeo-runtime-osgi-10.10.jar:?]
              at org.nuxeo.osgi.application.loader.FrameworkLoader.start(FrameworkLoader.java:124) [nuxeo-runtime-osgi-10.10.jar:?]
              at org.nuxeo.runtime.deployment.NuxeoStarter.start(NuxeoStarter.java:124) [nuxeo-runtime-deploy-10.10.jar:?]
              at org.nuxeo.runtime.deployment.NuxeoStarter.contextInitialized(NuxeoStarter.java:93) [nuxeo-runtime-deploy-10.10.jar:?]
              at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:4716) [catalina-9.0.39.jar:9.0.39]
              at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5177) [catalina-9.0.39.jar:9.0.39]
              at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:183) [catalina-9.0.39.jar:9.0.39]
              at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:717) [catalina-9.0.39.jar:9.0.39]
              at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:690) [catalina-9.0.39.jar:9.0.39]
              at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:706) [catalina-9.0.39.jar:9.0.39]
              at org.apache.catalina.startup.HostConfig.deployDescriptor(HostConfig.java:631) [catalina-9.0.39.jar:9.0.39]
              at org.apache.catalina.startup.HostConfig$DeployDescriptor.run(HostConfig.java:1830) [catalina-9.0.39.jar:9.0.39]
              at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:515) [?:?]
              at java.util.concurrent.FutureTask.run(FutureTask.java:264) [?:?]
              at org.apache.tomcat.util.threads.InlineExecutorService.execute(InlineExecutorService.java:75) [tomcat-util-9.0.39.jar:9.0.39]
              at java.util.concurrent.AbstractExecutorService.submit(AbstractExecutorService.java:118) [?:?]
              at org.apache.catalina.startup.HostConfig.deployDescriptors(HostConfig.java:526) [catalina-9.0.39.jar:9.0.39]
              at org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:425) [catalina-9.0.39.jar:9.0.39]
              at org.apache.catalina.startup.HostConfig.start(HostConfig.java:1576) [catalina-9.0.39.jar:9.0.39]
              at org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java:309) [catalina-9.0.39.jar:9.0.39]
              at org.apache.catalina.util.LifecycleBase.fireLifecycleEvent(LifecycleBase.java:123) [catalina-9.0.39.jar:9.0.39]
              at org.apache.catalina.util.LifecycleBase.setStateInternal(LifecycleBase.java:423) [catalina-9.0.39.jar:9.0.39]
              at org.apache.catalina.util.LifecycleBase.setState(LifecycleBase.java:366) [catalina-9.0.39.jar:9.0.39]
              at org.apache.catalina.core.ContainerBase.startInternal(ContainerBase.java:936) [catalina-9.0.39.jar:9.0.39]
              at org.apache.catalina.core.StandardHost.startInternal(StandardHost.java:843) [catalina-9.0.39.jar:9.0.39]
              at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:183) [catalina-9.0.39.jar:9.0.39]
              at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1384) [catalina-9.0.39.jar:9.0.39]
              at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1374) [catalina-9.0.39.jar:9.0.39]
              at java.util.concurrent.FutureTask.run(FutureTask.java:264) [?:?]
              at org.apache.tomcat.util.threads.InlineExecutorService.execute(InlineExecutorService.java:75) [tomcat-util-9.0.39.jar:9.0.39]
              at java.util.concurrent.AbstractExecutorService.submit(AbstractExecutorService.java:140) [?:?]
              at org.apache.catalina.core.ContainerBase.startInternal(ContainerBase.java:909) [catalina-9.0.39.jar:9.0.39]
              at org.apache.catalina.core.StandardEngine.startInternal(StandardEngine.java:262) [catalina-9.0.39.jar:9.0.39]
              at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:183) [catalina-9.0.39.jar:9.0.39]
              at org.apache.catalina.core.StandardService.startInternal(StandardService.java:421) [catalina-9.0.39.jar:9.0.39]
              at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:183) [catalina-9.0.39.jar:9.0.39]
              at org.apache.catalina.core.StandardServer.startInternal(StandardServer.java:930) [catalina-9.0.39.jar:9.0.39]
              at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:183) [catalina-9.0.39.jar:9.0.39]
              at org.apache.catalina.startup.Catalina.start(Catalina.java:772) [catalina-9.0.39.jar:9.0.39]
              at jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:?]
              at jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[?:?]
              at jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[?:?]
              at java.lang.reflect.Method.invoke(Method.java:566) ~[?:?]
              at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:342) [bootstrap-9.0.39.jar:9.0.39]
              at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:473) [bootstrap-9.0.39.jar:9.0.39]
      Caused by: javax.management.InstanceAlreadyExistsException: org.nuxeo:name=org.nuxeo.ecm.core.management.standby.StandbyCommand,type=service
              at com.sun.jmx.mbeanserver.Repository.addMBean(Repository.java:436) ~[?:?]
              at com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.registerWithRepository(DefaultMBeanServerInterceptor.java:1855) ~[?:?]
              at com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.registerDynamicMBean(DefaultMBeanServerInterceptor.java:955) ~[?:?]
              at com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.registerObject(DefaultMBeanServerInterceptor.java:890) ~[?:?]
              at com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.registerMBean(DefaultMBeanServerInterceptor.java:320) ~[?:?]
              at com.sun.jmx.mbeanserver.JmxMBeanServer.registerMBean(JmxMBeanServer.java:522) ~[?:?]
              at org.nuxeo.ecm.core.management.standby.StandbyCommand$Registration.register(StandbyCommand.java:79) ~[nuxeo-core-management-10.10-HF19.jar:?]
              at org.nuxeo.ecm.core.management.standby.StandbyComponent.activate(StandbyComponent.java:76) ~[nuxeo-core-management-10.10-HF19.jar:?]
              ... 53 more
      2020-11-17T19:07:28,730 INFO  [application] jsf.core.injection.provider_generic_web_configured
      2020-11-17T19:07:31,639 INFO  [HostConfig] Le traitement du descripteur de d├®ploiement [C:\CASES\SUP32183\nuxeo-server-10.10-tomcat\conf\Catalina\localhost\nuxeo.xml] a pris [21┬á936] ms
      

      Expected result
      No exception thown when changing the context root

        Attachments

          Activity

            People

            • Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                PagerDuty

                Error rendering 'com.pagerduty.jira-server-plugin:PagerDuty'. Please contact your Jira administrators.