Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Bug] JMX and Discovery failure with particular JVM flags #1517

Open
andrewazores opened this issue Jun 2, 2023 · 2 comments
Open

[Bug] JMX and Discovery failure with particular JVM flags #1517

andrewazores opened this issue Jun 2, 2023 · 2 comments
Labels
bug Something isn't working

Comments

@andrewazores
Copy link
Member

As reported in #1516, setting the below JVM flags on a target application leads to successful discovery of the application by Cryostat, and successful attempts to open a JMX connection:

-Dcom.sun.management.jmxremote
-Dcom.sun.management.jmxremote.port=9091
-Dcom.sun.management.jmxremote.authenticate=false
-Dcom.sun.management.jmxremote.ssl=false
-Dcom.sun.management.jmxremote.autodiscovery=true

Adding the following additional flags breaks it, so that Cryostat no longer displays the application in the UI:

-Dcom.sun.management.jmxremote.rmi.port=9091
-Djava.rmi.server.hostname=127.0.0.1
@andrewazores andrewazores added the bug Something isn't working label Jun 2, 2023
@andrewazores andrewazores moved this to Backlog in 2.4.0 release Jun 2, 2023
@andrewazores
Copy link
Member Author

I believe that adding these two flags is likely not directly breaking Cryostat's discovery of the application - it should still be picking it up by the KubeApi mechanism in the original report's scenario. However, Cryostat will try to open a connection to the JVM to determine its jvmId. Something about this JVM flag configuration causes the JMX connection attempt to fail in a mode that causes Cryostat to reject the discovery node update (as opposed to keeping it with jvmId: null as it does in the case of JMX authentication failure).

@andrewazores
Copy link
Member Author

More information on my tests:

  • To connect to the pod using JMC 8 the following 2 args are required:
-Dcom.sun.management.jmxremote.rmi.port=9091
-Djava.rmi.server.hostname=127.0.0.1
  • Removing -Djava.rmi.server.hostname=127.0.0.1 makes Cryostat discover the pod, but JMC 8 no longer can connect to the JFR on the App. The bug is triggered when trying to start the recording.

Originally posted by @rjbaucells in https://github.com/cryostatio/cryostat/issues/1516#issuecomment-1574463731

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
No open projects
Status: Backlog
Development

No branches or pull requests

1 participant