Question

Where do you go to edit the Java args in Railo to set up JMX remoting so that I can monitor the JVM with jVisualVM or other java monitoring tools?

In the Apache Tomcat Railo Properties, under the Java tab I have attempted adding the following arguments:

-Dcom.sun.management.jmxremote.port=8701
-Dcom.sun.management.jmxremote.ssl=false
-Dcom.sun.management.jmxremote.authenticate=false

When I boot up the Railo service I get an error in my Railo-stderr.log which states:

2013-06-07 17:55:07 Commons Daemon procrun stderr initialized
Error: Invalid com.sun.management.jmxremote.port number: 8702 -Dcom.sun.management.jmxremote.ssl=false -Dcom.sun.management.jmxremote.authenticate=false

Any ideas on what I'm doing wrong? I can successfully use the exact same set of arguments with my CF9, except I'm using port 8701 for CF. Do I possibly need to boot up my Railo in a different manner?

As far as environment. I am using Railo 4.0.4.001, with Tomcat and the IIS BonCode adapter. I also have a copy of CF9 running on my machine.

Was it helpful?

Solution

Tomcat uses the Apache Commons ProcRun Daemon to run as a Windows service.

When editing the Java options through the GUI (typically by running [tomcat]\bin\Tomcat7w.exe) each command line option needs to be on it's own line without leading or trailing spaces. Because of the size of the text area you're given to edit the Java options, its easy to paste in several options and not notice that each option isn't separated by newlines. I've done this a few times.

In your case, the clue is that the Java error shows a property which chould be a port and is actually a port, plus other options. The kind of error behavior you get though will completely depend on the validation present on the first option on a given line.

ScreenShot of Java Options Dialog

As well as editing the options in the dialog, you can also get to them in the registry at the following locations:

HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Apache Software Foundation\Procrun 2.0\Tomcat7\Parameters\Java\Options (on a 64 bit Windows) or

HKEY_LOCAL_MACHINE\SOFTWARE\Apache Software Foundation\Procrun 2.0\Tomcat7\Parameters\Java\Options (on 32-bit)

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top