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?
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
After installing the last update of Glassfish tools for Kepler I got some meanfull message which actually help me solve the problem and now I can run Glassfish in debug mode.
Here is my workaround:
Go to your .\glassfish4\glassfish\domains\domain1\config
folder.
Open domain.xml
file in any desired editor.
Navigate to ./domain/configs/config[name=server-config]/java-config
node.
You should have an attribute debug-options
as below:
debug-options="-Xdebug -Xrunjdwp:transport=dt_socket,address=9009,server=y,suspend=n"
Remove " -Xrun" and it should look like:
debug-options="-Xdebugjdwp:transport=dt_socket,address=9009,server=y,suspend=n"
Save. Restart/start Eclipse Kepler and should be able to run Glassfish in debug mode again, if you had similar problem like mine.
Hope this helps.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With