The following topics are addressed here:
When you start a domain or server, the domain administration server (DAS) is started. After startup, the DAS runs constantly, listening for and accepting requests.
If the domain directory is not specified, the domain in the default as-install/domains directory is started. If there are two or more domains, the domain_name operand must be specified. Each domain must be started separately.
For Microsoft Windows, you can use an alternate method to start a domain. From the Windows Start menu, select the command for your distribution of GlassFish Server:
If you are using the Full Platform, select Programs -> Oracle GlassFish Server -> Start Admin Server.
If you are using the Web Profile, select Programs -> Oracle GlassFish Server Web Profile -> Start Admin Server.
This subcommand is supported in local mode only.
Start a domain by using the start-domain(1) subcommand.
This example starts domain2 in the default domain directory.
asadmin> start-domain domain2 |
If there is only one domain, you can omit the domain name. If you do not include the password, you might be prompted to supply it.
Name of the domain started: [domain1] and its location: [C:\prelude\v3_prelude_release\distributions\web\target\glassfish domains\domain1]. Admin port for the domain: [4848]. |
You can also view the full syntax and options of the subcommand by typing asadmin help start-domain at the command line.
Stopping a domain or server shuts down its domain administration server (DAS). When stopping a domain, the DAS stops accepting new connections and then waits for all outstanding connections to complete. This shutdown process takes a few seconds. While the domain is stopped, the Administration Console and most of the asadmin subcommands cannot be used. This subcommand is particularly useful in stopping a runaway server. For more controlled situations, you can use the restart-domain(1) subcommand.
For Microsoft Windows, you can use an alternate method to stop a domain. From the Start menu, select the command for your distribution of GlassFish Server:
If you are using the Full Platform, select Programs -> Oracle GlassFish Server -> Stop Admin Server.
If you are using the Web Profile, select Programs -> Oracle GlassFish Server Web Profile -> Stop Admin Server.
If necessary, notify users that you are going to stop the domain.
Stop the domain by using the stop-domain(1) subcommand.
This example stops domain1 in the default directory, where domain1 is the only domain present in the directory.
asadmin> stop-domain Waiting for the domain to stop ........... Command stop-domain executed successfully. |
You can also view the full syntax and options of the subcommand by typing asadmin help stop-domain at the command line.
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.
Ensure that the server is running.
Remote subcommands require a running server.
Restart the domain by using the restart-domain(1) subcommand.
This example restarts mydoimain4 in the default directory.
asadmin> restart-domain mydomain4 Waiting for the domain to restart ........... Command restart-domain executed successfully. |
This example invokes the restart-domain subcommand in a browser.
http://yourhost:4848/__asadmin/restart-domain |
You can also view the full syntax and options of the subcommand by typing asadmin help restart-domain at the command line.