There are several server processes related to WebSphere Application
Server products that the operating system can monitor and automatically restart
when the server processes stop abnormally. This task describes how to set
up these monitored processes.
Before you begin
To set up this function on a Linux or UNIX-based operating system,
you must have root authority to edit the inittab file.
To set up this
function on a Microsoft Windows operating system, you must belong to the Administrator
group and have the following advanced user rights:
- Act as part of the operating system
- Log on as a service
The Installation wizard grants you the user rights if your user
ID is part of the administrator group.
If you are running on a Microsoft
Windows Operating System, the Installation wizard displays a message that
states that although the advanced user rights are now effective, they do not
display as effective until the next time you log on to the Windows machine.
You
can also add the advanced user rights manually if you are performing a silent
installation on a Windows operating system. For example, to grant the user
rights to your administrator group user ID on a Windows operating system,
perform the following procedure:
- Click Administrative Tools in the Control Panel.
- Click Local Security Policy.
- Click Local Policies.
- Click User Rights Assignments.
- Right click Act as part of the operating system.
- Click Security.
- Click Add.
- Click your user ID.
- Click Add.
- Click OK.
- Click OK.
- Right click Log on as a service.
- Click Security.
- Click Add.
- Click OK.
- Click OK.
- Reboot your machine to make the settings effective.
Consult your Windows help system for more information.
Why and when to perform this task
You can use this function to automatically restart
Express servers. You can restart the server1 process, for example.
On a Linux or UNIX-based operating system, you must manually create a shell
script that automatically starts any of the processes previously mentioned.
Each UNIX shell script controls a single process, such as a stand-alone WebSphere
Application Server instance. Multiple stand-alone Application Server processes
require multiple UNIX scripts, which you can define.
If you
do not install the WebSphere Application Server base product as a Windows
service during installation, you can use the WASService command in
the install_root/bin directory to do so at a later time. You
can use this command to add any WebSphere Application Server process as a
Windows service. The operating system can then monitor each server process
and restart the process if it stops.
Steps for this task
- On a Windows operating system, Use
the installation wizard to set up a Windows service to automatically monitor
and restart processes related to the WebSphere Application Server product.
Perform the following procedure from the installation wizard to select
services that the installation wizard can set up:
- Click Run WebSphere Application Server as a service.
If you select
this option, the installation wizard creates the following service during
the installation:
IBMWAS6Service - node_name
The IBMWAS6Service
- node_name service controls the node_name process.
After
you complete and verify the installation, use the Windows Services panel to
change the
IBMWAS6Service - node_name service to an automatic
startup type.
- Right click IBMWAS6Service - node_name and click Properties.
- Click Automatic from the Startup type list box and click OK.
- Click Run IBM HTTP Server as a service.
Select this option on
the machine where you are installing the IBM HTTP Server.
If you select
this option, the installation wizard creates the following services during
the installation:
- IBM HTTP Server 2.0.x
- IBM HTTP Administration 2.0.x
The installation wizard defines the startup type of these services as
automatic.
It is not necessary for you to change the type from manual to automatic.
- Enter your user ID and password and click Next.
In a coexistence environment, you can change the default service
names to make them unique. In a same version coexistence scenario for IBM
HTTP Server 2.0.x on a Windows platform, you cannot use the default service
names created by the installer because they are common.
To work around
this problem:
- Install the first copy of IBM HTTP Server, either by itself or with WebSphere
Application Server and select to install the services.
- Customize the service names for the first install by running the following
commands from the first install location:
apache -k install -n "IHS 2.0(1)"
apache -k install -f conf\admin.conf -n "IHS 2.0 Administration (1)"
- Edit the AdminAlias directive in the installLocation 1\conf\admin.conf file
to point to the new service name, such as IHS 2.0(1).
- Remove the default service names installed by the first install by running
the following commands:
apache -k uninstall -n "IBM HTTP Server 2.0"
apache -k uninstall -n "IBM HTTP Administration 2.0"
- Install the second copy of IBM HTTP Server, either by itself or with WebSphere
Application Server. The default service names correspond to the second install.
Note: Customized service names must be unique on your
system.
- On a Linux or UNIX operating system, after you install the WebSphere
Application Server product, set up a Linux and UNIX-based shell script to
automatically monitor and restart the node agent process or any other related
server process.
- Locate the rc.was example shell script, which is in
the install_root/bin directory.
- Create a new shell script for each process that the operating
system is to monitor and restart.
- Edit each shell script according to comments in its header,
which provide instructions for identifying a WebSphere Application Server
process.
- Edit the inittab table of the operating system, to add an entry
for each shell script you have created.
Comments in the header
of the rc.was file show a sample inittab entry line for adding the
script. This inittab entry causes the Linux and UNIX-based system to call
each shell script whenever the system initializes. As it runs, each shell
script monitors and starts the server process you specified.
Each shell script monitors and restarts
an Express server process.
- On a Windows operating system, after installing
the WebSphere Application Server product, you can use the WASService.exe command
in the install_root\bin directory to manually
define a Windows service for another installation instance or for another
configuration instance of the server1 process.
Result
On a Windows operating system, you can
- Use the net start and net stop commands to control the IBM
HTTP Server services on a Windows system. For more information about these
commands, see the Windows help file. Access these commands from the Start
menu, clicking Start > Programs > IBM HTTP Server.
- Use the Start the Server and Stop the Server commands to
control the IBM WebSphere Application Server process. Access these commands
from the Start menu, clicking Start > Programs > IBM WebSphere > Application
Server V6.
- Use the Start the Manager and Stop the Manager commands
to control the Network Deployment dmgr process. Access these commands from
the Start menu, clicking Start > Programs > IBM WebSphere > Application
Server V6 > Deployment Manager.
Processes started by a startServercommand
are not running as monitored processes, regardless of how they are configured.
For example, you can configure a server1
process as a monitored process. However, if you start the server1 process
using the startServer command, the operating system does not monitor
or restart the server1 process because the operating system did not originally
start the process as a monitored process.
What to do next
After the process is set up, the operating system can monitor each
server process and restart the process if it stops.
Return to Defining application server processes to
continue.