Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.Sign up
-javaagent: CleanupThread broken when discovery is enabled - 1.2.2 #155
If discovery is enabled (the default), and Jolokia is deployed as a Java Agent, the JVM never shuts down cleanly. This appears to be due to the CleanupThread implementation looking only considering Daemon threads, but the multicast discovery thread is not a daemon thread.
Partial stack trace from a machine after the app has exited cleanly (Tomcat 6, in this case):
In the meantime, a simple workaround is to disable discovery on the Java Agent: "-javaagent:/path/to/jolokia-agent.jar=discoveryEnabled=false". With this flag in place, the discovery thread never starts, the CleanupThread works as expected, and the JVM can cleanly shut down.