This discussion is archived
2 Replies Latest reply: Jun 14, 2011 3:01 PM by 748567 RSS

Unable to use jmxremote for JVM monitoring using Jconsole

748567 Newbie
Currently Being Moderated
Hi All,

We have Jboss 4.2.2, 4.3.0 and 5.0 versions running on multiple hosts with RHEL 5. This uses Sun JDK 1.6.0_06. We are intending to use Jconsole to remotely monitor JVM and threads of Jboss instances in our organization. For that I've configured following JAVA_OPTS value in the start script:

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


But after that, when going to restart the Jboss server, it is not able to deploy any of the applications and throws 'Incomplete deployement' error. Though Jconsole is able to remotely connect to the servers using port 18189. But its of no use, as none of the application could be deployed with this config. I have scrolled up a bit in the log file and found following lines:


2011-06-07 00:46:09,112 WARN [org.jboss.wsf.common.management.AbstractServerConfig] Unable to calculate 'WebServicePort', using default '8080'

2011-06-07 00:46:09,113 WARN [org.jboss.wsf.common.management.AbstractServerConfig] Unable to calculate 'WebServicePort', using default '8080'

2011-06-07 00:46:09,168 WARN [org.jboss.wsf.common.management.AbstractServerConfig] Unable to calculate 'WebServicePort', using default '8080'

2011-06-07 00:46:09,168 WARN [org.jboss.wsf.common.management.AbstractServerConfig] Unable to calculate 'WebServicePort', using default '8080'

2011-06-07 00:46:09,186 ERROR [org.jboss.deployment.MainDeployer] Could not start deployment: file:/applications/webapps/sys-mpi/deploy/MPIJavaUtilitySvcs.war

java.lang.NullPointerException


I had to remove the JAVA_OPTS line for JMXremote and restart the Jboss servers to successfully deploy the application. Is there a bug on JMXremote which is preventing the applications to be deployed?


Thanks & Regards

Ananda
  • 1. Re: Unable to use jmxremote for JVM monitoring using Jconsole
    748567 Newbie
    Currently Being Moderated
    Hi All,
    Please ehlp in this regard. We are still stuck. I have tried many different combinations of JAVA_OPTS and found that using following alone is enough to cause the deployment failure.
    JAVA_OPTS="$JAVA_OPTS -Dcom.sun.management.jmxremote"

    Please help.
    Regards
    Ananda
  • 2. Re: Unable to use jmxremote for JVM monitoring using Jconsole
    748567 Newbie
    Currently Being Moderated
    Now I got it running!!!

    No deployment failure, Jconsole is showing all tabs, no authentication for jmxremote connection.

    Following are the parameters present now:
    JAVA_OPTS="$JAVA_OPTS -Djavax.management.builder.initial=org.jboss.system.server.jmx.MBeanServerBuilderImpl"
    JAVA_OPTS="$JAVA_OPTS -Djboss.platform.mbeanserver"
    #JAVA_OPTS="$JAVA_OPTS -Dcom.sun.management.jmxremote" --------- This is only required for localhost jconsole connection
    JAVA_OPTS="$JAVA_OPTS -Dcom.sun.management.jmxremote.port=18189"
    JAVA_OPTS="$JAVA_OPTS -Dcom.sun.management.jmxremote.authenticate=false"
    JAVA_OPTS="$JAVA_OPTS -Dcom.sun.management.jmxremote.ssl=false"

    As the above authentication parameter is set to false, so no userid is required.
    Just open jconsole remotely and in the 'Remote' section type <host>:<port>. Press connect.

    You may go for authenticated access. In that case change the parameter value
    -Dcom.sun.management.jmxremote.authenticate=true. And you need to get these following files ready inside your java home to support the authentication:
    /usr/java/jdk1.6.0_06/jre/lib/management/jmxremote.password
    /usr/java/jdk1.6.0_06/jre/lib/management/jmxremote.access

    Enjoy!!!
    Ananda

Legend

  • Correct Answers - 10 points
  • Helpful Answers - 5 points