title: eclipse and tomcat debugging
body: <p>While trying to configure eclipse, tomcat to debug a maven project I am getting the following error:</p>
  
  <p>Failed to connect to remote VM. Connection refused.
  Connection refused</p>
  
  <p>What am i doing wrong?</p>
  
  <pre><code>java.net.ConnectException: Connection refused
      at java.net.PlainSocketImpl.socketConnect(Native Method)
      at java.net.PlainSocketImpl.doConnect(PlainSocketImpl.java:351)
      at java.net.PlainSocketImpl.connectToAddress(PlainSocketImpl.java:213)
      at java.net.PlainSocketImpl.connect(PlainSocketImpl.java:200)
      at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:432)
      at java.net.Socket.connect(Socket.java:529)
      at java.net.Socket.connect(Socket.java:478)
      at java.net.Socket.&lt;init&gt;(Socket.java:375)
      at java.net.Socket.&lt;init&gt;(Socket.java:189)
      at org.eclipse.jdi.internal.connect.SocketTransportService$2.run(SocketTransportService.java:136)
      at java.lang.Thread.run(Thread.java:680)
  </code></pre>