Search code examples
javamonitoringjconsolejboss-eap-7

Issue in setting up JConsole remote in JBOSS EAP7


Error Log while running standalone.sh file. I even check manifest file but didn't any solution for a particular error.

JBoss Bootstrap Environment

  JBOSS_HOME: /root/EAP-7.0.0_FRA

  JAVA: /opt/jdk1.8.0_45//bin/java

  JAVA_OPTS:  -server -verbose:gc -Xloggc:"/root/EAP-7.0.0_FRA/standalone/log/gc.log" -XX:+PrintGCDetails -XX:+PrintGCDateStamps -XX:+UseGCLogFileRotation -XX:NumberOfGCLogFiles=5 -XX:GCLogFileSize=3M -XX:-TraceClassUnloading  -Xbootclasspath/p:/EAP-7.0.0_FRA/modules/system/layers/base/org/jboss/logmanager/main/jboss-logmanager-2.0.3.Final-redhat-1.jar  -agentlib:jdwp=transport=dt_socket,address=9798,server=y,suspend=n





Listening for transport dt_socket at address: 9798
Exception in thread "main" java.lang.NoSuchMethodException: No main class defined for Module "org.jboss.logmanager:main" from local module loader @fad74ee (finder: local module finder @1a1d6a08 (roots: /root/EAP-7.0.0_FRA/modules,/root/EAP-7.0.0_FRA/modules/system/layers/base))
        at org.jboss.modules.Module.run(Module.java:313)
        at org.jboss.modules.Main.main(Main.java:507)

Below the lines added for Jconsole in JVM parameters.

         JAVA_OPTS="-Xms1303m -Xmx1303m -XX:MetaspaceSize=96M -XX:MaxMetaspaceSize=256m -Djava.net.preferIPv4Stack=true"
       JAVA_OPTS="$JAVA_OPTS -Djboss.modules.system.pkgs=$JBOSS_MODULES_SYSTEM_PKGS -Djava.awt.headless=true"
       JAVA_OPTS="$JAVA_OPTS -Dcom.sun.management.jmxremote"
       JAVA_OPTS="$JAVA_OPTS -Dcom.sun.management

.jmxremote.port=9010"
   JAVA_OPTS="$JAVA_OPTS -Dcom.sun.management.jmxremote.local.only=false"
   JAVA_OPTS="$JAVA_OPTS -Dcom.sun.management.jmxremote.authenticate=false"

echo ="$JAVA_OPTS -Xbootclasspath/p:/root/EAP-7.0.0_FRA/modules/system/layers/base/org/jboss/log4j/logmanager/main/log4j-jboss-logmanager-1.1.2.Final-redhat-2"


JAVA_OPTS="$JAVA_OPTS -Xbootclasspath/p:/root/EAP-7.0.0_FRA/modules/system/layers/base/org/jboss/logmanager/main/jboss-logmanager-2.0.3.Final-redhat-1.jar"

Solution

  • In order to connect to JBoss EAP 7 via JConsole, you may follow below steps:

    • Configure JAVA_HOME in jconsole.sh and standalone.conf files (if are using standalone mode, for domain set it in domain.conf).
    • Create a Management User.
    • Start the EAP server with the management bind address, for example:

      ./standalone.sh -c standalone-ha.xml -bmanagement YOUR_IP_ADDRESS

    • Execute script $JBOSS_HOME/bin/jconsole.sh(on your local machine if connecting to a remote EAP instance)
    • Set the remote connection URL as below and provide your management username and password:

      service:jmx:remote+http://YOUR_IP_ADDRESS:9990