You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by Dustin Chesterman <dc...@gmail.com> on 2011/02/22 17:58:06 UTC

JMX login error : java.lang.NullPointerException at javax.management.remote.rmi.RMIConnector.connect(RMIConnector.java:281)

Hello all -
  We are running Tomcat 6 on RHEL 5 and Oracle JDK 1.6_24 and I am
having a problem loggin into the jmx services remotely through
jconsole.

Here is my setenv.sh :

JAVA_OPTS="-Xms512m -Xmx1152m -XX:MaxPermSize=512m"
CATALINA_OPTS="$CATALINA_OPTS -Dcom.sun.management.jmxremote
-Dcom.sun.management.jmxremote.port=9888"
CATALINA_OPTS="$CATALINA_OPTS -Dcom.sun.management.jmxremote.ssl=false
-Dcom.sun.management.jmxremote.authenticate=false"
CATALINA_OPTS="$CATALINA_OPTS -Djava.rmi.server.hostname=192.168.33.70"
CATALINA_OPTS="$CATALINA_OPTS -Djava.rmi.server.logCalls=true"


Here is the output from 'ps -elf | grep tomcat'  (I also see the 9888
port listening when using netstat) :

0 S root      2930     1  1  85   0 - 500084 184466 20:47 ?
00:00:15 /usr/java/default/bin/java
-Djava.util.logging.config.file=/usr/local/tomcat/conf/logging.properties
-Xms512m -Xmx1152m -XX:MaxPermSize=512m
-Djava.util.logging.manager=org.apache.juli.ClassLoaderLogManager
-server -Dbuild.compiler.emacs=true -Dcom.sun.management.jmxremote
-Dcom.sun.management.jmxremote.port=9888
-Dcom.sun.management.jmxremote.ssl=false
-Dcom.sun.management.jmxremote.authenticate=false
-Djava.rmi.server.hostname=192.168.XX.XX
-Djava.rmi.server.logCalls=true
-Djava.endorsed.dirs=/usr/local/tomcat/endorsed -classpath
/usr/local/tomcat/bin/bootstrap.jar -Dcatalina.base=/usr/local/tomcat
-Dcatalina.home=/usr/local/tomcat
-Djava.io.tmpdir=/usr/local/tomcat/temp
org.apache.catalina.startup.Bootstrap start


Then when trying to connect through jconsole I am running the
following command :

jconsole -debug 192.168.XX.XX:9888


It throws the following error:

java.lang.NullPointerException
    at javax.management.remote.rmi.RMIConnector.connect(RMIConnector.java:281)
    at javax.management.remote.rmi.RMIConnector.connect(RMIConnector.java:228)
    at sun.tools.jconsole.ProxyClient.tryConnect(ProxyClient.java:334)
    at sun.tools.jconsole.ProxyClient.connect(ProxyClient.java:296)
    at sun.tools.jconsole.VMPanel$2.run(VMPanel.java:281)


I have run out of ideas for debugging this and can't seem to find any
answers.  Any thought or ideas?

As a second problem, shutting down tomcat does not stop the jmx
process and i cannot restart tomcat since it is still listening on
9888.  Do I have to specify anything to stop the JMX process during
shutdown?


Thanks all
-- 
- Dustin Chesterman

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org


Re: JMX login error : java.lang.NullPointerException at javax.management.remote.rmi.RMIConnector.connect(RMIConnector.java:281)

Posted by Dustin Chesterman <dc...@gmail.com>.
Thanks for the reply.

netstat -a | grep 9888 returned nothing.

netstat -an | grep 9888  returns :
tcp        0      0 :::9888                     :::*
    LISTEN


Removing the -debug parameter has no effect.


-Dustin



On Tue, Feb 22, 2011 at 9:17 AM, Martin Gainty <mg...@hotmail.com> wrote:
> netstat -a | grep 9888
> write down the listening host for 9888 e.g. (127.0.0.1)
>
> dont use the -debug parameter when starting jconsole
>
> jconsole listening-jost:9888
>
> Martin Gainty
> ______________________________________________

On Tue, Feb 22, 2011 at 8:58 AM, Dustin Chesterman <dc...@gmail.com> wrote:
> Hello all -
>  We are running Tomcat 6 on RHEL 5 and Oracle JDK 1.6_24 and I am
> having a problem loggin into the jmx services remotely through
> jconsole.
>
> Here is my setenv.sh :
>
> JAVA_OPTS="-Xms512m -Xmx1152m -XX:MaxPermSize=512m"
> CATALINA_OPTS="$CATALINA_OPTS -Dcom.sun.management.jmxremote
> -Dcom.sun.management.jmxremote.port=9888"
> CATALINA_OPTS="$CATALINA_OPTS -Dcom.sun.management.jmxremote.ssl=false
> -Dcom.sun.management.jmxremote.authenticate=false"
> CATALINA_OPTS="$CATALINA_OPTS -Djava.rmi.server.hostname=192.168.33.70"
> CATALINA_OPTS="$CATALINA_OPTS -Djava.rmi.server.logCalls=true"
>
>
> Here is the output from 'ps -elf | grep tomcat'  (I also see the 9888
> port listening when using netstat) :
>
> 0 S root      2930     1  1  85   0 - 500084 184466 20:47 ?
> 00:00:15 /usr/java/default/bin/java
> -Djava.util.logging.config.file=/usr/local/tomcat/conf/logging.properties
> -Xms512m -Xmx1152m -XX:MaxPermSize=512m
> -Djava.util.logging.manager=org.apache.juli.ClassLoaderLogManager
> -server -Dbuild.compiler.emacs=true -Dcom.sun.management.jmxremote
> -Dcom.sun.management.jmxremote.port=9888
> -Dcom.sun.management.jmxremote.ssl=false
> -Dcom.sun.management.jmxremote.authenticate=false
> -Djava.rmi.server.hostname=192.168.XX.XX
> -Djava.rmi.server.logCalls=true
> -Djava.endorsed.dirs=/usr/local/tomcat/endorsed -classpath
> /usr/local/tomcat/bin/bootstrap.jar -Dcatalina.base=/usr/local/tomcat
> -Dcatalina.home=/usr/local/tomcat
> -Djava.io.tmpdir=/usr/local/tomcat/temp
> org.apache.catalina.startup.Bootstrap start
>
>
> Then when trying to connect through jconsole I am running the
> following command :
>
> jconsole -debug 192.168.XX.XX:9888
>
>
> It throws the following error:
>
> java.lang.NullPointerException
>    at javax.management.remote.rmi.RMIConnector.connect(RMIConnector.java:281)
>    at javax.management.remote.rmi.RMIConnector.connect(RMIConnector.java:228)
>    at sun.tools.jconsole.ProxyClient.tryConnect(ProxyClient.java:334)
>    at sun.tools.jconsole.ProxyClient.connect(ProxyClient.java:296)
>    at sun.tools.jconsole.VMPanel$2.run(VMPanel.java:281)
>
>
> I have run out of ideas for debugging this and can't seem to find any
> answers.  Any thought or ideas?
>
> As a second problem, shutting down tomcat does not stop the jmx
> process and i cannot restart tomcat since it is still listening on
> 9888.  Do I have to specify anything to stop the JMX process during
> shutdown?
>
>
> Thanks all
> --
> - Dustin Chesterman
>

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org