Redhat+weblogic Remote Jconsole monitoring Java program run

Source: Internet
Author: User
Tags jconsole

Jconsole can monitor the memory usage of Java processes on the remote host. This article explains how to use Jconsole to monitor WebLogic and Tomcat on a remote host.

First, the environment

1. Native Environment: Windows xp+jconsole (jdk1.6)

2. Remote Environment 1:sunos (Solaris, jdk1.6) +weblogic

3, Remote Environment 2:redhat (jdk1.6) +tomcat

This article will describe the configuration of the two environments, the configuration is basically the same, the other systems should be similar.

Two, remote connection SunOS (Solaris) +weblogic

1, jconsole use JMX for monitoring, need to configure the startup parameters when the application starts. Because the WebLogic server is used, it needs to be configured in the ${DOMAIN_HOME}/BIN/SETDOMAINENV.SH environment. Java_options= "${java_options}-dcom.sun.management.jmxremote.port=9000"

Java_options= "${java_options}-dcom.sun.management.jmxremote.authenticate=false"

Java_options= "${java_options}-dcom.sun.management.jmxremote.ssl=false"

2, view/etc/hosts, by default, the hostname has been mapped to the IP, so there is no need to adjust.

localhost 127.0.0.1

localhost 10.1.97.20 c20 c20.sinosure.com.cn loghost

3. Modify the ${java_home}/jre/lib/management directory Properties chmod-r 777./management

4, start WebLogic, and on the local open jconsole for remote connection, select "Remote Process", enter the host IP and port number.

Click "Connect" to display the Monitoring interface:

Note: When you start and close WebLogic, the setdomainenv.sh script is called. If the configuration is complete and the WebLogic is started, and then WebLogic is turned off, the port number is indicated to be occupied, because the listener for that port number is started when WebLogic is started and closed. Consider adding a judgment to the setdomainenv.sh to start listening on the port number only when the WebLogic is started.

Third, remote connection redhat+tomcat--is not tested

1, the first step of the same section, the difference is that Tomcat at startup, set the parameters of the file when catalina.sh, so the parameters need to be set here. java_opts= "$JAVA _opts-djava.rmi.server.hostname=192.168.1.110" "java_opts=" $JAVA _opts- dcom.sun.management.jmxremote.port=9000 "java_opts=" $JAVA _opts-dcom.sun.management.jmxremote.authenticate=false "Java_opts=" $JAVA _opts-dcom.sun.management.jmxremote.ssl=false "

2, for Redhat, by default, hostname does not correspond to IP. On Redhat, you can use Hostname-i to view, if 127.0.0.1 is displayed, you need to configure/etc/hosts. #127.0.0.1 localhost.localdomain localhost 192.168.1.110 localhost.localdomain localhost

Note: The 127.0.0.1 line is commented, and the hostname corresponds to 192.168.1.110.

3. Configure the files under the ${java_home}/jre/lib/management directory. CP Jmxremote.password.template Jmxremote.password

Restore commented-out content: Monitorrole QED controlrole

Execute command, modify file properties: chmod jmxremote.access chmod Jmxremote.password

4, can refer to the fourth step of the previous section.

Note: When you start and close Tomcat, the catalina.sh script is called. If the configuration is complete and Tomcat is started, and then the Tomcat is turned off, the port number is indicated to be in use because the listener for that port number is started when Tomcat is started and shut down. It is considered that the listener for that port number is initiated only when Tomcat is started by judging that the parameter is start.

With the above configuration, it can be seen that the configuration on the SunOS system and the Redhat system is not exactly the same, the same configuration in Tomcat is not exactly the same, you need to pay attention to the differences.

Four, check and exception handling

1, after the boot, the system will start monitoring the configuration port, you can check the command to see if the Normal Startup: Netstat-an | grep 9000

If there is a monitor, the instructions start normally.

2, after starting the Jconsole, the prompt connection is not on, but found on the remote host that the port has been connected (can be viewed through Netstat-an). Check that the configuration is incorrect, or see if the firewall is off.

This article is from the Linux commune website (www.linuxidc.com) Source Link: http://www.linuxidc.com/Linux/2015-02/113419.htm

Redhat+weblogic Remote Jconsole monitoring Java program run

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.