DX Application Performance Management

 View Only
  • 1.  Jboss logmanager

    Posted Nov 04, 2016 07:42 PM

    Hi everyone,

     

    I have recently installed a java agent v10.3 into a Jboss application server v6.3 in standalone mode with a 1.6 JVM. When the application starts, it shows some messages and the startup process stops.

     

    /opt/jboss/EAP-6.3.0/jboss-eap-6.3/bin/standalone-bpi.sh > /opt/jboss/bpi/standalone/log/ca_log2.log

    java.lang.IllegalArgumentException: Failed to load module "org.jboss.logmanager" for handler "FILESIZEDATE"

            at org.jboss.logmanager.config.AbstractPropertyConfiguration.<init>(AbstractPropertyConfiguration.java:67)

            at org.jboss.logmanager.config.HandlerConfigurationImpl.<init>(HandlerConfigurationImpl.java:54)

            at org.jboss.logmanager.config.LogContextConfigurationImpl.addHandlerConfiguration(LogContextConfigurationImpl.java:145)

            at org.jboss.logmanager.PropertyConfigurator.configureHandler(PropertyConfigurator.java:669)

            at org.jboss.logmanager.PropertyConfigurator.configureLogger(PropertyConfigurator.java:579)

            at org.jboss.logmanager.PropertyConfigurator.configure(PropertyConfigurator.java:517)

            at org.jboss.logmanager.PropertyConfigurator.configure(PropertyConfigurator.java:97)

            at org.jboss.logmanager.LogManager.readConfiguration(LogManager.java:300)

            at org.jboss.logmanager.LogManager.readConfiguration(LogManager.java:262)

            at java.util.logging.LogManager$2.run(LogManager.java:267)

            at java.security.AccessController.doPrivileged(Native Method)

            at java.util.logging.LogManager.readPrimordialConfiguration(LogManager.java:265)

            at java.util.logging.LogManager.getLogManager(LogManager.java:248)

            at java.util.logging.Logger.<init>(Logger.java:225)

            at java.util.logging.LogManager$RootLogger.<init>(LogManager.java:1092)

            at java.util.logging.LogManager$RootLogger.<init>(LogManager.java:1089)

            at java.util.logging.LogManager$1.run(LogManager.java:180)

            at java.security.AccessController.doPrivileged(Native Method)

            at java.util.logging.LogManager.<clinit>(LogManager.java:157)

            at java.util.logging.Logger.getLogger(Logger.java:287)

            at sun.net.www.protocol.http.HttpURLConnection.<clinit>(HttpURLConnection.java:57)

            at java.lang.Class.forName0(Native Method)

            at java.lang.Class.forName(Class.java:169)

            at com.wily.introscope.autoprobe.AutoProbeTransformer.initializeBootstrapClasses(AutoProbeTransformer.java:2431)

            at com.wily.introscope.autoprobe.AutoProbeTransformer.<init>(AutoProbeTransformer.java:490)

            at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)

            at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39)

            at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27)

            at java.lang.reflect.Constructor.newInstance(Constructor.java:513)

            at com.wily.introscope.agent.transformer.TransformerAdministrator.createTransformer(TransformerAdministrator.java:389)

            at com.wily.introscope.agent.transformer.TransformerAdministrator.loadTransformerPlugin(TransformerAdministrator.java:345)

            at com.wily.introscope.agent.transformer.TransformerAdministrator.loadTransformerPlugins(TransformerAdministrator.java:144)

            at com.wily.introscope.agent.transformer.TransformerAdministrator.<init>(TransformerAdministrator.java:112)

            at com.wily.introscope.agent.enterprise.EnterpriseAgent.<init>(EnterpriseAgent.java:292)

            at com.wily.introscope.agent.enterprise.EnterpriseAgent.<init>(EnterpriseAgent.java:264)

            at com.wily.introscope.agent.runtime.java.enterprise.Java2EnterpriseAgent.<init>(Java2EnterpriseAgent.java:44)

            at com.wily.introscope.agent.runtime.NativeConcreteAgentFactory.newConcreteAgent(NativeConcreteAgentFactory.java:16)

            at com.wily.introscope.agent.AgentShim.doCreateDelegate(AgentShim.java:617)

            at com.wily.introscope.agent.AgentShim.createDelegate(AgentShim.java:532)

            at com.wily.introscope.agent.AgentShim.getDelegateAgent(AgentShim.java:503)

            at com.wily.introscope.agent.AgentShim.ProbeBuilderEntryPoint_initializeAgentShim(AgentShim.java:966)

            at com.wily.introscope.api.instrument.JavaAgent.initializeAgent(JavaAgent.java:313)

            at com.wily.introscope.api.instrument.JavaAgent.premain(JavaAgent.java:198)

            at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)

            at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)

            at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)

            at java.lang.reflect.Method.invoke(Method.java:597)

            at sun.instrument.InstrumentationImpl.loadClassAndStartAgent(InstrumentationImpl.java:323)

            at sun.instrument.InstrumentationImpl.loadClassAndCallPremain(InstrumentationImpl.java:338)

    Caused by: java.lang.NoClassDefFoundError: org/jboss/modules/ModuleLoader

            at org.jboss.logmanager.config.AbstractPropertyConfiguration$ModuleFinder.getClassLoader(AbstractPropertyConfiguration.java:466)

            at org.jboss.logmanager.config.AbstractPropertyConfiguration.<init>(AbstractPropertyConfiguration.java:65)

            ... 48 more

    log4j:WARN File option not set for appender [logfile].

    log4j:WARN Are you using FileAppender instead of ConsoleAppender?

    log4j:ERROR No output stream or file set for the appender named [logfile].

     

    I have read an article related,

     

    Symptom:
    When you use ORACLE/SUN JDK 1.6 Update 15 and later versions, the Agent is not started. This issue is a logger problem in JBoss 7 and is common for any agent that performs logging.

    Solution:

    Use one of the following workarounds to resolve the issue:
    1. Use ORACLE/SUN JDK 1.6 Update 14 or previous versions.
    2. Turn off the logging of WILY agent in the agent profile and start the server. Enable the logging after the server boots up.
    3. Open the JBoss startup script in a text editor, and update with:
    set JAVA_OPTS= %JAVA_OPTS%
    -Djboss.modules.system.pkgs=org.jboss.logmanager,com.wily,com.wily.* -Djava.util.logging.manager=org.jboss.logmanager.LogManager -javaagent:%JBOSS_HOME%\wily\Agent.jar -Dcom.wily.introscope.agentProfile=%JBOSS_HOME%\wily\core\config\IntroscopeAgent.profile -Xbootclasspath/p:%JBOSS_HOME%\modules\org\jboss\logmanager\main\jboss-logmanager-1.2.2.GA.jar;%JBOSS_HOME%\modules\org\jboss\logmanager\log4j\main\jboss-logmanager-log4j-1.0.0.GA.jar;%JBOSS_HOME%\modules\org\apache\log4j\main\log4j-1.2.16.jar

     

    I looked for jar files and I could not find them, in a OS search I found these jar files:

     

    /opt/jboss/EAP-6.3.0/jboss-eap-6.3/modules/system/layers/base/org/jboss/logging/main/jboss-logging-3.1.4.GA-redhat-1.jar
    /opt/jboss/EAP-6.3.0/jboss-eap-6.3/modules/system/layers/base/org/jboss/logmanager/main/jboss-logmanager-1.5.2.Final-redhat-1.jar

    /opt/jboss/EAP-6.3.0/jboss-eap-6.3/modules/com/SynDriver/main/log4j-1.2.17.jar

    /opt/jboss/EAP-6.3.0/jboss-eap-6.3/modules/system/layers/base/org/slf4j/impl/main/slf4j-jboss-logmanager-1.0.3.GA-redhat-1.jar

     

    The configuration I made was:

     

    JAVA_OPTS="$JAVA_OPTS -Djboss.modules.system.pkgs=org.jboss.logmanager,org.jboss.byteman,com.wily,com.wily.* -javaagent:/opt/BanCoppel/CAAgent/wily/Agent.jar -Dcom.wily.introscope.agentProfile=/opt/BanCoppel/CAAgent/wily/core/config/IntroscopeAgent.profile -Djava.util.logging.manager=org.jboss.logmanager.LogManager -Xbootclasspath/p:/opt/jboss/EAP-6.3.0/jboss-eap-6.3/modules/system/layers/base/org/jboss/logmanager/main/jboss-logmanager-1.5.2.Final-redhat-1.jar:/opt/jboss/EAP-6.3.0/jboss-eap-6.3/modules/system/layers/base/org/jboss/log4j/logmanager/main/log4j-jboss-logmanager-1.1.0.Final-redhat-2.jar:/opt/jboss/EAP-6.3.0/jboss-eap-6.3/modules/com/SynDriver/main/log4j-1.2.17.jar"

     

    I would like to know if I have configured additional parameters correctly or If I have to change something.

     

    Regards.

     

    Rodrigo.



  • 2.  Re: Jboss logmanager
    Best Answer

    Broadcom Employee
    Posted Nov 06, 2016 06:45 PM

    Hi Rodrigo,

    I see you found the advice from this old thread: CA Wily - Java agent for Jboss which is also in the latest 10.3 wiki here:

    JBoss Application Server Logging Considerations - CA Application Performance Management - 10.3 - CA Technologies Documen… 

     

    I think the only difference is because you have the Redhat supported JBoss EAP 6.3 compared to the article advice which was probably based on the open source/earlier version of JBoss 7/EAP6.x (now WildFly) and so directory & file names have changed. i.e.

    logmanager/main/jboss-logmanager-1.2.2.GA.jar -> 

    logmanager/main/jboss-logmanager-1.5.2.Final-redhat-1.jar

     

    logmanager/log4j/main/jboss-logmanager-log4j-1.0.0.GA.jar -> 

    log4j/logmanager/main/log4j-jboss-logmanager-1.1.0.Final-redhat-2.jar

     

    apache/log4j/main/log4j-1.2.16.jar -> 

    SynDriver/main/log4j-1.2.17.jar/log4j-1.2.17.jar

     

    Was the startup successful with no exception after you made the changes?

     

    Thanks

     

    Lynn



  • 3.  Re: Jboss logmanager

    Broadcom Employee
    Posted Nov 06, 2016 10:44 PM

    Hi Rodrigo,

    As you appear to be using a custom logger handler (FILESIZEDATE) it maybe that the "standard" resolution does not fix your exception. Anyway, please let us know and we will try to assist further if more help is needed.

    Thanks

    Lynn



  • 4.  Re: Jboss logmanager

    Broadcom Employee
    Posted Nov 08, 2016 09:12 AM

    Hi  Rodrigo: 

       Were Lynn's notes helpful ? There were no follow-up responses from you. So marking as answered. However, you may post additional questions or current status as needed

     

    Thanks

    Hal German