JVISUALVM Remote monitoring JVM settings

Source: Internet
Author: User
Tags stop script

In some cases, real-time performance analysis is required for Java applications in a particular environment, and most non-development and test environments typically use JVISUALVM for basic detection to minimize the impact on the system (after it is turned on, the load affects about 20%-30%), and JVISUALVM does not provide a CLI mode , only the GUI is provided. After CentOS 6, the default is not to install graphical windows such as GNOME, in some production environments, because of network and other restrictions, the interface cannot be installed through the system disk or Yum. At this point we need to pre-start the JMX in the Java startup script, in Tomcat, as follows:

Export catalina_opts= "$JAVA _opts-dcom.sun.management.jmxremote=true-dcom.sun.management.jmxremote.port=1099- Djava.rmi.server.hostname=172.18.30.193-dcom.sun.management.jmxremote.ssl=false- Dcom.sun.management.jmxremote.authenticate=false "

172.18.30.193 is the native IP address.

Agent throws Exception: Java.rmi.server.ExportException:Port already in use:1099; Nested exception is:
Java.net.BindException:Address already in Use:jvm_bind

The above options must be set in the catalina_opts variable and set in Java_opts, and the problem will occur.

# catalina_opts (Optional) Java runtime options used when the "start",
# "Run" or "Debug" command is executed.
# Include here and isn't in java_opts all options, that's should
# only being used by Tomcat itself, not by the stop process,
# the version command etc.
# Examples is heap size, GC logging, JMX ports etc.

# java_opts (Optional) JAVA runtime options used when any command
# is executed.
# Include here and don't in catalina_opts all options, which
# should be used by Tomcat and also by the stop process,
# the version command etc.
# Most options should go to catalina_opts.

By Tomcat's stop script, it actually calls another Java runtime socket to 8005 past, so placing it in java_opts causes a jmx to be turned on, so this error occurs.

JVISUALVM Remote monitoring JVM settings

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.