Processing
 

How to connect JMC (Java Mission Control) to remote JVM in ubuntu?

27/02/2015 12:28#1

Joined at: 6 months ago

Post: 1

Thank: 0

Thanked: 0

I am able to connect to JMC to the JVM while on the same system. However, I want to monitor a remote server. How do I connect my local JMC to my remote JVM?

03/03/2015 13:42Top#2

Srinivasu

Member

Joined at: 6 months ago

Post: 2

Thank: 0

Thanked: 0

In the server {Ubuntu} Edit the /etc/hosts file

127.0.1.1       server-name 

Replace above line with this line

<system-ip>     server-name 
28/02/2015 10:08Top#3

Hirt

Member

Joined at: 6 months ago

Post: 1

Thank: 0

Thanked: 0

It's all described in the documentation:
1. Click Help->Java Mission Control Help.
2. Check the JVM browser help.

For more detailed information, check out:
http://docs.oracle.com/javase/7/docs/technotes/guides/management/agent.html

First you need to enable the external JMX agent on the server. You do this by adding the relevant com.sun.management.jmxremote to the command line flags for the server JVM you wish to connect to. Here is a simple example of a set of system properties that can be used. They disable security and authentication, so NEVER use it like this in production:

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

Next you create a custom connection in JMC. You do this by clicking the "Create custom connection" button in the JVM browser:

In the upcoming dialog you simply enter the host and port.

15/07/2016 13:43Top#4

Jack

Member

Joined at: 10 months ago

Post: 176

Thank: 0

Thanked: 0

My environment is jboss 7.1 in Linux, was trying to connect JMC to my jboss instance, initially I got problems with connection refused - after a day and half of digging, remote JMC works for me now, with the following configs in standalone.conf:

JBOSS_MODULES_SYSTEM_PKGS="org.jboss.byteman,org.jboss.logmanager"  JAVA_OPTS="$JAVA_OPTS -Djboss.modules.system.pkgs=$JBOSS_MODULES_SYSTEM_PKGS"   JAVA_OPTS="$JAVA_OPTS -Djava.util.logging.manager=org.jboss.logmanager.LogManager"  JAVA_OPTS="$JAVA_OPTS -Xbootclasspath/p:/apps/jboss-as-7.1.1.Final/modules/org/jboss/logmanager/main/jboss-logmanager-1.2.2.GA.jar" JAVA_OPTS="$JAVA_OPTS -Xbootclasspath/p:/apps/jboss-as-7.1.1.Final/modules/org/jboss/logmanager/log4j/main/jboss-logmanager-log4j-1.0.0.GA.jar" JAVA_OPTS="$JAVA_OPTS -Xbootclasspath/p:/apps/jboss-as-7.1.1.Final/modules/org/apache/log4j/main/log4j-1.2.16.jar"  JAVA_OPTS="$JAVA_OPTS -Dcom.sun.management.jmxremote=true" JAVA_OPTS="$JAVA_OPTS -Dcom.sun.management.jmxremote.port=7091" JAVA_OPTS="$JAVA_OPTS -Dcom.sun.management.jmxremote.rmi.port=7091" JAVA_OPTS="$JAVA_OPTS -Dcom.sun.management.jmxremote.authenticate=false" JAVA_OPTS="$JAVA_OPTS -Dcom.sun.management.jmxremote.ssl=false"  JAVA_OPTS="$JAVA_OPTS -XX:+UnlockCommercialFeatures" JAVA_OPTS="$JAVA_OPTS -XX:+FlightRecorder" 
Similar articles

Non-interactive method for dpkg-reconfigure tzdata

5 years ago - Reply: 3 - Views: 140

monit is not able to read mongod.lock

2 years ago - Reply: 3 - Views: 138

Ubuntu: hadoop command not found

2 years ago - Reply: 4 - Views: 244

C# Mono Console.ReadLine quitting

4 years ago - Reply: 1 - Views: 87

linking jsoncpp on Ubuntu

2 years ago - Reply: 1 - Views: 5

Build artifacts over ssh jenkins - PHP

2 years ago - Reply: 1 - Views: 37

Can't load Metasploit after installation

2 years ago - Reply: 5 - Views: 212

Selenium FirefoxDriver in Headless get error

2 years ago - Reply: 1 - Views: 96

Unable to start MongoDB. ERROR: addr already in use

2 years ago - Reply: 2 - Views: 118

ZSH Agnoster Theme showing machine name

2 years ago - Reply: 4 - Views: 248

Unable to start firefox browser with jenkins user

2 years ago - Reply: 2 - Views: 110

vé máy bay vé máy bay giá rẻ ve may bay ve may bay gia re vé máy bay vé máy bay giá rẻ ve may bay ve may bay gia re vé máy bay vé máy bay giá rẻ ve may bay ve may bay gia re vé máy bay vé máy bay giá rẻ ve may bay ve may bay gia re vé máy bay vé máy bay giá rẻ ve may bay ve may bay gia re vé máy bay vé máy bay giá rẻ ve may bay ve may bay gia re vé máy bay vé máy bay giá rẻ ve may bay ve may bay gia re