VisualVM issue when starting JMX agent with jcmd
Jaroslav Bachorik
jaroslav.bachorik at oracle.com
Mon Sep 2 03:36:43 PDT 2013
Hi Martin,
On 08/30/2013 08:36 AM, Martin Traverso wrote:
> I'm running into an issue when connecting to a process from VisualVM.
> First, let me describe the setup:
> - A Linux machine running jstatd configured with a "grant all permissions"
> policy file and a test java program that sleeps forever. The Java version
> is:
>
> java version "1.7.0_10"
> Java(TM) SE Runtime Environment (build 1.7.0_10-b18)
> Java HotSpot(TM) 64-Bit Server VM (build 23.6-b04, mixed mode)
>
> - VisualVM 1.3.6 (Java 1.7.0_25-b15) running on a Mac, with a "jstatd
> connection" entry for the first machine
>
> If I start the test program with the following -D options and connect to it
> in VisualVM, everything works fine. I can see the Overview, Monitor,
> Threads, MBeans tabs, browse the mbeans, etc.
>
> -Dcom.sun.management.jmxremote=true
> -Dcom.sun.management.jmxremote.port=9600
> -Dcom.sun.management.jmxremote.rmi.port=9601
> -Dcom.sun.management.jmxremote.authenticate=false
> -Dcom.sun.management.jmxremote.ssl=false
>
> If, instead, I run it without any command line options and start the jmx
> agent via jcmd, some tabs are missing when I connect to the process in
> VisualVM. Also half of the things don't work (e.g., the mbeans tab shows
> "Data not available because JMX connection to the JMX agent could not be
> established", CPU information in the monitor tab is disabled, etc).
>
> jcmd <pid> ManagementAgent.start jmxremote.port=9600
> jmxremote.rmi.port=9601 jmxremote.ssl=false jmxremote.authenticate=false
> jcmd <pid> ManagementAgent.start_local
>
> Is this expected behavior? Is there any way around it? Maybe I'm missing
> some configuration options…
Well, it is expected. VisualVM performs the capability checks only on
the first access to the application. You can add a new JMX application
manually after you have enabled the management agent.
Cheers,
-JB-
>
> Thanks!
>
> Martin
>
More information about the serviceability-dev
mailing list