Rahul
Rahul

Reputation: 896

Cannot create JMX connection from JProfiler

I am trying to connect JProfiler (10.0.1) to JMX port using quick attach -> another computer. I can connect to JMX port using jvisualvm and JConsole easily, all I have to do is put in host and port. But on jprofiler I get following error

"Another appliction is running on port 19002. Please check your port configuration".

I am using oracle JDK jdk1.8.0_181. Below are the JXM options i am using for server startup.

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

Upvotes: 2

Views: 2735

Answers (1)

Ingo Kegel
Ingo Kegel

Reputation: 47965

JProfiler does not connect to profiled JVMs via JMX, the agent opens a server socket on a dedicated port, by default 8849.

If you use quick attach, you do not have to specify a port at all, but select a JVM from a list of running JVMs. For the selected JVM, the profiling agent will be loaded and a port will be assigned automatically in such a way that you do not have to deal with it at all.

I would also recommend to use the latest version, not 10.0.1.

Upvotes: 2

Related Questions