[
https://issues.jboss.org/browse/WFLY-3054?page=com.atlassian.jira.plugin....
]
dpocock commented on WFLY-3054:
-------------------------------
Just downloaded wildfly-8.0.0.Final.tar.gz to test
Using jmxetric 1.0.5 (which has the workaround for unfixed WFLY-895, jmxetric no longer
makes calls to the logger) and I get the stack below:
$ bin/standalone.sh
=========================================================================
JBoss Bootstrap Environment
JBOSS_HOME: /home/daniel/opt/wildfly-8.0.0.Final
JAVA: /opt/jdk1.7/bin/java
JAVA_OPTS: -server -XX:+UseCompressedOops -Xms64m -Xmx512m -XX:MaxPermSize=256m
-Djava.net.preferIPv4Stack=true -Djboss.modules.system.pkgs=org.jboss.byteman
-Djava.awt.headless=true -Xbootclasspath/a:/usr/share/java/oncrpc.jar
-Xbootclasspath/a:/usr/share/java/gmetric4j-1.0.6.jar
-javaagent:/usr/share/java/jmxetric-1.0.5.jar=host=239.2.11.71,mode=multicast,port=8649,wireformat31x=true,config=/home/daniel/opt/wildfly-8.0.0.Final/bin/jmxetric.xml
=========================================================================
JMXetricAgent instrumented JVM, see
https://github.com/ganglia/jmxetric
WARNING: Failed to load the specified log manager class org.jboss.logmanager.LogManager
Mar 04, 2014 9:21:02 AM org.jboss.msc.service.ServiceContainerImpl <clinit>
INFO: JBoss MSC version 1.2.0.Final
Mar 04, 2014 9:21:02 AM org.jboss.as.server.ApplicationServerService start
INFO: JBAS015899: WildFly 8.0.0.Final "WildFly" starting
Mar 04, 2014 9:21:03 AM org.jboss.as.controller.AbstractOperationContext executeStep
ERROR: JBAS014612: Operation ("parallel-extension-add") failed - address: ([])
java.lang.RuntimeException: JBAS014670: Failed initializing module org.jboss.as.logging
at
org.jboss.as.controller.extension.ParallelExtensionAddHandler$1.execute(ParallelExtensionAddHandler.java:99)
at
org.jboss.as.controller.AbstractOperationContext.executeStep(AbstractOperationContext.java:591)
at
org.jboss.as.controller.AbstractOperationContext.doCompleteStep(AbstractOperationContext.java:469)
at
org.jboss.as.controller.AbstractOperationContext.completeStepInternal(AbstractOperationContext.java:273)
at
org.jboss.as.controller.AbstractOperationContext.executeOperation(AbstractOperationContext.java:268)
at org.jboss.as.controller.ModelControllerImpl.boot(ModelControllerImpl.java:314)
at
org.jboss.as.controller.AbstractControllerService.boot(AbstractControllerService.java:294)
at org.jboss.as.server.ServerService.boot(ServerService.java:356)
at org.jboss.as.server.ServerService.boot(ServerService.java:331)
at
org.jboss.as.controller.AbstractControllerService$1.run(AbstractControllerService.java:256)
at java.lang.Thread.run(Thread.java:722)
Caused by: java.util.concurrent.ExecutionException: java.lang.IllegalStateException:
JBAS011592: The logging subsystem requires the log manager to be
org.jboss.logmanager.LogManager. The subsystem has not be initialized and cannot be used.
To use JBoss Log Manager you must add the system property
"java.util.logging.manager" and set it to
"org.jboss.logmanager.LogManager"
at java.util.concurrent.FutureTask$Sync.innerGet(FutureTask.java:252)
at java.util.concurrent.FutureTask.get(FutureTask.java:111)
at
org.jboss.as.controller.extension.ParallelExtensionAddHandler$1.execute(ParallelExtensionAddHandler.java:91)
... 10 more
Caused by: java.lang.IllegalStateException: JBAS011592: The logging subsystem requires the
log manager to be org.jboss.logmanager.LogManager. The subsystem has not be initialized
and cannot be used. To use JBoss Log Manager you must add the system property
"java.util.logging.manager" and set it to
"org.jboss.logmanager.LogManager"
at org.jboss.as.logging.LoggingExtension.initialize(LoggingExtension.java:103)
at
org.jboss.as.controller.extension.ExtensionAddHandler.initializeExtension(ExtensionAddHandler.java:98)
at
org.jboss.as.controller.extension.ParallelExtensionAddHandler$ExtensionInitializeTask.call(ParallelExtensionAddHandler.java:127)
at
org.jboss.as.controller.extension.ParallelExtensionAddHandler$ExtensionInitializeTask.call(ParallelExtensionAddHandler.java:113)
at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:334)
at java.util.concurrent.FutureTask.run(FutureTask.java:166)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
at java.lang.Thread.run(Thread.java:722)
at org.jboss.threads.JBossThread.run(JBossThread.java:122)
Mar 04, 2014 9:21:03 AM org.jboss.as.server.ServerService boot
FATAL: JBAS015957: Server boot has failed in an unrecoverable manner; exiting. See
previous messages for details.
This may be happening because the call to getPlatformMBeanServer(), which was invoked from
premain() in jmxetric, has initialized the logger in a bad way and the rest of JBoss
can't cope and fails to start.
Anyhow, I then tried the latest version, jmxetric 1.0.6. It delays the call to
getPlatformMBeanServer(), by the amount specified by the initialdelay in jmxetric.xml. I
set it to 20 seconds to test. With that setting, Wildfly starts OK. Therefore, this is a
workaround for me and for other users who have control over the behavior of their
profiling tool (jmxetric is open source) but it may not help everybody.
Ideally, Wildfly should be stable even if some of there are calls to
getPlatformMBeanServer() or logging calls from premain()
getPlatformMBeanServer behaves badly when called from premain class
such as jmxetric
------------------------------------------------------------------------------------
Key: WFLY-3054
URL:
https://issues.jboss.org/browse/WFLY-3054
Project: WildFly
Issue Type: Enhancement
Security Level: Public(Everyone can see)
Components: JMX
Affects Versions: JBoss AS7 7.1.1.Final
Reporter: dpocock
Assignee: Kabir Khan
Labels: jboss
JMXetric is a management agent JAR loaded using the JVM argument
java -javaagent:$JARLIBS/jmxetric-1.0.2.jar .....
In the premain method (executed before JBoss main() is invoked), jmxetric calls the
static method:
ManagementFactory.getPlatformMBeanServer()
This puts JMX into a bad state and the jboss.as tree is completely missing when browsed
with jconsole
As a workaround, jmxetric will defer the call to
ManagementFactory.getPlatformMBeanServer() using the "initialdelay" parameter
set to a value such as 20 seconds.
However, it would be good if JBoss could act more cleanly in this situation, for example,
throwing an exception if ManagementFactory.getPlatformMBeanServer() is called too early,
or finding a way to add the "jboss.as" stuff later.
The 1.0.6 release of jmxetric will include the workaround by default. The bug can be
reproduced by setting initialdelay="0" in the sample jmxetric.xml or using
jmxetric 1.0.5
jmxetric versions before 1.0.5 suffer from issues with the jboss logger as discussed in
WFLY-895, so this issue was only discovered after removing the logging statements from
jmxetric.
Also covered in jmxetric github:
https://github.com/ganglia/jmxetric/issues/9
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see:
http://www.atlassian.com/software/jira