Eclipse - Glassfish 4 Debugging startup timeout

Cloud picture Cloud · Jun 13, 2013 · Viewed 8.5k times · Source

Glassfish 4.0 final gives a timeout everytime I try to start it in Debug mode. The normal run on server (from Eclipse) does work without a timeout.
I've tried running Glassfish 4.0 from Eclipse Juno and Eclipse Kepler, both have the correct port configuration for debugging (9009), both are failing to start Glassfish in debug.

Is this a known problem? How do I fix this?

Answer

user2484034 picture user2484034 · Jun 14, 2013

Yes, this is a known issue with the Glassfish 4.0 adapter in Eclipse.

Here is a workaround:

  • Shut down Eclipse, open a command line in the Glassfish server home directory and stop the domain:

    asadmin stop-domain domain1

  • Start Eclipse, select 'Run \ Debug Configurations...' from the menu and bring up the 'Debug Configurations' dialog

  • Find the GlassFish 4.0 application server

  • Click on the 'Arguments' tab and change the VM argument to:

    -agentlib:jdwp=transport=dt_socket,server=y,suspend=n,address=9009

  • Click 'Debug' to start Glassfish in debug mode, or use 'Debug On Server' from the servers view