Sun GlassFish Enterprise Server v3 Administration Guide

ProcedureTo Restart a Domain

Use the restart-domain subcommand in remote mode to restart the Domain Administration Server (DAS) of the specified host. When restarting a domain, the DAS stops accepting new connections and then waits for all outstanding connections to complete. This shutdown process takes a few seconds. Until the domain has restarted, the Administration Console and most of the asadmin subcommands cannot be used.

This subcommand is particularly useful for environments where the server machine is secured and difficult to get to. With the right credentials, you can restart the server from a remote location as well as from the same machine.

If the server will not restart, use the stop-domain(1) subcommand followed by the start-domain(1) subcommand.

Before You Begin

For the restart-domain subcommand to work, the --watchdog option of the start-domain subcommand must have been set to true (the default) when the domain was started. If this option was set to false and you attempt to restart the domain, the domain is stopped and a warning message is logged. If the --watchdog option is set to false, you can only restart the domain by using the stop-domain and start-domain subcommands.

  1. Ensure that the server is running.

    Remote subcommands require a running server.

  2. Restart the domain by using the restart-domain(1) subcommand.

Example 3–8 Restarting a Domain (or Server)

This example restarts mydoimain4 in the default directory.

asadmin> restart-domain mydomain4
Waiting for the domain to restart ...........
Command restart-domain executed successfully.

Example 3–9 Restarting a Domain in a Browser

This example invokes the restart-domain subcommand in a browser.


See Also

You can also view the full syntax and options of the subcommand by typing asadmin help restart-domain at the command line.