TechDocs


   Rubrik > Development > Java >


    12.04.2011 16:28:26  Development > Java    

Tomcat JAVA_OPTS JMX settings, remote access using jconsole

Manage Tomcat with JMX, without SSL and Authentication:
set JAVA_OPTS="$JAVA_OPTS -Dcom.sun.management.jmxremote"
set JAVA_OPTS="$JAVA_OPTS -Dcom.sun.management.jmxremote.port=9494"
set JAVA_OPTS="$JAVA_OPTS -Dcom.sun.management.jmxremote.authenticate=false"
set JAVA_OPTS="$JAVA_OPTS -Dcom.sun.management.jmxremote.ssl=false"

Manage Tomcat with JMX, SSL and authentication:
JAVA_OPTS="$JAVA_OPTS -Dcom.sun.management.jmxremote.port=9494"
JAVA_OPTS="$JAVA_OPTS -Dcom.sun.management.jmxremote.ssl=true"
JAVA_OPTS="$JAVA_OPTS -Dcom.sun.management.jmxremote"
JAVA_OPTS="$JAVA_OPTS -Dcom.sun.management.jmxremote.authenticate=true"
JAVA_OPTS="$JAVA_OPTS -Dcom.sun.management.jmxremote.access.file=/home/tomcat/jmxremote.access"
JAVA_OPTS="$JAVA_OPTS -Dcom.sun.management.jmxremote.password.file=/home/tomcat/jmxremote.password"

Content of the jmxremote.password file:
The password file contains role name password pairs.

Secure the password file:
$> chmod 600 jmxremote.password


Content of the jmxremote.access file:
The 'jmxremote.access' file contains the permissions for the roles defined inthe password file.
Assign 'readonly' or 'readwrite' to a role.

Debug the security settings with jconsole:
jconsole -J-Djava.security.debug=all

Similar links:
 =>Tomcat cluster with Apache load balancer mod_jk
 =>Configure Sticky Sessions in a Tomcat cluster
 =>Tomcat cluster session replication
 =>Multiple Tomcat instances on a server
 =>JkStatusManager - Tomcat Load Balancer Management



Übersicht