dev@glassfish.java.net

Re: V3: asadmin stop-domain

From: Byron Nevins <Byron.Nevins_at_Sun.COM>
Date: Wed, 04 Jun 2008 12:02:56 -0700

The stop-domain command that runs on the server side is asynchronous --
it returns success in all cases and it returns instantly. Thus w/o the
pinging you wouldn't know when the server is really dead, and you would
have to add annoyingly over-long timeouts to scripts to be sure.

stop-domain "pings" the server. When the "ping" goes unanswered --
stop-domain exits.
If the "pings" go on forever, then you get a timeout.
The "ping" is very specific to GF. It calls the "version" command on
the host and port specified in domain.xml for the admin listener. If
you see a timeout like this you undoubtedly have a running server.

In your case it looks like you had 2 instances of the server running
(different processes), listening on the same ports.

Next time you see this try:
asadmin version

V B Kumar Jayanti wrote:

> V B Kumar Jayanti wrote:
>
>> I tried command asadmin stop-domain and saw the following strange
>> ouput :
>>
>>> bash-3.2$ ./asadmin stop-domain
>>> Waiting for the domain to stop
>>> .................................................
>>> ................................................................................
>>>
>>> ................................................................................
>>>
>>> ................................................................................
>>>
>>> ................................................................................
>>>
>>> ................................................................................
>>>
>>> ................................................................................
>>>
>>> ...............................................................
>>> Timed out ({1} seconds) waiting for the domain to stop.
>>
This is not saying 1 second -- it is saying argument #1 is not being
sent in (a bug)

>>> Command stop-domain failed.
>>> bash-3.2$
>>
>>
>>
>> It actually waited for several seconds. This behaviour seems to
>> occur if i first hit CTRL-C followed immediately by asadmin
>> stop-domain in the same terminal.
>>
>> And when i tried asadmin stop-domain when the server is actually not
>> running, i see
>>
>>> bash-3.2$ ./asadmin stop-domain
>>> Waiting for the domain to stop ................
>>> Command stop-domain executed successfully.
>>> bash-3.2$
>>
>>
>>
> Ignore the second command output since i am unable to reproduce this
> one. It actually gives me
>
>> bash-3.2$ ./bin/asadmin.bat stop-domain
>> Remote server does not listen for requests on [KUMAR:4,848].
>> Is the server up?
>> Command stop-domain failed.
>
>
>
> rgds.
>
>> With TP2 it used to give out a message like
>>
>>> bash-3.2$ ./asadmin.bat stop-domain
>>> Cannot connect to host, is server up ?
>>> Command stop-domain failed.
>>> bash-3.2$
>>
>>
>>
>> Which IMO was better.
>>
>> rgds.
>>
>>
>> ---------------------------------------------------------------------
>> 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
>

-- 
Byron Nevins Work 408-276-4089, Home 650-359-1290, Cell 650-784-4123 - Sun Microsystems, Inc.