Payara Server Management Asadmin Commands

This is a non-exhaustive list of asadmin commands which are exclusive to Payara Server for managing domains.

start-domain

Usage

asadmin> start-domain <options> <domain>

Aim

This command start the specified domain

Options Type Description Default Mandatory

verbose

boolean

starts the domain in verbose mode

false

No

upgrade

boolean

false

No

watchdog

boolean

false

No

dry-run

boolean

false

No

drop-interrupted-commands

boolean

false

No

prebootcommandfile

string

path to file containing commands to run before booting the server. Only a limited amount of commands will work at this point. Since Payara Server 4.1.2.172

No

postbootcommandfile

String

path to file containg commands to run after the server is booted. Since Payara Server 4.1.2.172

No

start-domains

Since Payara Server 4.1.2.173

Usage

asadmin> start-domains <list of domains>

Aim

This command can be used to start the specified list of domains in the operand. This list must be specified as a comma separated string of values.

The domains will be started assuming default values for all options you would specify when running the start-domain command against one domain (default domain directory, debug mode off, verbose mode off, etc.)

Command Options

No command options available.

Example

To start the domain1 and production domains, run the following command:

asadmin> start-domains domain1, production

stop-domains

Since Payara Server 4.1.2.173

Usage

asadmin> stop-domains <list of domains>

Aim

This command can be used to stop the specified list of domains in the operand. This list must be specified as a comma separated string of values.

The domains will be stopped assuming default values for all options you would specify when running the stop-domain command against one domain (forced stopping and process killing)

Command Options

No command options available.

Example

To stop the domain1 and production domains, run the following command:

asadmin> stop-domains domain1, production

restart-domains

Since Payara Server 4.1.2.173

Usage

asadmin> restart-domains <list of domains>

Aim

This command can be used to restart the specified list of domains in the operand. This list must be specified as a comma separated string of values.

Command Options

No command options available.

Example

To restart the domain1 and production , run the following command:

asadmin> restart-domains domain1, production

stop-all-domains

Usage

asadmin> stop-all-domains

Aim

This command can be used to stop all running domains on the server installation.

Command Options

Option Type Description Default Mandatory

--force

Boolean

Specifies whether each domain is forcibly stopped immediately.

true

No

--kill

Boolean

Specifies whether the domain is killed by using functionality of the operating system to terminate the domain process

false

No

Example

To forcibly stop all running domains, run the following command:

asadmin> stop-all-domains --force=false

start-instance

Usage

asadmin> start-instance instancename

Aim

This command can be used to start a specified instance of Payara

Command Options

These are not the same as the options for the start-local-instance command.
Option Type Description Default Mandatory

--sync

none, normal or full

Specifies whether the instance is to be synced with the DAS. In normal mode only config files and top-level application file are synched. In full all files are synced.

normal

No

--debug

Boolean

Specifies whether the instance is started in debug mode

false

No

--terse

Boolean

Specifies whether information on the result is output

false

No

--timeout

Integer

Specifies how long to take for the instance to start in seconds. If starting the instance takes longer than this amount then this command will fail. Available since 4.1.2.181

120

No

Using full sync will cause the configuration to be deleted if the DAS cannot be reached.

Example

To start an instance named instance1 and sync it with the DAS with a timeout of 180 seconds:

asadmin> start-instance --timeout 180 --sync true instance1