Trying to track down what may be a memory leak in a Java app, or just some really awful misconfiguration by me. On good advice I’ve now added jmxremote everywhere.
In its most bare bones implementation, jmxremote gets enabled by adding the following to your JAVA_OPTS:
This will let you launch jconsole and other tools in a local X session (we usually use VNC to remote onto a box and launch jconsole from there) to get a good look inside a running JVM.
To access from a remote workstation or server, add the following as well:
-Dcom.sun.management.jmxremote.port=1099 -Dcom.sun.management.jmxremote.ssl=false -Dcom.sun.management.jmxremote.authenticate=false -Djava.rmi.server.hostname=myhost.example.com
Of course the above lines would be set out on the same line, separated only by a single whitespace between each term. The port shown is just for demonstration purposes, any free port above 1000 will do. The last line is actually very important on Linux systems, as Java sometimes gets confused about its home address (people often have trouble when things try to connect via the lo interface, rather than one with an actual, routable, IP address).