I am getting the following message when I try to remote debug a java application through eclipse. "Failed to connect to remote VM. Connection refused." What could be the error?
6 Answers
You need to invoke the process to be debugged with the appropriate options e.g.
-Xdebug -Xrunjdwp:transport=dt_socket,server=y,suspend=n,address=1044
(substitute with the appropriate port if necessary) and it sounds like the VM isn't listening on the configured port. You can use netstat /a to confirm if the VM is listening on that port (or telnet)
1 Comment
do you have port 8000, or whatever port you have configured for remote connections open on your firewall?
1 Comment
The remote application needs to be started first. Did you add the arguments to the target remote app so it will accept a debugging connection/
1 Comment
Make sure your JVM was started with these options
-Xdebug -Xrunjdwp:transport=dt_socket,address=8000,server=y,suspend=n
and that port 8000 is free