This is on linux, with jdk1.8 and latest Eclipse/Oxygen. I just get connection refused when debugging from eclipse. I am using socket-attach / localhost / 6666 as my remote config.
I used the example from here: http://javapapers.com/core-java/java-remote-debug-with-eclipse/
Here's my command line:
java -Xdebug -Xrunjdwp:transport=dt_socket,server=y,suspend=n,address=6666 com.javapapers.java.DebugRemote
I can attach and debug from both jdb and intellij, but not eclipse (using latest oxygen release).
eg: jdb -attach 6666 works fine (I can execute threads command)
Anyone know what might be the issue? Is there an iptables command I can run to debug this?
One thing I noticed is that after getting connection refused in eclipse, I can no longer attach from Intellij. I have to restart the process. That being said, in intellij or jdb I can attach/re-attach as much as I want.
There are no firewall entries for eclipse that I can see causing this.
I'm trying to connect to localhost. I've tried localhost, 127.0.0.1, the host IP address. I have tried everything.
Edit:
Update:
sudo /usr/sbin/tcpdump -A -n "src port 6666 or dst port 6666"
reports traffic for jdb but not eclipse. But after trying to connect via eclipse, I can no longer connect via jdb. ARP isn't reporting anything weird either.