dev@glassfish.java.net

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

From: Oleksiy Stashok <Oleksiy.Stashok_at_Sun.COM>
Date: Wed, 17 Sep 2008 16:44:35 +0200

> Ok some more update on this - Kedar and I tried it on my solaris x86
> machine. Below is the scenario -
>
> I have tomcat running on port 8080 that seems to be bound to
> localhost as the host name.
> On the same machine and interface I also am starting up glassfish v3
> (last night's build) and the server comes up just fine.
>
> However when we try to access
>
> http://localhost:8080 we get the tomcat page and when we access the
> <machine_name>:8080 we get GlassFish responding.
Before running GF, can you try to access <machine_name>:8080 just with
running Tomcat. Do you see Tomcat page or nothing?

> Maybe the server's instance are bound with host name? Also this
> seems related to https://glassfish.dev.java.net/servlets/ReadMsg?listName=users&msgNo=24110
Unfortunately can not read the message on the link due to some server
problem.

In general Grizzly reports the BindException correctly. If you'll take
a look at the log, attached to the issue [1], you'll see, that GF is
not getting started.
"[#|2008-09-12T11:17:18.760-0700|SEVERE|GlassFish10.0|
javax.enterprise.system.core|_ThreadID=12;_ThreadName=Thread-3;|
Shutting down v3 due to startup exception : Address already in use:
8080=com.sun.grizzly.http.SelectorThreadHandler_at_1f44ec7|#]"

The behavior you see, Rajiv, is interesting :) We need to investigate
that, but it's separate issue, not #6083.
Can you pls.provide me the machine access, where I can investigate that?

Thanks.

WBR,
Alexey.

[1] https://glassfish.dev.java.net/nonav/issues/showattachment.cgi/1825/server.log

>
>
> Jeanfrancois?
>
> - Rajiv
>
> Shing Wai Chan wrote:
>> Jerome Dochez wrote:
>>> Jeanfrancois Arcand wrote:
>>>> Salu,
>>>>
>>>> Harsha Godugu wrote:
>>>>> On 09/11/08 18:14, Shing-Wai.Chan_at_Sun.COM wrote:
>>>>>> Hi,
>>>>>>
>>>>>> I have a discussion with Rajiv.
>>>>>> Here is what we see.
>>>>>> 1. port 8080 was occupied by another process in the machine
>>>>>> 2. start v3 by asadmin without any error message
>>>>>> asadmin start-domain domain1
>>>>>> Name of the domain started: [domain1] and
>>>>>> its location: [/export/gfv3/src/install/glassfish/domains/
>>>>>> domain1].
>>>>>> Admin port for the domain: [4848].
>>>>>> 3. deployment with error
>>>>>> asadmin deploy hellojsp.war
>>>>>> Remote server does not listen for requests on [localhost:
>>>>>> 4,848].
>>>>>> Is the server up?
>>>>>> Command deploy failed.
>>>>>>
>>>>>> I understand that we have (2) as the container have not started.
>>>>>> But should we check the port in (2)?
>>>>> Yes. We should. I also bumped into this issue. It took a while
>>>>> to figure what was happening.
>>>>> This is a p2 bug :-)
>>>>>
>>>>
>>>> Jerome can comments, but I think the current behavior is
>>>> expected ;-)
>>> first of all, it's probably a bad idea to run your bit-torrent on
>>> 4848 ;-)
>> I have something occupied 8080 rather than 4848.
>> They have just opened issue 6083 for this.
>> Shing Wai Chan
>>>
>>> I can indeed reproduce the issue (not that I have bit-torrent),
>>> Jean Francois, looks like you are not generating an exception when
>>> opening the port so I cannot trigger the shutdown.
>>>
>>> for instance if you do
>>>
>>>
>>> java -jar glassfish.jar (works fine)
>>> then another one....
>>> java -jar glassfish.jar (it fails to open the port, shutdown is
>>> initiated and performed).
>>>
>>> with the port occupied by something else than grizzly, it looks
>>> like Grizzly did not generate the
>>> java.net.BindException: Address already in use:
>>> 4848=com.sun.grizzly.http.SelectorThreadHandler_at_63a1ae
>>>
>>> any idea ?
>>>>
>>>> A+
>>>>
>>>> -- Jeanfrancois
>>>>
>>>>
>>>>> thanks...
>>>>>> (If 8080 is occupied by another http engine, then one may (by
>>>>>> mistake) think
>>>>>> that v3 is up. But in fact, another process is serving the
>>>>>> request!!! This is an
>>>>>> issue.)
>>>>>>
>>>>>> Regards,
>>>>>> Shing Wai Chan
>>>>>>
>>>>>> ---------------------------------------------------------------------
>>>>>> To unsubscribe, e-mail: dev-unsubscribe_at_glassfish.dev.java.net
>>>>>> For additional commands, e-mail: dev-help_at_glassfish.dev.java.net
>>>>>>
>>>>>
>>>>>
>>>>> ---------------------------------------------------------------------
>>>>> To unsubscribe, e-mail: dev-unsubscribe_at_glassfish.dev.java.net
>>>>> For additional commands, e-mail: dev-help_at_glassfish.dev.java.net
>>>>>
>>>>
>>>> ---------------------------------------------------------------------
>>>> To unsubscribe, e-mail: dev-unsubscribe_at_glassfish.dev.java.net
>>>> For additional commands, e-mail: dev-help_at_glassfish.dev.java.net
>>>>
>>>
>>>
>>> ---------------------------------------------------------------------
>>> To unsubscribe, e-mail: dev-unsubscribe_at_glassfish.dev.java.net
>>> For additional commands, e-mail: dev-help_at_glassfish.dev.java.net
>>>
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: dev-unsubscribe_at_glassfish.dev.java.net
>> For additional commands, e-mail: dev-help_at_glassfish.dev.java.net
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe_at_glassfish.dev.java.net
> For additional commands, e-mail: dev-help_at_glassfish.dev.java.net
>