users@glassfish.java.net

Re: how to execute list-components using non-default admin-port

From: Jonathan Benoit <jonathan.benoit_at_oracle.com>
Date: Thu, 06 Jan 2011 15:41:53 -0500

Yes thanks, passing --port 46612 worked. I was looking for that option
in wrong "--help list-components" area. See my earlier email comments.

On 1/6/2011 11:04 AM, Jason Lee wrote:
> How about asadmin --port 46612 list-components domain ?
>
> On 1/6/11 8:51 AM, Jonathan Benoit wrote:
>> hi all,
>> how do you list-components for domain that listens on non-default
>> admin port? if i change domains/domain1/domain.xml
>> admin-listener port="46612" i get errors below. if i change admin-port
>> back to 4848 it doesn't error.
>>
>> // start domain1 on non-default port 46612
>> $ ./asadmin start-domain domain1
>> Waiting for domain1 to start ................
>> Successfully started the domain : domain1
>> domain Location: /space/glassfish3/glassfish/domains/domain1
>> Log File: /space/glassfish3/glassfish/domains/domain1/logs/server.log
>> Admin Port: 46612
>> Command start-domain executed successfully.
>>
>> $ ./asadmin list-components
>> Remote server does not listen for requests on [localhost:4848]. Is the
>> server up?
>> No such local command, list-components. To run remote commands, start
>> the application server (e.g. 'asadmin start-domain').
>> Command list-components failed.
>>
>> $ ./asadmin list-components domain
>> Remote server does not listen for requests on [localhost:4848]. Is the
>> server up?
>> No such local command, list-components. To run remote commands, start
>> the application server (e.g. 'asadmin start-domain').
>> Command list-components failed.
>>
>> $ ./asadmin list-components domain1
>> Remote server does not listen for requests on [localhost:4848]. Is the
>> server up?
>> No such local command, list-components. To run remote commands, start
>> the application server (e.g. 'asadmin start-domain').
>> Command list-components failed.
>> $
>>
>>
>> //change admin-port back to 4848, it doesn't error:
>> $ ./asadmin start-domain domain1
>> Waiting for domain1 to start ....
>> Successfully started the domain : domain1
>> domain Location: /space/glassfish3/glassfish/domains/domain1
>> Log File: /space/glassfish3/glassfish/domains/domain1/logs/server.log
>> Admin Port: 4848
>> Command start-domain executed successfully.
>>
>> $ ./asadmin list-components
>> Authentication failed with password from login store:
>> /space/hudson/.asadminpass
>> Enter admin password for user "admin">
>> [snip]
>>
>>
>> Help doesn't show it taking a --port option, should it?
>>
>> $ ./asadmin --help list-components
>> Can't find remote man page, looking locally...
>>
>> asadmin Utility Subcommands list-components(1)
>>
>> NAME
>> list-components - lists deployed components
>>
>> SYNOPSIS
>> list-components [--help]
>> [--long={false|true}] [--resources] [--subcomponents]
>> [--type type] [target]
>>
>> DESCRIPTION
>> Note -
>>
>> The list-components subcommand is deprecated. Use the
>> list-applications subcommand instead.
>>
>> The list-components subcommand lists all deployed Java EE
>> components.
>>
>> If the --type option is not specified, all components are
>> listed. If the type option is specified, you must specify a
>> type. The possible types are listed in the Options section
>> in this help page.
>>
>> If multiple versions of a module or application are
>> deployed, this subcommand lists all versions. To list which
>> version is enabled, set the --long option to true. For more
>> information about module and application versions, see the
>> Module and Application Versions in Oracle GlassFish Server
>> 3.1 Application Deployment Guide.
>>
>> This subcommand is supported in remote mode only.
>>
>> OPTIONS
>> --help
>> -?
>>
>> Displays the help text for the subcommand.
>>
>> --long
>> If true, displays whether each module or application
>> listed is enabled. The default is false.
>>
>> --resources
>>
>> Lists the application-scoped resources for each com-
>> ponent. If the --subcomponents option is also used,
>> lists the application-scoped resources for each
>>
>> Java EE 6 Last change: 29 Nov 2010 1
>>
>> asadmin Utility Subcommands list-components(1)
>>
>> component within an application.
>>
>> --subcomponents
>>
>> Lists the subcomponents of each component. The subcom-
>> ponents listed depend on the component type. For exam-
>> ple, for a Java EE application (EAR file), modules are
>> listed. For a web application, servlets and JSP pages
>> are listed. For an EJB module, EJB subcomponents are
>> listed.
>>
>> --type
>> Specifies the type of the components that are to be
>> listed. The options are as follows:
>>
>> o application
>>
>> o appclient
>>
>> o connector
>>
>> o ejb
>>
>> o web
>>
>> o webservice
>> If no type is specified, all components are listed.
>>
>> OPERANDS
>> target
>>
>> This is the name of the target upon which the subcommand
>> operates. The valid values are:
>>
>> server
>> Lists the components for the default server instance
>> server and is the default value.
>>
>> domain
>>
>> Lists the components for the domain.
>>
>> cluster_name
>> Lists the components for the cluster.
>>
>> Java EE 6 Last change: 29 Nov 2010 2
>>
>> asadmin Utility Subcommands list-components(1)
>>
>> instance_name
>>
>> Lists the components for a particular stand-alone
>> server instance.
>>
>> EXAMPLES
>> Example 1 Listing Components
>>
>> This example lists the connector components. (cciblackbox-
>> tx.rar was deployed.)
>>
>> asadmin> list-components --type connector
>> cciblackbox-tx <connector>
>> Command list-components executed successfully
>>
>> EXIT STATUS
>> 0 subcommand executed successfully
>>
>> 1 error in executing the subcommand
>>
>> SEE ALSO
>> list-applications(1), show-component-status(1)
>>
>> asadmin(1M)
>>
>> Oracle GlassFish Server 3.1 Application Deployment Guide
>>
>> Java EE 6 Last change: 29 Nov 2010 3
>>
>> Command list-components executed successfully.
>
>