Jconsole configuration - Tomcat


JMX local/remote monitoring configuration for tomcat using JConsole.

Start tomcat with the following self-explanatory params.

1. -Dcom.sun.management.jmxremote=true

2. -Dcom.sun.management.jmxremote.port=8181

3. -Dcom.sun.management.jmxremote.authenticate=false

4. -Dcom.sun.management.jmxremote.ssl=false

These two params are to solve RMI transport issues of java 1.6

5. -Djava.rmi.server.hostname=localhost

6. -Djava.net.preferIPv4Stack=true


Unix/Linux

export CATALINA_OPTS="-Dcon.sun.management.jmxremote=true

-Dcom.sun.management.jmxremote.port=8181

-Dcom.sun.management.jmxremote.authenticate=false

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

Windows

On windows set each parameter separately, otherwise you must use line separator (\).

set CATALINA_OPTS=-Dcom.sun.management.jmxremote=true

set CATALINA_OPTS=%CATALINA_OPTS% -Dcom.sun.management.jmxremote.port=8181

set CATALINA_OPTS=%CATALINA_OPTS% -Dcom.sun.management.jmxremote.authenticate=false

set CATALINA_OPTS=%CATALINA_OPTS% -Dcom.sun.management.jmxremote.ssl=false

Jconsole

1. Start Jconsole from command prompt

2. Select Remote Process

3. Enter the url as

service:jmx:rmi:///jndi/rmi://localhost:8686/jmxrmi

4. Click connect

Now the JMX client will get connected. You are all set to go.

RMI problem on java 1.6

Sometimes RMI fails to connect on java version 1.6. To solve this use.

-Djava.rmi.server.hostname=[hostname or IP ] -Djava.net.preferIPv4Stack=true

Comments

Popular posts from this blog

Log4j multiple WAR files in single EAR configuration

Java NIO2 - Watching a directory for changes. FileWatcherService.

Ubuntu Add programs to launcher (Desktop)