Dheeraj Joshi Dheeraj Joshi - 25 days ago 6x
Java Question

Remote Debugging in eclipse

I have an application running in server A. The dev environment is in server B.
I am trying to do remote debugging of app running in server A.

In server A i added following command to service start script

-Xdebug -Xnoagent -Xrunjdwp:transport=dt_socket,address=4554,server=y,suspend=n

And service is running in server A.

When i try to launch remote debugging configuration it gives

Failed to connect to remote VM. Connection refused. Connection refused

port 4554 is free in server A.

What other configuration need to be done for this?

Dheeraj Joshi


Try this.

  1. Set suspend=y, just to make sure you got the JVM line right. This should stop the VM on startup until you connect.
  2. If you're on unix, bring up the terminal and try telnet [host] [port] - this will quickly let you know if there's anything listening to that port on that host.
  3. Make sure the connection properties in eclipse are set correctly. Note that the port defaults to 8000.
  4. Use the IP address instead of the host name, to rule out DNS/hostfile problems.

Run properties in eclipse

Another way of starting the JVM that I use successfully is: