dev@glassfish.java.net

Re: v3 start up is silent even when there is port conflicts

From: Kedar Mhaswade <Kedar.Mhaswade_at_Sun.COM>
Date: Fri, 12 Sep 2008 15:45:17 -0700

Jerome Dochez wrote:
> what is strange is that we correctly get an exception if grizzly opens
> the port (2 appservers running) but we don't get an exception if some
> other process has opened the port...

No, my experience on Mac OS is different. If I have a simple EchoServer (opens a
server socket and listens indefinitely) on 4848,

- java -jar glassfish.jar fails with
   java.net.BindException: Address already in use:
   4848=com.sun.grizzly.http.SelectorThreadHandler_at_d6f8f6

- asadmin start-domain or startserv hangs. I should probably correct this
   behavior to coincide with that of "java -jar ...". This is because we are
   sending HTTP request to a port that does not speak HTTP to ascertain if
   the server has come up.


If I have another GlassFish domain running on 4848, asadmin start-domain tells
me:

"It appears that the domain [domain1] or some other process [port: 4848]
is already running, stop it first", which is expected.