title: Eclipse connection refused when remote debugging
body: <p>I've been following this tutorial which is <a href="http://javarevisited.blogspot.com/2011/02/how-to-setup-remote-debugging-in.html" rel="nofollow">how to setup remote debugging</a>.
  I have my Jar running debug mode listening on port 6065 on my server with the following setting:</p>
  
  <pre><code>-Xrunjdwp\:transport\=dt_socket,server\=y,address\=6065,suspend\=n
  </code></pre>
  
  <p>I start the JAR on my server with jar in debug mode with:</p>
  
  <pre><code>myApplicationThatContainsJar.exe -debug "my application"
  
  &gt;     Now Starting JVM
  &gt;     Listening for transport dt_socket at address: 6065
  </code></pre>
  
  <p>I have psping tool installed which I use to ping (IPaddress:port). I am able to ping my ipaddress example: 44.66.33.66:6065 from my dev box and get a reply. But when I try to initiate remote debug in Eclipse I get: </p>
  
  <blockquote>
    <p>Failed to connect to remote VM. Connection refused. Connection
    refused: connect</p>
  </blockquote>
  
  <p>I have verified I've added permission for both inbound and outbound traffic for that port on both my DEV box and server. </p>
  
  <p>When I start my JAR on my server and before I try to connect with Eclipse I do a:</p>
  
  <pre><code>psping 44.66.33.66:6065 
  </code></pre>
  
  <p>And I get a response stating that it sent and recieved with 0% loss, meaning I am indeed getting a response.</p>
  
  <p>In the eclipse debug configuration, which in the 'Debug Configurations' window I have the host and port listed properly and the 'Connection Type: Standard(Socket Attach)'.</p>
  
  <p>As soon as I try to connect with Eclipse and get the connection refused error I try psping again from the command line, but now eclipse did something to the connection and I get in the command line:</p>
  
  <blockquote>
    <p>The remote computer refused the network connection.</p>
  </blockquote>
  
  <p>Any suggestions where else I should check? or where else I should troubleshoot? I'm trying to do remote-debugging for my JAR from the DEV box to my server.</p>