How to connect the console to the connection is lost

I am doing a load test for my project, when I try to use jconsole to monitor when the server restarts, the connection is lost, is there any solution for this?

thanks

+4
source share
3 answers

jconsole connects to the process when the server restarts, it receives a new process identifier, and jconsole does not know about the newly created process. There is no other, but you must connect it yourself.

0
source

Jconsole is connected to the process (jvm). When your server is stopped, the process no longer exists, so the jconsole connection is lost. And so you need to connect jconsole to a new process created at server startup.

0
source

is there any solution for this?

One way to ease the pain is to use a JMX URL instead of a process identifier. The JMX URL never changes when it restarts, so while you need to connect again, at least the process is less painful.

URLs are in the format service:jmx:rmi:///jndi/rmi://hostName:portNum/jmxrmi . Not sure what your server is, but here's how to enable it on tomcat .

0
source

All Articles