9

I am trying to test my web application in GlassFish 4 from eclipse. When I am starting GlassFish 4 with a file (startserv.bat), it works fine, but when I am trying to run it from Eclipse, it starts loading, but then the startup process gets stuck at 69%, on a message Launching Delegate...

enter image description here

After several minutes in that condition, it gives me an error message:

enter image description here

After a few re-tries, I got this message:

enter image description here

Even though nothing is running on the port 8080 (GlassFish's port) and 4848 (GlassFIsh's admin port)

It worked fine for me before, but now for some reason, it just doesn't, I haven't done anything to it's settings or anything. How can I resolve this problem?

Here is my startup console log: http://pastebin.com/XL0Lh5zw (using pastebin to avoid making the post to big)

BalusC
  • 1,082,665
  • 372
  • 3,610
  • 3,555
Victor2748
  • 4,149
  • 13
  • 52
  • 89

12 Answers12

5

I had the same problem, with the same messages.

After a long search, I gave up and I removed the server.

remove the server

And I removed the Server Runtime Environment

remove the runtime

The Glassfish files were not removed only the eclipse configurations, and then I re-created the Server Runtime and the Server using the existent glassfish server and the problem was fixed :D.

raizdepi
  • 76
  • 1
  • 4
3

I got the same issue. I'm using Eclipse Luna.

I downgraded my GlassFish Tools to 7.2 and I got the server started back again. http://download.oracle.com/otn_software/oepe/12.1.3.1/luna/repository

java25
  • 296
  • 2
  • 5
2

I didn't see any errors in the log, just some warnings about Hibernate stuff, which shouldn't crash the launch. It could be that it is taking too long to initialize with all of the eclipse overhead, but most likely it could be a locking issue, which could cause the timeout, since eclipse would be left infinitely waiting for a resource it could never obtain. Are you sure the server is only being accessed by eclipse, and is not already running or owned by another process?

holtc
  • 1,780
  • 3
  • 16
  • 35
  • Yes I am sure. It worked for me 100% fine before, but now, all of sudden, it stopped working. The server is not running on it's own, I checked. I tried restarting the eclipse and even deleting the server from the servers list and adding it again. – Victor2748 Dec 29 '14 at 06:35
  • The progress is being stuck at a message "Launching delegate...", do you know what that could mean? – Victor2748 Dec 29 '14 at 06:36
  • My best guess would be that Glassfish is not configured correctly, since it is waiting for a response it never receives. If you are sure the server is not owned by any other process, then it has something to do with your configuration. – holtc Dec 29 '14 at 06:39
  • Okay, so check a few things. Is the version of the eclipse glassfish plugin the same as the glassfish server installation you are using? Did any of your workstation permissions change such that you no longer can access ports? Also, your Glassfish may not be accepting connections, or may be on a different domain than what the eclipse plugin is expecting. Either way, I would guess it's a configuration issue with Glassfish – holtc Dec 29 '14 at 06:47
  • But I didn't change anything in glassfish's config, and anything related to glassfish that could possibly affect it. Do you think deleting glassfish server (and all it's configs), and redownloading it will help? – Victor2748 Dec 29 '14 at 06:51
  • Are you on a personal machine or a machine where your permissions could be externally changed, like a computer at work? It could be a change of your firewall settings. I would check those before doing a reinstall, but the reinstall wouldn't hurt. Check to make sure the plugin version and glassfish versions are the same, since one may have been automatically updated while the other was not. – holtc Dec 29 '14 at 06:54
1

I was also getting this issue all the week. But in our team we finally fixed it. It seems that Glassfish needs JDK 8 (not JRE 8 default given entry in Eclipse Luna) so you have to firstly install JDK 8 from Oracle web site and after configure Eclipse to point on it in Windows -> Preference -> Java -> Installed JREs Click on "Add" choose "Standard VM" click on "Next" and use "Directory" button to point on your -freshly installed- JDK8 directory if you didn't change any thing during the installation , on windows it would be "C:\Program Files\Java\jdk1.8.0_20".

Just because Glassfish and Glassfish Tools for Luna need JDK8 to perfectly work.

Michal Kordas
  • 10,475
  • 7
  • 58
  • 103
1

I had the very same issue with GF 3.1.

When looking into the problem I noticed that in the Eclipse console Glassfish appeared to be still running. I deleted the application using the web console and then I quit Eclipse. I then checked the active Java process (i.e. ps -e | grep java) and noticed an zombie Glassfish process.

Sometimes it happens that Eclipse is not able to startup / shutdown Glassfish correctly, "loosing" a process doing so. Usually killing the zombie process fixes Glassfish and related integration with Eclipse.

Another thing to try in this case is to remove the applications from the Server and remove the server from Servers panel in Eclipse, then adding the server and applications again.

I'm using Eclipse Glassfish 3.1.1, Luna 4.4.1, Java 1.7.0_71, OS X Yosemite.

mxb
  • 3,300
  • 4
  • 20
  • 25
1

Changing debug port (properties->glassfish->debug port) to current+1 (eg. from 8008 to 8009) every time it happens makes it work for me. I'm using eclipse neon 4.6.0 + glassfish 4.1

dnk
  • 109
  • 1
  • 8
0

If any one is still stuck go to your glassfish folder domain > domain1 > config edit domain.xml change network listener port no. to any other port number. Restart eclipse and glassfish. assuming you have glassfish 4.1.1 it worked for me.

0

I fixed the problem by using Eclipse Neon (4.6) and GlassFish 4.1.1.

ROMANIA_engineer
  • 54,432
  • 29
  • 203
  • 199
0

Had the same problem, no idea why this happens. Anyway, I deleted Glassfish from Eclipse and had a new GF set up. Worked for me just fine!

Lazar Zoltan
  • 135
  • 3
  • 14
0

Using Eclipse Mars and Glassfish 3.2. I used Eclipse > Help > Check for Updates. Two updates were found and one was Glassfish tools. Allowed the update to do its thing and it seems to have resolved the problem.

Hodglem
  • 614
  • 9
  • 17
0
  • Go to below path:

    C:\glassfish4\glassfish\domains\domain1\config

  • Also the path where your server location configured into the eclipse and open domain.xml file.

  • Find out the 8080 port number and change different port number like 8081...
  • Save and close the file.

In eclipse:

  • Remove the added server and add fresh Glashfish server.
  • Start the server. This will solve the problem.
Liju Thomas
  • 1,054
  • 5
  • 18
  • 25
0

Same problem here, stuck at 68%. I find out that it was docker which occupied 8080:80.

If any one who is also using docker: I do "docker ps"to see which one is using 8080 then i do "docker stop [container id]"and "docker rm [container id]" then the glassfish sever in eclipse finally launched successfully.

Dharman
  • 30,962
  • 25
  • 85
  • 135
zoe233
  • 1