2.6.2 cleanup-webserver
The cleanup-webserver subcommand cleans up the web server environment.
Synopsis
asadmin [asadmin_options] cleanup-webserver [--graceful={false|true}] [--nodedir node_dir] [--node node_name] webserver_name
Storage location
Application Server installation directory/javaee/glassfish/bin
Function
The cleanup-webserver subcommand stops a web server that was set up on the host running the subcommand. This subcommand removes (cleans up) the web server environment. However, the subcommand does not remove the web server information from the domain.
Use this command for web servers that are not managed by the domain administration server in situations such as where the web environment remains on the remote node because a domain was recreated when the domain administration server stopped.
This subcommand is supported only in the local mode.
Execution permission
General user
Precondition
The web server of the target node is not managed by the domain administration server.
Arguments
- --graceful={false|true}
-
Specifies whether to stop the web server in a planned termination. This value is ignored if the process is already stopped.
Type: Boolean
You can specify the following values:
-
true
Stops the web server in a planned termination.
-
false
Stops the web server normally.
Default value: true
-
- --nodedir node_dir
-
Specifies the node directory where the web server is created.
Type: String
You can specify the following values:
-
Path of the existing node directory
Default value: Application Server installation directory/nodes
-
- --node node_name
-
Specifies the node name where the web server must be configured.
Type: String
You can specify the following values:
-
Existing node name
Default value: N/A
This option can be omitted if only one node directory exists in the directory specified by the --nodedir option.
-
- webserver_name
-
Specifies the name of the web server to be deleted.
Type: String
You can specify the following values:
-
Name of the server where the web server exists.
Default value: (None. You must specify a value.)
-
Examples
The following example cleans up a web server that has the name Web1:
asadmin cleanup-webserver --nodedir /temp/nodes --node localhost-domain1 Web1
The following example cleans up a web server that has the name Web1, which belongs to the localhost-domain1 domain specified in the /temp/nodes node:
asadmin cleanup-webserver --nodedir /temp/nodes --node localhost-domain1 Web1
The following example cleans up a web server that has the name Web1 after a planned termination:
asadmin cleanup-webserver --graceful true --nodedir /temp/nodes --node localhost-domain1 Web1
Exit Status
Exit Status |
Explanation |
---|---|
0 |
Normal termination. |
1 |
Abnormal termination. |
Notes
-
Do not use this command in an environment where the stop-webserver subcommand can stop the web server. If you do use this command in such an environment, the domain administration server might detect a web server failure.
-
Do not use this command in cases where the web server can be removed from the domain administration server. If you used this command in such a situation and therefore web server information remains in the domain, remove the web server information by using the --force option of the delete-webserver subcommand. Also, if you execute start-webserver when web server information remains in the domain, web server information might be created on the node.