7 Replies Latest reply on Jul 31, 2018 8:58 AM by Andrei Zak

    JBoss EAP 6.1 - Enable Jmx port  for monitoring heap AS via Zabbix.

    Andrei Zak Newbie

      Hi all. Could you help me enable jmx port for Jboss6.1. I tried added many options to start script my application, but this is didn't help.

      My last attempt was like:

      JAVA_OPTS="$JAVA_OPTS -Djava.util.logging.manager=org.jboss.logmanager.LogManager"

      JAVA_ARGS="$JAVA_OPTS -Dorg.jboss.logging.Logger.pluginClass=org.jboss.logging.logmanager.LoggerPluginImpl"

      JBOSS_CLASSPATH="../lib/jboss-logmanager.jar"

      JAVA_OPTS="$JAVA_OPTS -Dcom.sun.management.jmxremote.port=9002"

      JAVA_OPTS="$JAVA_OPTS -Dcom.sun.management.jmxremote.authenticate=false"

      JAVA_OPTS="$JAVA_OPTS -Dcom.sun.management.jmxremote.ssl=false"

      JAVA_OPTS="$JAVA_OPTS -Djboss.platform.mbeanserver"

      JAVA_OPTS="$JAVA_OPTS -Djavax.management.builder.initial=org.jboss.system.server.jmx.MBeanServerBuilderImpl"

      JAVA_OPTS="$JAVA_OPTS -Djava.rmi.server.hostname=10.244.222.201"

       

      Jboss just didn't start after this.

       

      Version Jboss from log:  JBoss EAP 6.1.0.GA (AS 7.2.0.Final-redhat-8)

       

      And I don't have some logs from jboss. Created only GC logs gc_2018-07-19-14-47.log.0.current. server.log is empty.

       

      And Do I need add any lib name to  /logging.properties, area loggers= ???

       

       

      More information:

       

      I caught  my process before it was crash.

       

      jboss     4602  4390 99 15:34 pts/1    00:00:02 /usr/java/default/bin/java -D[Standalone] -server -XX:+UseCompressedOops -Xms4g -Xmx12g -XX:MaxPermSize=512m -XX:-TraceClassUnloading -XX:+PrintTenuringDistribution -XX:+UseConcMarkSweepGC -XX:+UseParNewGC -XX:+CMSParallelRemarkEnabled -XX:+DisableExplicitGC -XX:+UseBoundThreads -XX:+UseThreadPriorities -XX:+UseLWPSynchronization -XX:+UsePerfData -XX:-UseVMInterruptibleIO -verbose:gc -XX:+PrintGCDetails -XX:+PrintGCDateStamps -Xloggc:/app/jboss-eap-6.1/fe_servers/fe1_PESaux/standalone/log/gc_2018-07-19-15-34.log -XX:+UseGCLogFileRotation -XX:NumberOfGCLogFiles=5 -XX:GCLogFileSize=5M -Djboss.modules.system.pkgs=org.jboss.byteman -Djava.awt.headless=true -Dorg.jboss.resolver.warning=true -Dsun.rmi.dgc.client.gcInterval=3600000 -Dsun.rmi.dgc.server.gcInterval=3600000 -Dsun.lang.ClassLoader.allowArraySyntax=true -Dtomcat.util.buf.StringCache.byte.enabled=true -Dtomcat.util.buf.StringCache.char.enabled=true -Dtomcat.util.buf.StringCache.trainThreshold=5 -Dtomcat.util.buf.StringCache.cacheSize=1000 -Ddisable.atg.dynamo.log=true -XX:+HeapDumpOnOutOfMemoryError -XX:HeapDumpPath=/app/jboss-eap-6.1/fe_servers/fe1_PESaux/standalone/log/mps -Datg.dynamo.server.name=fe1_PESaux -Datg.dynamo.server.home=/app/jboss-eap-6.1/fe_servers/fe1_PESaux/standalone/deployments/fe1_PESaux/PES-Commerce.ear/atg_bootstrap.war/WEB-INF/ATG-INF/home/servers/fe1_PESaux -Datg.dynamo.data-dir=/app/PES/ATG-Data -Datg.dynamo.modules=DCS.PublishingAgent,PES.WebApp -Djboss.server.base.dir=/app/jboss-eap-6.1/fe_servers/fe1_PESaux/standalone -Djboss.server.log.dir=/app/jboss-eap-6.1/fe_servers/fe1_PESaux/standalone/log -DFE_ENV=fe1 -Dcom.sun.management.jmxremote=true -Dcom.sun.management.jmxremote.port=9002 -Dcom.sun.management.jmxremote.authenticate=false -Dcom.sun.management.jmxremote.ssl=false -Dorg.jboss.boot.log.file=/app/jboss-eap-6.1/fe_servers/fe1_PESaux/standalone/log/server.log -Dlogging.configuration=file:/app/jboss-eap-6.1/fe_servers/fe1_PESaux/standalone/configuration/logging.properties -jar /app/jboss-eap-6.1/jboss-modules.jar -mp /app/jboss-eap-6.1/modules -jaxpmodule javax.xml.jaxp-provider org.jboss.as.standalone -Djboss.home.dir=/app/jboss-eap-6.1 -Djboss.server.base.dir=/app/jboss-eap-6.1/fe_servers/fe1_PESaux/standalone

       

      I want remind that in log is empty.

       

       

      For this case I used:

      JAVA_OPTS="$JAVA_OPTS -Dcom.sun.management.jmxremote=true"

      JAVA_OPTS="$JAVA_OPTS -Dcom.sun.management.jmxremote.port=9002"

      JAVA_OPTS="$JAVA_OPTS -Dcom.sun.management.jmxremote.authenticate=false"

      JAVA_OPTS="$JAVA_OPTS -Dcom.sun.management.jmxremote.ssl=false"

       

       

      Nice news: with my last options I get error! For this I commended "> /dev/null 2>&1 " in row $JBOSS_HOME/bin/standalone.sh > /dev/null 2>&1 from my start script.

      WARNING: Failed to load the specified log manager class org.jboss.logmanager.LogManager

      Jul 19, 2018 4:12:01 PM org.jboss.msc.service.ServiceContainerImpl <clinit>

      INFO: JBoss MSC version 1.0.4.GA-redhat-1

      Jul 19, 2018 4:12:01 PM org.jboss.as.server.ApplicationServerService start

      INFO: JBAS015899: JBoss EAP 6.1.0.GA (AS 7.2.0.Final-redhat-8) starting

      Jul 19, 2018 4:12:02 PM 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:440)

        • 1. Re: Jboss6.1 - Enable Jmx port  for monitoring heap AS via Zabbix.
          Andrei Zak Newbie

          First at all I added options:

          JAVA_OPTS="$JAVA_OPTS -Dcom.sun.management.jmxremote.authenticate=false"

          JAVA_OPTS="$JAVA_OPTS -Dcom.sun.management.jmxremote.ssl=false"

          JAVA_OPTS="$JAVA_OPTS -Dcom.sun.management.jmxremote.port=9002"

          JAVA_OPTS="$JAVA_OPTS -Djava.rmi.server.hostname=10.6.194.242"

          JAVA_OPTS="$JAVA_OPTS -Djava.util.logging.manager=org.jboss.logmanager.LogManager"

          JAVA_OPTS="$JAVA_OPTS -Djboss.modules.system.pkgs=org.jboss.byteman,org.jboss.logmanager"

          JAVA_OPTS="$JAVA_OPTS -Xbootclasspath/p:/app/jboss-eap-6.1/lib/jboss-logmanager-1.4.0.Final-redhat-1.jar"

          JAVA_OPTS="$JAVA_OPTS -Xbootclasspath/p:/app/jboss-eap-6.1/lib/slf4j-jboss-logmanager-1.0.2.GA-redhat-1.jar"

          JAVA_OPTS="$JAVA_OPTS -Xbootclasspath/p:/app/jboss-eap-6.1/lib/log4j-jboss-logmanager-1.0.1.Final-redhat-2.jar"

           

          and

          JBOSS_MODULES_SYSTEM_PKGS="org.jboss.byteman,org.jboss.logmanager"

          and now I have error:

          2018-07-19 17:47:40,615 DEBUG [org.jboss.as.controller.management-operation] (Controller Boot Thread) Initialized extensions in [155] ms

          2018-07-19 17:47:40,716 ERROR [org.jboss.as.controller.management-operation] (ServerService Thread Pool -- 5) JBAS014612: Operation ("add") failed - address: ([

              ("subsystem" => "logging"),

              ("console-handler" => "CONSOLE")

          ]): java.lang.ClassCastException: org.jboss.logmanager.PropertyConfigurator cannot be cast to org.jboss.as.logging.logmanager.ConfigurationPersistence

                  at org.jboss.as.logging.logmanager.ConfigurationPersistence.getOrCreateConfigurationPersistence(ConfigurationPersistence.java:93)

                  at org.jboss.as.logging.logmanager.ConfigurationPersistence.getOrCreateConfigurationPersistence(ConfigurationPersistence.java:81)

                  at org.jboss.as.logging.LoggingOperations$LoggingOperationStepHandler.execute(LoggingOperations.java:154)

                  at org.jboss.as.controller.AbstractOperationContext.executeStep(AbstractOperationContext.java:440) [jboss-as-controller-7.2.0.Final-redhat-8.jar:7.2.0.Final-redhat-8]

                  at org.jboss.as.controller.AbstractOperationContext.doCompleteStep(AbstractOperationContext.java:322) [jboss-as-controller-7.2.0.Final-redhat-8.jar:7.2.0.Final-redhat-8]

                  at org.jboss.as.controller.AbstractOperationContext.completeStepInternal(AbstractOperationContext.java:229) [jboss-as-controller-7.2.0.Final-redhat-8.jar:7.2.0.Final-redhat-8]

                  at org.jboss.as.controller.AbstractOperationContext.executeOperation(AbstractOperationContext.java:224) [jboss-as-controller-7.2.0.Final-redhat-8.jar:7.2.0.Final-redhat-8]

                  at org.jboss.as.controller.ParallelBootOperationStepHandler$ParallelBootTask.run(ParallelBootOperationStepHandler.java:334) [jboss-as-controller-7.2.0.Final-redhat-8.jar:7.2.0.Final-redhat-8]

                  at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1152) [rt.jar:1.7.0_181]

                  at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:622) [rt.jar:1.7.0_181]

                  at java.lang.Thread.run(Thread.java:745) [rt.jar:1.7.0_181]

           

          pls help meee

          • 2. Re: Jboss6.1 - Enable Jmx port  for monitoring heap AS via Zabbix.
            Andrei Zak Newbie

            In finally. I was solved my problems with errors in messages above.

            How?

            1. Download new jar version jboss-as-logging-7.2.1.Final-redhat-10.jar from Index of /techpreview/all/org/jboss/as/jboss-as-logging/7.2.1.Final-redhat-10  .

            2. Copy this file to  JBOSS_HOME/modules/system/layers/base/org/jboss/as/logging/main/ .

            3. Replace jar name in JBOSS_HOME/modules/system/layers/base/org/jboss/as/logging/main/module.xml .

            my jboss config  file has

             

            #### JMX ######

            JAVA_OPTS="$JAVA_OPTS -Dcom.sun.management.jmxremote.authenticate=false"

            JAVA_OPTS="$JAVA_OPTS -Dcom.sun.management.jmxremote.ssl=false"

            JAVA_OPTS="$JAVA_OPTS -Dcom.sun.management.jmxremote.port=9002"

            JAVA_OPTS="$JAVA_OPTS -Djava.rmi.server.hostname=10.6.194.242"

            JAVA_OPTS="$JAVA_OPTS -Djava.util.logging.manager=org.jboss.logmanager.LogManager"

            JAVA_OPTS="$JAVA_OPTS -Djboss.modules.system.pkgs=org.jboss.byteman,org.jboss.logmanager"

            JAVA_OPTS="$JAVA_OPTS -Xbootclasspath/p:/app/jboss-eap-6.1/lib/jboss-logmanager-1.4.0.Final-redhat-1.jar"

            • 4. Re: Jboss6.1 - Enable Jmx port  for monitoring heap AS via Zabbix.
              Andrei Zak Newbie

              This  is manual for jboss 6.4. I suppose this method don't work with my jboss version - JBoss EAP 6.1.0.GA (AS 7.2.0.Final-redhat-8) .

              I tried. And after all steps and in time my steps have same logs:

              018-07-25 17:04:17.414 [pool-1-thread-3] WARN  com.zabbix.gateway.SocketProcessor - error processing request

              com.zabbix.gateway.ZabbixException: java.net.SocketTimeoutException: connection timed out: service:jmx:remoting-jmx://10.244.222.177:9001

                      at com.zabbix.gateway.JMXItemChecker.getValues(JMXItemChecker.java:98) ~[zabbix-java-gateway-3.4.7.jar:na]

                      at com.zabbix.gateway.SocketProcessor.run(SocketProcessor.java:63) ~[zabbix-java-gateway-3.4.7.jar:na]

                      at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149) [na:1.8.0_161]

                      at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) [na:1.8.0_161]

                      at java.lang.Thread.run(Thread.java:748) [na:1.8.0_161]

               

              but port on the remote server is allowed.

              • 5. Re: JBoss EAP 6.1 - Enable Jmx port  for monitoring heap AS via Zabbix.
                Andrei Zak Newbie

                I fined reason my trouble. Jboss 6.1 work with zabbix 3.4 via RMI protocol and my application that work by Jboss same use RMI protocol. And both application interfere with work one to one. I should delete all my JAVA settings from config files.

                 

                Anybody can help me in my case? 

                • 6. Re: Jboss6.1 - Enable Jmx port  for monitoring heap AS via Zabbix.
                  Andrei Zak Newbie

                  My error

                  Caused by: java.io.IOException: Failed to retrieve RMIServer stub: javax.naming.ServiceUnavailableException [Root exception is java.rmi.ConnectException: Connection refused to host: 10.238.81.128; nested exception is:

                   

                  In Zabbix I see -     Cannot open received JSON   .