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?
+1
A:
do you have port 8000, or whatever port you have configured for remote connections open on your firewall?
yx
2009-11-10 18:05:47
Right now I'm testing on my machine. So it won't be a problem right?
iJeeves
2009-11-10 18:39:14
no, it shouldn't be a problem if its on the same machine...
yx
2009-11-10 18:44:11
+1
A:
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/
Kelly French
2009-11-10 18:06:28
Sometimes the port hasn't been released from the last time it was ran. On Windows do a 'netstat -a' and look for the port the remote app is using to listen for debug connections. If it is still open, you won't be able to open a remote debug session. Close the port/socket or if it comes down to it, change the port used. Hopefully the first socket eventually releases before you lock up the second.
Kelly French
2009-11-11 15:35:00
+2
A:
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
)
Brian Agnew
2009-11-10 18:18:38
When I tried netstat /a i got: TCP DEV-MACHINE2:8787 localhost:1261 ESTABLISHEDThis is the only entry for the port number 8787 which I an using.
iJeeves
2009-11-10 18:38:03
+1
A:
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
Murali VP
2009-11-10 18:19:02