Starting an application server
When we start an application server, a new server process starts. This new server process is based on the process definition settings of the current server configuration.
Before we start an application server, verify that all of the application required resources are available. We must also start all prerequisite subsystems.
If we want server components to dynamically start as needed by the installed applications, verify that the Start components as needed option is selected in the configuration settings for the application server before we start the application server. Selecting this option can improve startup time, and reduce the memory footprint of the application server. Starting components as needed is most effective if all of the applications that are deployed on the server are of the same type. For example, using this option works better if all of the applications are web applications that use servlets, and JSP. This option works less effectively if the applications use servlets, JSPs, and EJB.
- To ensure compatibility with other WebSphere products, the default setting for the Start components as needed option is cleared. Before selecting this option, verify any other WebSphere products, that we are running with this product, support this function.
- When we start an application server from the console, the application server inherits the node agent's environment, including the ulimit settings. Setting the ulimit to the needed value might need to be done at the node agent level such that the application server inherits the correct values from the node agent.
- When we start an application server from a command line, specify the ulimit settings in the OS shell before you issue the startServer command because in this scenario, the application server inherits the ulimit settings of the OS shell.
gotcha
The node agent for the node on which an application server resides must be running before we can start the application server.
This procedure for starting a server also typically applies to restarting a server. The one exception might be if a server fails and you want the recovery functions to complete their processing before starting new work on that server. In this situation, we must restart the server in recovery mode.
After creating an application server definition, we can start, stop, or manage the new server using the administrative console, or we can use commands to complete these tasks for the new server.
After we start an application server, other processes might not immediately discover the running application server. Application servers are discovered by the node agent. However, node agents are discovered by the deployment manager. Even though node agents typically discover local application servers quickly, it might take a deployment manager up to 60 seconds to discover a node agent.
If we are using clusters, the Initial State property of the application server subcomponent is not intended to be used to control the state of individual servers in the cluster at the time the cluster is started. This property is intended only as a way to control the state of the subcomponent of a server. You should use the Server options on the administrative console, or the startServer and stopServer command-line commands to start and stop the individual servers of a cluster.
When a child process starts, Java appends the runtime path to the LIBPATH environment variable to ensure that it is using the correct library paths. Because this implementation does not check to see if the runtime path already exists in the LIBPATH environment variable, existing entries might get duplicated. However, when the parent process is stopped, then started, all of the additional runtime paths that were added to the LIBPATH environment variable when child processes started are removed from the LIBPATH environment variable.gotcha
There are several options available for starting an application server.
Tasks
- We can use the administrative console:
- Click Servers > Server Types > WebSphere application servers to determine the node agent on which the application server that we are starting resides.
- Click System administration > Node agents, and verify that the node agent is running.
If the node agent is not running, issue the startNode command. After a node agent completely stops running and remains stopped, we cannot remotely start the node agent from the Node Agents page. We must issue the startNode command to start the node agent on the node where it runs.
- Click Servers > Server Types > WebSphere application servers again and select the application server that you want to start.
- Click Start. We can view the status and any messages or logs to make sure the application server starts.
- (Windows) We can use the Start menu on a Microsoft Windows operating system. Start > Programs > IBM WebSphere > Network Deployment > n > Profiles > profileStart the server. We can check that the server has successfully started by checking the startServer.log file. If the server has successfully started, the last two lines of the startServer.log file reads:
Server launched. Waiting for initialization status. Server server1 open for e-business; process id is 1932.The startServer.log file is located in the profile_root\logs\server1 directory if you have installed the server with the default settings. The server name and process ID vary 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.
- (iSeries) We can use the startServer Qshell command.
- (iSeries) We can use the Submit Job (SBMJOB) CL command. We can run the following CL command from an IBM i command line.
SBMJOB CMD(CALL PGM( product_library/QWASSTRSVR) PARM('-profilePath' 'profile_root' '-server' 'server')) JOB(server) JOBD(QWAS85/QWASJOBD) JOBQ(QWAS85/QWASJOBQ) USER(QEJBSVR) LANGID(*USRPRF) CNTRYID(*USRPRF) CCSID(*USRPRF) OUTQ(QWAS85/QWASOUTQ) ALWMLTTHD(*YES)server is the name of the server that we are starting.
- We can issue a start command from the MVS™ console. Issue the following MVS console command, all in uppercase and on a single line:
- To start a server, issue the following command all in uppercase and on a single line:
S procname,JOBNAME=server_shortname,ENV=cell_shortname.node_shortname.server_shortnamewhere:
- procname
- Is the JCL procedure name in the proclib used to start the server.
- servername
- Is the short name of the server which is also used as the process job name.
- cellname.nodename.servername
- This element of the ENV parameter is a concatenation of the cell short name, the node short name, and the server short name.
For example:
S BBO7ACR,JOBNAME=BBOS001,ENV=BBOBASE.BBONODE.BBOS001For transitioning users: If we are migrating from a previous version of the product and want to be able to restart the server in recovery mode, make sure that the ENV parameter for this procedure includes either the REC=N or the REC=Y element. If the ENV parameter includes the REC=N element, the setting is automatically changed to REC=Y if you specify -recovery when restarting the server. The REC=N element is automatically included on the ENV parameter if you did not migrate from a previous version of the product. The following example illustrates what your updated PROC statement might look like:
//BBO7ACR PROC ENV=,PARMS=' ',REC=N,Z=BBO7ACRZtrnsThe following messages indicate that the controller is running:
$HASP100 BBO7ACR ON STCINRDR $HASP373 BBO7ACR STARTED BBOO0001I WEBSPHERE FOR Z/OS CONTROL PROCESS BBODMNB/SY1/BBOC001/BBOS001 IS STARTING. IRR812I PROFILE BBO*.* (G) IN THE STARTED CLASS WAS USED TO START BBOS001S WITH JOBNAME BBOS001S. $HASP100 BBOS001S ON STCINRDR $HASP373 BBOS001S STARTED +BBOO0004I WEBSPHERE FOR Z/OS SERVANT PROCESS BBODMNB/SY1/BBOC001/BBOS001 IS STARTING. +BBOO0020I INITIALIZATION COMPLETE FOR WEBSPHERE FOR Z/OS SERVANT PROCESS BBOS001. BBOO0019I INITIALIZATION COMPLETE FOR WEBSPHERE FOR Z/OS CONTROL PROCESS BBOS001.- (Windows) We can issue a startServer command.
See on the startServer command for information about the command, including such information as running the command and defining the file name for the start server log. See on using command-line tools for information such as determining from what directory to run the startServer command.
We can check that the server has successfully started by checking the start server log. If the server has started successfully, the last two lines of the start server log look like the following example:
Server launched. Waiting for initialization status. Server server1 open for e-business; process id is 1932.
The specified server starts. To verify that the server is in start state, in the administrative console, click...
Servers > Server Types > WebSphere application servers.
What to do next
After the server starts, deploy the applications that you want to run on this server.
If start an application server with standard Java debugging enabled:
- In the administrative console, click...
Servers > Server Types > WebSphere application servers.
- Click the name of the application server with the processes that you want to trace and debug.
- Under Server Infrastructure, click Java and process management > Process definition.
- Select Control.
- Select Java virtual machine.
- On the Java virtual machine page, select the Debug mode option to start the standard Java debugger. Set Debug mode arguments, if they are needed.
- Click OK.
- Save the changes to a configuration file
- Stop the application server.
- Start the application server again as previously described.
Restarting an application server in recovery mode Stopping an application server Manage application servers Administer application servers Create application servers Use command-line tools (Windows) WASService command
addNode command removeNode command serverStatus command startNode command stopNode command startServer command stopServer command startManager command stopManager command