0
votes

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"

1
Does the progrem terminate? Anything on stdout/stderr?dan1st
Does this answer your question? What are Java command line options to set to allow JVM to be remotely debugged? --- I.e. use -agentlib:jdwp=... instead of -Xdebug -Xrunjdwp:..., and specify address as *:5555Andreas
No the program is not terminated. Only it stops listening on debug port. No error in stdout or stderrratheesh t.v.
Also tried with -agentlib:jdwp=transport=dt_socket,server=y,suspend=n,address=5555 same behaviorratheesh t.v.
I don't have a solution, but I want to be sure I understand what you're saying. Before attempting the connection, you run netstat and it shows the process listening on the port, then you attempt the connection, which fails, and then when you run netstat again, it's not listening on the port anymore? Assuming that's true, does this service listen on any other ports? Does the status of those listeners change at all in the same as the debugger port?David M. Karr

1 Answers

-1
votes

It was working fine only the eclipse debugger view was not set