Remotely monitor Tomcat using Java VISUALVM

Source: Internet
Author: User


1. The good habits specified by the TOMCAT environment variable

After you install Tomcat, configure the Catalina_home and catalina_base environment variables, if you need to specify environment variables or JVM parameter values, The annotations in the catalina.sh file are specified separately in the setenv.sh or SetEnv.bat file, so that the catalina.sh is automatically read at execution time.

2. Configure enable Tomcat JMX Remote

Java Visual VM remotely monitors tomcat, configuration see:


Java_opts= "-djava.rmi.server.hostname=192.168.88.29- Dcom.sun.management.jmxremote-dcom.sun.management.jmxremote.port=8089-dcom.sun.management.jmxremote.ssl= False-dcom.sun.management.jmxremote.authenticate=true-dcom.sun.management.jmxremote.password.file=. /conf/jmxremote.password-dcom.sun.management.jmxremote.access.file=. /conf/jmxremote.access "


you do not need to configure Paasword.file and access.file if you are authenticate=false. Otherwise, you need to specify the user name and read/write permissions in the Access.file format such as:

Monitorrole Readonlycontrolrole ReadWrite


Specify the user name and password in the password.file format such as:


Monitorrole Tomcatcontrolrole Tomcat

there is a tip in the documentation: The password file should are read-only and only accessible by the operating system, user Tomcat is running as. (meaning that Password.file's read and write permissions are 400, only operating system users running the Tomcat service can access it)


Start Tomcat on the server, run Jvisual.exe locally to configure JMX, and connect to remote tomcat for monitoring.

650) this.width=650; "src=" Http://s1.51cto.com/wyfs02/M01/78/D7/wKiom1aD2fngYlLLAAC0B-3Ec5s765.png "title=" Jmx.png "alt=" Wkiom1ad2fngylllaac0b-3ec5s765.png "/>

  

Portal: Tracing the source of the VISUALVM JMX connection: http://visualvm.java.net/jmx_connections.html


This article is from the "Red Horse Red" blog, please be sure to keep this source http://aiilive.blog.51cto.com/1925756/1730136

Remotely monitor Tomcat using Java VISUALVM

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.