- service:jmx:rmi:///jndi/rmi://localhost:50500/jmxrmi : this is the standard Java JMX URL
- service:jmx:rmi:///jndi/rmi://localhost:50500/alfresco/jmxrmi : this is the JMX Alfresco URL
- set a static port for the second (server) RMI connection
- set the hostname for the second (server) RMI connection
- creates a tunnel for the first (registry) connection
- creates a tunnel for the second (server) connection
- We need to add the property
monitor.rmi.services.port=50510
to alfresco-global.properties, in order to set the static port for the RMI server connection - We need to modify alfresco.sh to set the hostname by adding
-Djava.rmi.server.hostname=jmxhost
to the JAVA_OPTS.
- We need to add
127.0.0.1 jmxhost
to /etc/hosts - Then we can create the 2 ssh tunnels for the RMI registry and server connections:
ssh -f user@theserver.com -L 2000:localhost:50500 -N
ssh -f user@theserver.com -L jmxhost:50510:localhost:50510 -N
com.sun.management.jmxremote.rmi.port
. As the next Alfresco 4.2 will support Java 1.7, it will become an option.