Stopping an application server
Stopping an application server ends a server process based on the process definition settings in the current application server configuration.
Make sure we understand the impact of stopping a particular server has on your ability to handle work requests, especially if we need to maintain a highly available environment.
There are times we need to stop an application server. For example, we might have to apply service to an application running on that server, or we might want to change one of the application server's configuration setting. Using one of the following options when we need to stop an application server.
During the Application Server shutdown procecess, com.ibm.ejs.util.am._Alarm might launch new threads that cause unnecessary exceptions from varied components. For example, we might receive the following Connection Pool Manager exception:
J2CA0020E: Connection Pool Manager could not allocate a Managed Connection: java.lang.IllegalStateException: Internal Error: cannot find the PoolManager Reference.These exceptions might occur because an application server must shut down all of the components under that application server's control before the stop process can complete. We can ignore these exceptions. After the application server stops, all running threads from the application server automatically end..
Tasks
- (Windows) Use the Start menu to stop the application server. In the administrative console, click Start > Programs > IBM WebSphere > Network Deployment v. n > Stop the server. When the server stops successfully, the stopServer.log file contains the following in the last two lines:
Server stop request issued. Waiting for stop status. Server server1 stop completed.The server name varies depending on our settings.
- (Windows) If a Windows service has been created for the application server, optionally use the Windows Services utility to start, stop, and monitor the basic status of the server.
- To launch the Services utility, click Start > Settings Control Panel.
The Control Panel folder displays.
- Double-click the Administrative Tools icon.
The Administrative tools folder displays.
- Double-click the Services icon.
Read about the Services utility in the Windows online help.
See about the WASService command for information about adding and removing Windows services.
- We can issue a stopServer command to stop a single server or the stopManager command to stop the deployment manager.
Read the stopServer and stopManager topics for information about the commands, including such information as running the commands and defining the log file names.
Read the topic on using command-line tools for information such as determining from what directory to run the stopServer and stopManager commands.
We can check that the server or deployment manager has successfully stopped by checking the appropriate log file.
(ZOS) We should not use the CANCEL appserver_proc_name command to stop a server. Every time a server is started, a new temp directory is created off of the servant process token, such as profile_root/default/temp/node/server. When the server is cleanly stopped, these temp directories are normally removed. However, if the server is frequently not stopped cleanly, which happens if we cancel rather than stop the server, these temp directories are not removed and the HFS used for these temp directories eventually becomes full. We can also prevent this storage problem from occurring if you precompile your JavaServer pages when we install an application or if we use the JspBatchCompiler function to precompile them before they are invoked.
- Use the administrative console to stop an application server:
- In the administrative console, click...
Servers > Server Types > WebSphere application servers.
- Select the application server that we want stopped and click Stop.
- Confirm to stop the application server.
- View the Status value and any messages or logs to see whether the application server stops.
- (iSeries) Use the stopserver Qshell script to stop an application server:
- (iSeries) Use the End Job (ENDJOB) CL command to stop an application server: To use the ENDJOB CL command, enter:
ENDJOB JOB(jobNumber/QEJBSVR/jobName) OPTION(*CNTRLD) DELAY(delayTime)where jobNumber is the job number, jobName is the name of the application server job, and delayTime is the amount of time to wait for the job to end in seconds. We can initially set delayTime be 600 seconds and then adjust it, if necessary, to a value that is more appropriate for the environment.
The specified server stops as soon as requests assigned to that server finish processing. To verify that the server is in stop state, in the administrative console, click...
Servers > Server Types > WebSphere application servers.
What to do next
If we experience any problems shutting down a server, see Troubleshoot administration.
Starting an application server Manage application servers Administer application servers Create application servers (Windows) (Linux) WASService command
Use command-line tools stopServer command startServer command