- edited description
Thread dumps and CPU data collection fails if the PID changes and the GUI client is not restarted
Summary
If you restart the application (e.g Confluence) and keep the PDC GUI client open and connected, the thread dumps and CPU collection will result in empty files.
Steps to Reproduce
- Open the GUI client
- Connect to the instance on http://server-IP:4242
- Restart the application (e.g) Confluence
- Don't restart the client GUI and try to run the check
Expected Results
CPU usage and thread dumps are populated.
Actual Results
CPU usage and thread dumps are empty. The below exception is thrown in the atlassian-perftools.logfile:
2018-09-27 12:07:57 [http-nio-4242-exec-3] INFO c.a.p.c.t.ThreadDumpCollector - Unable to collect with MBeanThreadDump due to an exception.
java.net.ConnectException: A MBean server connection was not found or able to be accessed for pid 2056.
...
Caused by: java.io.IOException: No such process
Notes
This may happen because the GUI client grabs the application PID at the moment you connect to the tookit. If you restart the applicaiton but keep the GUI client open and connected to the tookit, it will use the old PID.
This behaviour could be avoided by checking the PID again when the user clicks on Run data collection. That way, even if the remote app has been restarted, the checkup will run with the correct PID.
Workaround
Restart the GUI client and reconnect to the toolkit to get the new PID.
Comments (1)
-
reporter - Log in to comment