I have a java application running on remote host started with below:
-Xdebug -Xrunjdwp:transport=dt_socket,server=y,suspend=n,address=5555
I can see when application is started it listens on tcp port 5555: tcp 0 0 0.0.0.0:5555 0.0.0.0:* LISTEN 451357/java
I have allowed this port in iptables. I can connects to this port using telnet.
But whenever I start an eclipse remote debugging it never connects, below is the error:
Failed to connect to remote VM. Connection refused. Connection refused: connect
I can see in netstat java process stops to listen on 5555 whenever eclipse tries to connect. Anyone faced similar issue?
java version "1.8.0_181"
-agentlib:jdwp=...
instead of-Xdebug -Xrunjdwp:...
, and specify address as*:5555
– Andreas