4

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?

Cloud
  • 458
  • 1
  • 13
  • 34

3 Answers3

10

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

Adriaan Koster
  • 15,870
  • 5
  • 45
  • 60
user2484034
  • 116
  • 1
  • 2
  • Great, that worked. (for other user, note the dash should be included before the VM argument) – Cloud Jun 14 '13 at 07:58
  • 1
    I have the same issue on Eclipse Juno & Glassfish 4 in normal start (run, not debug). Any ideas ? – koders Mar 08 '15 at 13:50
2

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.

Mohammad Faisal
  • 5,783
  • 15
  • 70
  • 117
Velyo
  • 262
  • 1
  • 8
0

This issue has been fixed. The bug was reported here: http://java.net/jira/browse/GLASSFISHPLUGINS-370. You can update the plugin from update sites http://download.java.net/glassfish/eclipse/juno (or kepler). I think you have to remove all old run and debug configurations and maybe to re-register the GF runtime and server again.

piotrik
  • 41
  • 1