title: Jacoco jmx dump, Connection reset error
body: <p>I am running tomcat with a jacoco agent like this:</p>
  
  <pre><code>-javaagent:/path_to_jar/jacocoagent.jar=jmx=true,output=tcpclient,port=8001
  </code></pre>
  
  <p>which I know is working because lsof command lists <code>88208 TCP localhost:**8001** (LISTEN)</code>.</p>
  
  <p>When I run this example <a href="https://github.com/jacoco/jacoco/blob/master/org.jacoco.examples/src/org/jacoco/examples/ExecutionDataClient.java" rel="nofollow">code</a> with <code>PORT = 8001;</code> I get the error:
  <code>Exception in thread "main" java.net.SocketException: Connection reset</code></p>
  
  <p>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 <a href="https://github.com/jacoco/jacoco/blob/master/org.jacoco.examples/src/org/jacoco/examples/MBeanClient.java" rel="nofollow">MBeanClient</a>, 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.</p>
  
  <p>Any suggestions for either option?  I just need to be able to get a dump file without stopping the server.</p>