vendredi 27 février 2015

Jacoco jmx dump, Connection reset error



I am running tomcat with a jacoco agent like this:



-javaagent:/path_to_jar/jacocoagent.jar=jmx=true,output=tcpclient,port=8001


which I know is working because lsof command lists 88208 TCP localhost:**8001** (LISTEN).


When I run this example code with PORT = 8001; I get the error: Exception in thread "main" java.net.SocketException: Connection reset


This appears to be an older example from jacoco. Has something changed with that way I need to access the tcp server? I have also tried to access jacoco through their MBeanClient, but it gives me an InstanceNotFoundException and appears that tomcat does not have "org.jacoco:type=Runtime" listed as a bean when I print out all of the domains.


Any suggestions for either option? I just need to be able to get a dump file without stopping the server.




Aucun commentaire:

Enregistrer un commentaire