Alex Rivera | Logout

GlassFish v3 Domain Server cannot start. Port is occupied

Asked 2010-03-02T19:23:49.420
10

I imagine this is a pretty generic error. I cant seem to find any documentation on it.

I am simply attempting to run a java web project with jsp's and beans... using netbeans 6.8 on windows xp.

Thoughts? apologies for such a newb question.

-Kirb

Edit
Report

1 Answer

3

If you get errors from glassfish on startup complaining that ports are already in use, and you know they aren't, the problem is almost certainly that your hostname is set incorrectly. Glassfish seems to look up the hostname for the machine and then to bind to a port using that hostname - if your hostname resolves incorrectly then it won't be able to bind and will report that the port is in use.

at the command line try typing 'hostname' to see whether the hostname that's reported is correct. ping it and check that it resolves to the IP address of your machine.

Have a look at your /etc/hosts file (on linux) and check whether everything is ok in there.

Also check the /etc/sysconfig/network file and make sure your hostname is set correctly in there.

I've had the exact same problem as you twice - and both times it's turned out to be a hostname issue. Glassfish really should have better error reporting about this.

answered 2011-06-13T12:37:34.723

Your Answer