|
Problem |
Is there an equivalent of a nanny process in WebSphere
Application Server Version 5? In other words, how can I run server
processes as monitored processes so that they can be restarted if they go
down? |
|
Solution |
There is an equivalent, but it is different depending on
the platform.
On Windows, use a command line tool called WASService.exe in the
WAS_install_root/bin directory. This tool adds any server process as a
Windows Service, and the Windows operating system monitors the process and
restarts it if it crashes. For WebSphere Application Server v5 (base),
where there is only the application server, individual application servers
can be added as Windows Services for monitoring. For WebSphere Application
Server Network Deployment, the Node Agent takes care of the monitoring and
restarting of individual application servers in the node, but the Node
Agent should be setup as a Windows Service using WASService.exe so it can
be automatically restarted. If the deployment manager is installed, the
Deployment Manager should also be setup as a Windows Service using
WASService.exe in order for it to be a monitored process.
Inorder to create a service, run wasservice.exe from
<install_root>/bin. The command is :
wasservice.exe -add <service name> -serverName <Name of
Server> {optional params}.
To get more information on the wasservice.exe tool and the optional
parameters for the add command, check the WebSphere Application Server
InfoCenter.
For example, to create a nodeagent service, you could use the command:
wasservice.exe -add nodeagent -serverName nodeagent.
To start a service, use the command: wasservice.exe -start <service
name>
Alternatively, You can create Windows services during installation, using
the installation wizard. The wizard lets you create services for these
servers:
The server1 process in a standalone base product environment
The IBM HTTP Server process and the IBM HTTP Administrative Server
process, if you have chosen to install the IBM HTTP Server feature during
the base product installation
The Deployment Manager process on a deployment manager node
The installation wizard does not provide a way to create a service for a
node agent. You have to use the WASService tool mentioned above to run the
Node Agent as a service.
The basic situation is the same for Unix platforms except that instead of
WASService.exe, we ship an example shell script (rc.was) that should be
added to the system's inittab table. The rc.was example contains
instructions and a sample inittab entry line. This is similar to creating
a Windows Service. Individual Application servers can be monitored in the
Base environment, and node agents and deployment managers in the Network
Deployment environment. |
|
|
|
Cross Reference information |
Segment |
Product |
Component |
Platform |
Version |
Edition |
Application Servers |
Runtimes for Java Technology |
Java SDK |
|
|
|
|
|
|
|