title: How to debug Apache Storm in Local Cluster/Mode through eclipse
body: <p>Using the following Q&amp;A I managed to get debugging enabled through eclipse on an Apache Storm cluster (running locally). <a href="https://stackoverflow.com/questions/32226052/how-to-debug-apache-storm-in-eclipse">How to debug Apache Storm in Eclipse?</a></p>
  
  <p>My <code>conf/storm.yaml</code> has the following line to enable debugging on the worker nodes:</p>
  
  <pre><code>worker.childopts: "-agentlib:jdwp=transport=dt_socket,address=8000,server=y,suspend=y"
  </code></pre>
  
  <p>When I submit a Topology to storm to run (in a cluster), I can set breakpoints and view variables in my editor.</p>
  
  <p>But when I try to run it locally (In <a href="https://storm.apache.org/documentation/Local-mode.html" rel="nofollow noreferrer">Local Mode</a>), I can't seem to connect (Connection Refused) - through eclipse.</p>
  
  <pre><code># I'm using storm crawler, I submit a topology like so:
  storm jar target/storm-crawler-core-10.6-SNAPSHOT-jar-with-dependencies.jar \
   com.digitalpebble.storm.crawler.CrawlTopology \
  -conf crawler-conf.yaml \
  -local
  
  # ^ The `-local` runs it in a `LocalCluster`
  # If I submit it to my actual cluster (without -local), I can debug it through eclipse.
  
  # View the pastebin for all the output : http://pastebin.com/PEdA7fH0
  </code></pre>
  
  <p><a href="http://pastebin.com/PEdA7fH0" rel="nofollow noreferrer">I have included all the output from the above command to a pastebin. Click here to view it</a></p>
  
  <p><a href="https://github.com/DigitalPebble/storm-crawler/blob/master/core/src/main/java/com/digitalpebble/storm/crawler/ConfigurableTopology.java#L57" rel="nofollow noreferrer">More information on how storm crawler launches the LocalCluster.</a></p>
  
  <p>I want to be able to debug in local mode so I can see the output in the command line (as I make my way through the breakpoints I set) and quickly make changes and re-run, basically to speed up my development flow.</p>
  
  <hr>
  
  <h1>How can I debug my code through the eclipse debugger when running Apache Storm  in a LocalCluster <a href="https://storm.apache.org/documentation/Local-mode.html" rel="nofollow noreferrer">(Local Mode)</a>?</h1>