Thomas Cianfarani
Thomas Cianfarani

Reputation: 23

Glassfish - Unable to update http port. Server shut down


I have a problem with Glassfish 4 that occurs when I try to start it.
I have searched for this error only but I haven't found a similar case.

Here's the error log:

Unable to update http port. Server shut down.
org.eclipse.core.runtime.CoreException:
Could not save to L/Servers/GlassFish 4 at localhost [myDomain].server.

But even though I've had this error, in Eclipse, the state of the Glassfish server is said to [Started, Republish] and I can access the Glassfish admin console.

Have any idea about what is going on there ?

Thanks for your consideration.

Upvotes: 2

Views: 2734

Answers (2)

LMC
LMC

Reputation: 12877

It's an old question but the issue still happens on Eclipse 2019-09 so here's what I found and a workaround for it.

It's caused by hitting the Switch Location button on server properties

enter image description here

That will remove this element on <workspace>/.metadata/.plugins/org.eclipse.wst.server.core/servers.xml

<server auto-publish-setting="1" 
  glassfish.adminserverportnumber="4948" 
  glassfish.debugport="4909"
  glassfish.serverportnumber="4980" 
  glassfish.domainpath="/home/luis.munoz/projects/bin/glassfish3/glassfish/domains/domain-test/domain-test-1" 
  hostname="localhost"
  id="GlassFish 3.1 [domain-test-1]" 
  name="GlassFish 3.1 [domain-test-1]" 
  runtime-id="GlassFish 3.1" 
  server-type="glassfish.server" 
  server-type-id="glassfish.server"
  start-timeout="240" stop-timeout="240" timestamp="0" />

runtime-id must match the one in .plugins/org.eclipse.core.runtime/.settings/org.eclipse.wst.server.core.prefs

WORKAROUND:

  • Close Eclipse since servers.xml is cached.
  • Add the element back on servers.xml to fix the error. Change details as needed.
  • Start Eclipse

Server properties will show Location: [workspace metadata] again and the error message will not appear when starting Glassfish.

Upvotes: 2

user8156143
user8156143

Reputation:

are you using 8080 port ?

ensure that no other processes are listening, if yes - kill em.

netstat -a -n -o | find "8080"

Upvotes: 0

Related Questions