Clear all

Connection refused on remote debugging

1 Posts
1 Users
1 Reactions
Topic starter

I was successfully using eclipse to debug a remote java application.

In order for my debugger not to interfere with other users' processes I disconnected the debugger while I was not actively using it. I tried to connect again but now I'm getting connection refused. 

How can I fix this?

Topic Tags
1 Answer
Topic starter

It appears that JDWP did not realize that eclipse unilaterally disconnected.
If you check the connection status in the server you will see that it's still "ESTABLISHED":


From my experience it appears that within 20 minutes the OS realizes that the channel has been broken and port 8787 goes back to LISTEN status, which means it's ready ao accept new incoming connections.


If you don't feel like waiting for so long, and you're sure this action will not impact other users, you can do a "plt restart" which will be quicker.
There might be a way to force the OS to update the port status but I couldn't find it. If someone knows of such a way, please share.