title: OEPE glassfish debug connection refused
body: <p>I am having the same problem as indicated by this thread. 
  <a href="https://stackoverflow.com/questions/4305881/how-do-i-debug-glassfish-3-using-eclipse-helios">How do I debug GlassFish 3 using Eclipse Helios?</a></p>
  
  <p>I did use the "debug" instead "run" on the glassfish 3.1.1 server. Eclipse is Indigo. OEPE 11.1.1.8. I have a customized domain in which I changed all the port numbers, for server debug port, I used 10009. I am able to start the server, but the debugger is not working and shows "Failed to connect to remote VM. Connection refused." Eclipses log shows:</p>
  
  <pre><code>!ENTRY org.eclipse.jdt.launching 4 113 2011-12-01 10:29:42.602
  !MESSAGE Failed to connect to remote VM. Connection refused.
  !STACK 0
  java.net.ConnectException: Connection refused: connect
  at java.net.TwoStacksPlainSocketImpl.socketConnect(Native Method)
  at java.net.AbstractPlainSocketImpl.doConnect(AbstractPlainSocketImpl.java:337)
  at java.net.AbstractPlainSocketImpl.connectToAddress(AbstractPlainSocketImpl.java:198)
  at java.net.AbstractPlainSocketImpl.connect(AbstractPlainSocketImpl.java:180)
  at java.net.PlainSocketImpl.connect(PlainSocketImpl.java:157)
  at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:391)
  at java.net.Socket.connect(Socket.java:579)
  at java.net.Socket.connect(Socket.java:528)
  at java.net.Socket.&lt;init&gt;(Socket.java:425)
  at java.net.Socket.&lt;init&gt;(Socket.java:208)
  at org.eclipse.jdi.internal.connect.SocketTransportService$2.run(SocketTransportService.java:136)
  at java.lang.Thread.run(Thread.java:722)
  </code></pre>
  
  <p>I am using jdk1.7 (OEPE declares it supports up to 1.6, but I don't a simple socket connection for debugger won't work due to this). </p>