0

I'm trying to discover remote running processes on Java Mission Control. So that, I'm using the following attributes to start the JVM:

-Dcom.sun.management.jmxremote.port=50099 \
-Dcom.sun.management.jmxremote.rmi.port=50099 \
-Dcom.sun.management.jmxremote.authenticate=false \
-Dcom.sun.management.jmxremote.ssl=false \
-Dcom.sun.management.jmxremote.autodiscovery=true \
-Dcom.sun.management.jdp.name=MyCluster/MyJVM Teste \
-Dcom.sun.management.jdp.address=224.0.23.178 \
-Dcom.sun.management.jdp.port=50099

In Java Mission Control, the JDP preferences are set to:

  • Multicast group to join: 224.0.23.178
  • Multicast port: 50099
  • Heart Beat Timeout(s): 12

But it is not working for me. Does anybody know what I'm doing wrong?

hbelmiro
  • 987
  • 11
  • 31

1 Answers1

0

I'm guessing you might have read http://hirt.se/blog/?p=388 Marcus mentions TTL, and refers to the command line reference (which I currently can't find, will try to find it..), but I would believe the sysprop would be: -Dcom.sun.management.jdp.ttl=(default is 1)

If you know your client and server are on different subnets, this might be worth setting to something higher. (This requires the router(s) to have multicast enabled)

I'm not sure that using the same port for JDP and JMX is a good idea (it might work, I just don't know..). This could also be worth changing.

Klara
  • 2,935
  • 22
  • 19
  • Thanks for your answer, Klara. I found the command line reference and changed it to higher values (32, 64). I also removed RMI port, but it still doesn't work. The router has multicast enabled. – hbelmiro Oct 21 '14 at 11:03
  • Does it work if you try starting a jvm with the same flags on your client machine? – Klara Oct 21 '14 at 11:56
  • It appears only under 'Local'. – hbelmiro Oct 21 '14 at 15:39
  • What if you run it locally, but revert back to the default jdp port? I'll try to ask the JDP whiz in our team to see if he has any ideas. – Klara Oct 22 '14 at 07:25
  • What versions of JVM and JMC are you using? – Klara Oct 22 '14 at 11:18
  • JDK 1.8.0_20 JMC 5.4.0 – hbelmiro Oct 22 '14 at 11:48
  • You should be able to see the JVM under Discovered(JDP) (if you enable the tree view). Some setting on your machine is affecting this then, will try to find out which settings/permissions could be required.. – Klara Oct 22 '14 at 14:47
  • Got this link from our JDP whiz, relevant in case you run on Linux and haven't set up multicast/broadcast locally ... http://lartc.org/howto/lartc.multicast.html – Klara Oct 23 '14 at 07:38
  • Thanks, Klara. That will be usefull. But when I run locally (on Windows) it also doesn't work. – hbelmiro Oct 23 '14 at 16:07
  • If you add the -verbose flag when starting your local server jvm, do you see any printouts like this?: [Loaded sun.management.jdp.JdpController from c:\java\8u20-b26\jre\lib\rt.jar] – Klara Oct 24 '14 at 07:14
  • I'm wondering if setting -Djava.net.preferIPv4Stack=true on the server jvm would make any difference. – Klara Oct 24 '14 at 07:22
  • Starting the JVM with -verbose flag didn't show anything related to sun.management.jdp.JdpController. -Djava.net.preferIPv4Stack=true didn't make any difference. – hbelmiro Oct 24 '14 at 15:53
  • I forgot the -Dcom.sun.management.jmxremote.registry.ssl=false. It's too similar to -Dcom.sun.management.jmxremote.ssl=false and I wasn't able to see the difference. – hbelmiro Oct 28 '14 at 18:22
  • Did that help? I thought registry.ssl defaulted to false? – Klara Oct 30 '14 at 08:21