Skip to content

No JMX connection with jstatd and Java 11 #225

@Verdoso

Description

@Verdoso

Describe the bug
When I connect to a host that has jstatd installed, VisualVM is able to connec to the applications running there with Java 8 through JMX and display the CPU usage, MBeans etc. The applications running Java 11 with the same properties are displayed but the CPU panel shows the "Not supported for this JVM" message.
If I add manually a JMX connection to the Java 11 running application, the CPU/MBeans panels are displayed correctly.

To Reproduce
Set up a host with two applications, one running under Java 8 and another running under Java 11 and run them with the following properties:

-Djava.rmi.server.hostname=`hostname -f`
-Dcom.sun.management.jmxremote=true
-Dcom.sun.management.jmxremote.port=0
-Dcom.sun.management.jmxremote.local.only=false
-Dcom.sun.management.jmxremote.ssl=false
-Dcom.sun.management.jmxremote.authenticate=false
-Djava.net.preferIPv4Stack=true

Start jstatd in the host. Connect to the host using VMConsole. The Java 8 applications is able to display the CPU panel, the Java 11 is not.

Expected behavior
I would expect jstatd to be able to connect with JMX automatically to the Java 11 application, the same way it does to the application running under Java 8.

VisualVM log
No error or warning whatsoever in the message.log, I can attach a sample later if needed.

Desktop (please complete the following information):

  • OS: VisualVM running in W10, hosts running Linux
  • JDK version: VisualVM tested with Java 8 and 11, applications running 1.8.0_222/11.0.4 AdoptOpenJDK
  • Version: Tested with 1.4.4, 2.0.4 and master

Additional context
The same applications were working fine before being recompiled and run with Java 11.

I searched for new properties or differences in JDK11 vs JDK8 regarding jstatd, JMX properties etc. and found nothing that might explain that.

Edited to change local.only to prevent confusions.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions