Created
November 9, 2011 16:05
-
-
Save obohrer/1351906 to your computer and use it in GitHub Desktop.
Enable JMX remote
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Server side : | |
-Dcom.sun.management.jmxremote -Dcom.sun.management.jmxremote.authenticate=false -Dcom.sun.management.jmxremote.ssl=false -Dcom.sun.management.jmxremote.port=1099 -Djava.rmi.server.hostname=127.0.0.1 -Djava.rmi.server.useLocalHostname=true | |
Client side : | |
Forward port 1099 ==> ssh -L 1099:localhost:1099 username@serverip | |
Download this logging properties file : http://blogs.oracle.com/jmxetc/resource/logging.properties | |
start jconsole using the downloaded properties file : | |
$ jconsole -debug -J"-Djava.util.logging.config.file=logging.properties" localhost:1099 | |
Find the port (48049 in this case) : | |
FINER: [javax.management.remote.rmi.RMIConnector: rmiServer=RMIServerImpl_Stub[UnicastRef [liveRef: [endpoint:[127.0.0.1:48049](remote) | |
Forward the port choosed at runtime : Forward port 48049 ==> ssh -L 48049:localhost:48049 username@serverip | |
On jconsole, try to connect to your server again and it should work ! |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment