简体   繁体   中英

Monitoring a J2EE application running in Tomcat with JMX

All,

If i want to enable JMX on Tomcat for monitoring from the same machine, (ie not remotely) are these properties still required?

com.sun.management.jmxremote.authenticate=false
com.sun.management.jmxremote.port=12345

Isnt it the case that the authenticate and port number properties are only relevant if monitoring remotely? Do i need the above if monitoring locally?

If the port number is not required, how does the client know who to contact Tomcat? Does it listen to a port number that TOmcat has open by default?

You are correct, these parameters only required when monitoring remote application via JMX. When monitoring locally, you can skip them. Obviously the process needs to be started by the same user.

I think there are some exceptions to this rule, see http://download.oracle.com/javase/1.5.0/docs/guide/management/agent.html#local

Q:"If the port number is not required, how does the client know who to contact Tomcat?"
A: jconsole, jps and the likes simply looks for any Java processes that are running on the system and owned by the same user.

Read here: http://download.oracle.com/javase/6/docs/technotes/guides/management/jconsole.html (chapter about attachable applications).

Here is a writeup i did on this subject. JMX setup for external access

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM