0
votes

I am trying to debug server side code (running on Tomcat) using eclipse's remote debug option. This issues is showing up intermittently and rest of the times it works just fine. I have made sure 1) Server side has got the latest Jars - I copied the .war file and redeployed. 2) Tomcat is running on debug mode and firewall settings have been modified to allow connections on the debug port. 3) Verified that before the attempt to connect, on the server its listening on the debug port and afterwards it shows that connection has been established.

but Eclipse is throwing an error popup saying "Its unable to connect to the remote VM" and sometimes it times out waiting for a packet #

Should I be checking for some more things? Are there any more log files by eclipse that throws light on what went wrong? Please help

1
Dude, it could be a lot of things, seems like you have your debug settings right in tomcat as you can connect through a remote app in eclipse. But given the fact tomcat is remote it could be network, proxies, firewalls you name it. The ideal setup is to be running tomcat locally and then connecting to whatever databases you need remotely. - Duncan Krebs
Thanks.. your clue made me think about network and connectivity. I am on a slow network and default timeout is 3s which is quite low. I increased it to a bit bigger number and its able to connect now! - Ram
Glad to hear you got it working! - Duncan Krebs

1 Answers

0
votes

This is can be a solution sometimes if your debugger fails to connect to debugger with an error something like "timed out while waiting for a packet #packetnumber" then it could be because of the low timeout setting and slow network. One can increase the timeout value using debug setting in the eclipse preferences.