1 Reply Latest reply on Jan 11, 2011 9:07 AM by wdfink

    Jconsole and JBoss - can jconsole make jboss crash.

    mbstringham

      Last week I was monitoring a JBOSS environment on a linux server (Red Hat Enterprise Linux AS release 4 (Nahant Update 4)) using jconsole as the monitoring tool.  I was running jconsole from my windows box.  JAVA_HOME on the server side is java 1.6.  The jconsole I was using on my windows box is also java 1.6.  All was well, the memory was fine and all seemed to be going smoothly so I was ready to head home.  I did not close jconsole out or anything I just shut my laptop.  A few minutes later I'm notified that the server I was monitoring was down (A production environment).  I check the logs on the database and the server.log on Jboss and cannot see anything that would indicate a problem.  All I see is that jboss stopped.  No errors or anything.

       

       

      Basically I'm trying to see if closing down jconsole causes jboss to crash?  That is the only theory I can come up with.  Here are my setting in the run.conf file on the jboss server side:

       

      if [ "x$JAVA_OPTS" = "x" ]; then

         JAVA_OPTS="-Xms3072m -Xmx3072m -XX:MaxPermSize=256m -DdebugMode=true -DrunQuartz=all -Dsun.lang.ClassLoader.allowArraySyntax=true"

      fi

      # Set the garbage collection options

      JAVA_OPTS="$JAVA_OPTS -XX:+UseConcMarkSweepGC -XX:+PrintTenuringDistribution -XX:+PrintGC -XX:+PrintGCDetails -XX:+PrintGCTimeStamps -Dsun.rmi.dgc.client.gcInterval=21600000 -Dsun.rmi.dgc.server.gcInterval=21600000"

      #if you want to log garbage collection uncomment the next line

      #JAVA_OPTS="$JAVA_OPTS -Xloggc:$JBOSS_HOME/server/default/log/gc.log"

       

      # enable JConsole remote port

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

       

      # Set the tmp directory location

      JAVA_OPTS="$JAVA_OPTS -Djava.io.tmpdir=/u01/app/tmp"

       

      # Sample JPDA settings for remote socket debuging

      JAVA_OPTS="$JAVA_OPTS -Xrunjdwp:transport=dt_socket,address=4000,server=y,suspend=n"

       

      # Sample JPDA settings for shared memory debugging

      #JAVA_OPTS="$JAVA_OPTS -Xrunjdwp:transport=dt_shmem,server=y,suspend=n,address=jboss"

       

       

      I'm having a hard time trying to find out what could be the problem.  Any advice or additional information needed let me know.

        • 1. Jconsole and JBoss - can jconsole make jboss crash.
          wdfink

          In short : YES

          JConsole is not released for productional environment (see JConsole home page)

           

          What I know:

          - jConsole consumes memory within the monitored (server) JVM (more if you leave the jConsole connected)

          - I saw similar sporadical crashes if the jConsole is connected

           

          I'm not sure whether about crashes if you only set the JVM parameter of the JVM to monitor and deactivate the jConsole, but I think you will have still memory consumption in this case.