I tried to do remote debugging on a remote glassfish server for some time, using eclipse. I want to do it on my local server which is in my own computer. I followed the same instructions that one follows for setting up remote debugging. In eclipse, I set debug configurations with info - host = localhost, port = 6767 and server in debug mode. 6767 is the port which I use to connect to the admin of my glassfish server.
This approach worked in the actual remote debugging. But it fails in local debugging. I get the error - Failed to connect to remote VM. Connection timed out. org.eclipse.jdi.TimeoutException
How do I fix this error ?
The log from the folder workspace dir > .metadata > .log is given below:
!ENTRY org.eclipse.jdt.launching
!MESSAGE Failed to connect to remote VM. Connection timed out.
!STACK 0
org.eclipse.jdi.TimeoutException
at org.eclipse.jdi.internal.connect.SocketTransportService.attach(SocketTransportService.java:162)
at org.eclipse.jdi.internal.connect.SocketTransportImpl.attach(SocketTransportImpl.java:45)
at org.eclipse.jdi.internal.connect.SocketAttachingConnectorImpl.attach(SocketAttachingConnectorImpl.java:134)
at org.eclipse.jdt.internal.launching.SocketAttachConnector.connect(SocketAttachConnector.java:141)
at org.eclipse.jdt.internal.launching.JavaRemoteApplicationLaunchConfigurationDelegate.launch(JavaRemoteApplicationLaunchConfigurationDelegate.java:84)
at org.eclipse.debug.internal.core.LaunchConfiguration.launch(LaunchConfiguration.java:858)
at org.eclipse.debug.internal.core.LaunchConfiguration.launch(LaunchConfiguration.java:707)
at org.eclipse.debug.internal.ui.DebugUIPlugin.buildAndLaunch(DebugUIPlugin.java:1018)
at org.eclipse.debug.internal.ui.DebugUIPlugin$8.run(DebugUIPlugin.java:1222)
at org.eclipse.core.internal.jobs.Worker.run(Worker.java:53)
I tried one solution which did not work -
open glassfish admin console in a browser > Configuration > server-config > JVM settings > Debug: Enable the checkbox