[JBoss JIRA] (MODCLUSTER-638) Mod_cluster listener doesn't start: misleading docs
by Jean-Frederic Clere (Jira)
[ https://issues.redhat.com/browse/MODCLUSTER-638?page=com.atlassian.jira.p... ]
Jean-Frederic Clere closed MODCLUSTER-638.
------------------------------------------
> Mod_cluster listener doesn't start: misleading docs
> ---------------------------------------------------
>
> Key: MODCLUSTER-638
> URL: https://issues.redhat.com/browse/MODCLUSTER-638
> Project: mod_cluster
> Issue Type: Bug
> Components: Documentation & Demos
> Affects Versions: 1.4.0.Final, 2.0.0.Alpha1
> Environment: Tomcat 9.0.2, Windows, Oracle JDK 8
> Reporter: Michal Karm
> Assignee: Radoslav Husar
> Priority: Blocker
> Labels: ux
> Fix For: 2.0.0.Alpha1, 1.4.1.Final
>
>
> h3. Old listener conf from docs fails to start, automagic elimination aftermath
> h4. server.xml
> {code}
> <Listener className="org.jboss.modcluster.container.catalina.standalone.ModClusterListener" connectorPort="8009"/>
> {code}
> h4. Fails to start Tomcat server
> {code}
> INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Server version: Apache Tomcat/9.0.2
> INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Server built: Nov 25 2017 21:08:02 UTC
> INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Server number: 9.0.2.0
> INFO [main] org.apache.catalina.startup.VersionLoggerListener.log OS Name: Windows NT (unknown)
> INFO [main] org.apache.catalina.startup.VersionLoggerListener.log OS Version: 10.0
> INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Architecture: amd64
> INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Java Home: C:\Program Files\jdk1.8.0_last\jre
> INFO [main] org.apache.catalina.startup.VersionLoggerListener.log JVM Version: 1.8.0_121-b13
> INFO [main] org.apache.catalina.startup.VersionLoggerListener.log JVM Vendor: Oracle Corporation
> INFO [main] org.apache.catalina.startup.VersionLoggerListener.log CATALINA_BASE: C:\apache-tomcat-9.0.2-windows-x64\apache-tomcat-9.0.2
> INFO [main] org.apache.catalina.startup.VersionLoggerListener.log CATALINA_HOME: C:\apache-tomcat-9.0.2-windows-x64\apache-tomcat-9.0.2
> INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Djava.util.logging.config.file=C:\apache-tomcat-9.0.2-windows-x64\apache-tomcat-9.0.2\conf\logging.properties
> INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Djava.util.logging.manager=org.apache.juli.ClassLoaderLogManager
> INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Djdk.tls.ephemeralDHKeySize=2048
> INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Djava.protocol.handler.pkgs=org.apache.catalina.webresources
> INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Dignore.endorsed.dirs=
> INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Dcatalina.base=C:\apache-tomcat-9.0.2-windows-x64\apache-tomcat-9.0.2
> INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Dcatalina.home=C:\apache-tomcat-9.0.2-windows-x64\apache-tomcat-9.0.2
> INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Djava.io.tmpdir=C:\apache-tomcat-9.0.2-windows-x64\apache-tomcat-9.0.2\temp
> INFO [main] org.apache.catalina.core.AprLifecycleListener.lifecycleEvent Loaded APR based Apache Tomcat Native library [1.2.16] using APR version [1.6.3].
> INFO [main] org.apache.catalina.core.AprLifecycleListener.lifecycleEvent APR capabilities: IPv6 [true], sendfile [true], accept filters [false], random [true].
> INFO [main] org.apache.catalina.core.AprLifecycleListener.lifecycleEvent APR/OpenSSL configuration: useAprConnector [false], useOpenSSL [true]
> INFO [main] org.apache.catalina.core.AprLifecycleListener.initializeSSL OpenSSL successfully initialized [OpenSSL 1.0.2m 2 Nov 2017]
> INFO [main] org.apache.coyote.AbstractProtocol.init Initializing ProtocolHandler ["http-nio-8080"]
> INFO [main] org.apache.tomcat.util.net.NioSelectorPool.getSharedSelector Using a shared selector for servlet write/read
> INFO [main] org.apache.coyote.AbstractProtocol.init Initializing ProtocolHandler ["ajp-nio-8009"]
> INFO [main] org.apache.tomcat.util.net.NioSelectorPool.getSharedSelector Using a shared selector for servlet write/read
> INFO [main] org.jboss.modcluster.ModClusterService.init MODCLUSTER000001: Initializing mod_cluster version 2.0.0.Alpha1-SNAPSHOT
> SEVERE [main] org.apache.catalina.startup.Catalina.load Catalina.start
> org.apache.catalina.LifecycleException: Failed to initialize component [StandardServer[8005]]
> at org.apache.catalina.util.LifecycleBase.handleSubClassException(LifecycleBase.java:441)
> at org.apache.catalina.util.LifecycleBase.init(LifecycleBase.java:139)
> at org.apache.catalina.startup.Catalina.load(Catalina.java:622)
> at org.apache.catalina.startup.Catalina.load(Catalina.java:645)
> 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 org.apache.catalina.startup.Bootstrap.load(Bootstrap.java:309)
> at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:492)
> Caused by: java.lang.RuntimeException: MODCLUSTER000valid advertise interface configured! Disabling multicast advertise mechanism.
> at org.jboss.modcluster.advertise.impl.AdvertiseListenerImpl.initializeDatagramChannel(AdvertiseListenerImpl.java:133)
> at org.jboss.modcluster.advertise.impl.AdvertiseListenerImpl.start(AdvertiseListenerImpl.java:140)
> at org.jboss.modcluster.advertise.impl.AdvertiseListenerImpl.<init>(AdvertiseListenerImpl.java:102)
> at org.jboss.modcluster.advertise.impl.AdvertiseListenerFactoryImpl.createListener(AdvertiseListenerFactoryImpl.java:38)
> at org.jboss.modcluster.ModClusterService.init(ModClusterService.java:163)
> at org.jboss.modcluster.container.tomcat.TomcatEventHandlerAdapter.init(TomcatEventHandlerAdapter.java:249)
> at org.jboss.modcluster.container.tomcat.TomcatEventHandlerAdapter.lifecycleEvent(TomcatEventHandlerAdapter.java:187)
> at org.jboss.modcluster.container.tomcat.ModClusterListener.lifecycleEvent(ModClusterListener.java:118)
> at org.apache.catalina.util.LifecycleBase.fireLifecycleEvent(LifecycleBase.java:123)
> at org.apache.catalina.util.LifecycleBase.setStateInternal(LifecycleBase.java:424)
> at org.apache.catalina.util.LifecycleBase.init(LifecycleBase.java:137)
> ... 8 more
> INFO [main] org.apache.catalina.startup.Catalina.load Initialization processed in 1724 ms
> SEVERE [main] org.apache.catalina.startup.Catalina.start The required Server component failed to start so Tomcat is unable to start.
> org.apache.catalina.LifecycleException: An invalid Lifecycle transition was attempted ([before_stop]) for component [StandardService[Catalina]] in state [INITIALIZED]
> at org.apache.catalina.util.LifecycleBase.invalidTransition(LifecycleBase.java:431)
> at org.apache.catalina.util.LifecycleBase.stop(LifecycleBase.java:244)
> at org.apache.catalina.core.StandardServer.stopInternal(StandardServer.java:791)
> at org.apache.catalina.util.LifecycleBase.stop(LifecycleBase.java:257)
> at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:175)
> at org.apache.catalina.startup.Catalina.start(Catalina.java:671)
> 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 org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:353)
> at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:493)
> WARNING [main] org.apache.catalina.util.LifecycleBase.destroy Calling stop() on failed component [StandardServer[80trigger clean-up did not complete.
> org.apache.catalina.LifecycleException: An invalid Lifecycle transition was attempted ([before_stop]) for component [StandardService[Catalina]] in state [INITIALIZED]
> at org.apache.catalina.util.LifecycleBase.invalidTransition(LifecycleBase.java:431)
> at org.apache.catalina.util.LifecycleBase.stop(LifecycleBase.java:244)
> at org.apache.catalina.core.StandardServer.stopInternal(StandardServer.java:791)
> at org.apache.catalina.util.LifecycleBase.stop(LifecycleBase.java:257)
> at org.apache.catalina.util.LifecycleBase.destroy(LifecycleBase.java:293)
> at org.apache.catalina.startup.Catalina.start(Catalina.java:675)
> 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 org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:353)
> at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:493)
> INFO [main] org.jboss.modcluster.ModClusterService.shutdown MODCLUSTER000002: Initiating mod_cluster shutdown
> INFO [main] org.apache.coyote.AbstractProtocol.destroy Destroying ProtocolHandler ["http-nio-8080"]
> INFO [main] org.apache.coyote.AbstractProtocol.destroy Destroying ProtocolHandler ["ajp-nio-8009"]
> {code}
> h2. Call to action
> Please, fix the docs:
> * [README.md|https://github.com/modcluster/mod_cluster/blame/7e7dcbfef3bd357...]
> * [Documentation|https://github.com/modcluster/modcluster.io/blame/master/do...]
> To save you some attributes lookup and copy pasting, you might want to take a look at this [complete list|https://github.com/Karm/jws-3-tomcat-8-mod_cluster/blob/master/serve...].
> I guess at least this should find its way into the docs, give or take:
> {code}
> <Listener className="org.jboss.modcluster.container.catalina.standalone.ModClusterListener"
> advertise="true"
> advertiseInterface="172.16.27.10"
> advertiseGroupAddress="224.0.1.105"
> advertisePort="23364"
> connectorPort="8009"
> />
> {code} plus the message in the log must be improved. A random user has no chance to understand what the listener wants - it just looks as if it disabled advertising:{code} java.lang.RuntimeException: MODCLUSTER000valid advertise interface configured! Disabling multicast advertise mechanism.{code}, while in fact the whole Tomcat goes down.
--
This message was sent by Atlassian Jira
(v7.13.8#713008)