dev@glassfish.java.net

Re: asadmin question

From: Bill Shannon <bill.shannon_at_oracle.com>
Date: Sun, 05 Sep 2010 15:11:56 -0700

Bhavanishankar wrote on 9/5/10 11:36 AM:
> Suppose if the admin server is NOT running, then 'asadmin create-http-listener'
> throws Remote server does not listen for requests on [localhost:4848]. Is the
> server up? (I quickly checked in the v2 installation I have, there 'asadmin
> create-http-listener' prints the help message for that command though the server
> is down)
>
> Is this a regression in latest builds or it is been by design?

If by "help message" you mean the usage message (as opposed to the man page
you get when you do --help), then yes, it's by design.

In v3, the client asadmin command doesn't know anything most commands until
it contacts the server. The server tells it what the options are for the
command. If the server is down, it can't get any of this information.

Also, the usage message normally is used to indicate that you specified one
of the options incorrectly. That doesn't seem like the appropriate message
when the server is down. If you're literally doing "asadmin
create-http-listener" with no arguments, then if the server is up it will
prompt you for the missing arguments. If the server is down, it doesn't
even know that arguments are missing.