2

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 
Rahul
  • 866
  • 8
  • 19

1 Answers1

2

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.

Ingo Kegel
  • 46,523
  • 10
  • 71
  • 102
  • Thanks. stuck on old version due to org i work for. i guess i have to start a process at the same port which jprofiler would connect to ? – Rahul Sep 27 '18 at 12:04
  • disregard my prev. comment, i see the option to get the JProfiler archive. – Rahul Sep 27 '18 at 12:09
  • In case your application runs inside Docker you can follow this instruction to connect either with JProfiler or with VirtualVM. https://gist.github.com/Kevin-Lee/cbfbde89d68299304b1b1a2e6371fe06 VisualVM is a bit easier to setup but also less powerful – futchas Apr 29 '20 at 17:18