WebSphere Application Server Network Deployment, Version 6.0.x   Operating Systems: AIX, HP-UX, Linux, Solaris, Windows
             [TIP: Focusing the table of contents and search results]

Automatically restarting server processes

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.

Before you begin

[AIX] [HP-UX] [Linux] [Solaris] To set up this function on a Linux or supported UNIX operating system, you must have root authority to edit the inittab file.

[Windows] 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.

[Windows] 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.

[Windows] 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:
  1. Click Administrative Tools in the Control Panel.
  2. Click Local Security Policy.
  3. Click Local Policies.
  4. Click User Rights Assignments.
  5. Right click Act as part of the operating system.
  6. Click Security.
  7. Click Add.
  8. Click your user ID.
  9. Click Add.
  10. Click OK.
  11. Click OK.
  12. Right click Log on as a service.
  13. Click Security.
  14. Click Add.
  15. Click OK.
  16. Click OK.
  17. Reboot your machine to make the settings effective.

[Windows] Consult your Windows help system for more information.

About this task

There are several environments where you might use this function of automatically restarting servers. You can restart the server1 managed node process, for example. Here is a list of processes you might consider restarting:
  • The server1 managed node process
  • The server1 process on a stand-alone Application Server
  • The dmgr process on a deployment manager node
  • The nodeagent server process on any managed node
  • The IBM HTTP Server process
  • The IBM HTTP Administration process
[Windows] On a Windows operating system, you can create Windows services during installation, using the installation wizard. Each Windows service controls a single process, such as a stand-alone WebSphere Application Server instance. Multiple stand-alone Application Server processes require multiple Windows services, which you can define. The wizard lets you create services for these servers:
  • The server1 managed node process, defined as a manually started (versus automatic) service
  • The server1 stand-alone Application Server process, defined as a manually started service
  • The IBM HTTP Server process and the IBM HTTP Administration process, defined as automatically started services when you choose to install the IBM HTTP Server feature
  • The dmgr process on a deployment manager node, defined as a manually started service

The installation wizard does not provide a way to create a service for a node agent because the deployment manager instantiates each node agent after installation when you add an Application Server node to the deployment manager cell. For this reason, you must manually create a function that automatically starts a failed node agent server process.

[AIX] [HP-UX] [Linux] [Solaris] On a Linux or supported UNIX soperating 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.

[Windows] [AIX] [HP-UX] [Linux] [Solaris] In a Network Deployment environment, the addNode or startNode command starts a single unmonitored node agent only, the nodeagent process, and does not start all of the processes that you might define on the node. While running, the node agent monitors and restarts Application Server processes on that node, on either a Windows or a Linux and UNIX-based platform. Each Application Server process has MonitoringPolicy configuration settings that the node agent uses when monitoring and restarting the process.

It is recommended that you manually set up a monitored process for the deployment manager dmgr server and for any node agent defined for your system. To set up a monitored process:
  • [Windows] On a Windows operating system, use a Windows service. You can install the WebSphere Application Server Network Deployment product as a Windows service during installation, or at a later time
  • [AIX] [HP-UX] [Linux] [Solaris] On a Linux or supported UNIX operating system, use the rc.was example shell script that is provided with the appropriate version of the product.

Procedure

  1. [Windows] On a Windows operating system, Use the Profile creation 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 Profile creation wizard to select services that the installation wizard can set up:
      1. Click Run WebSphere Application Server Network Deployment as a service.
        If you select this option, the installation wizard creates the following service during installation:
        IBMWAS6Service - node_name

        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.
        1. Right click IBMWAS6Service - node_name and click Properties.
        2. Click Automatic from the Startup type list box and click OK.
      2. 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.
      3. 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:
      1. Install the first copy of IBM HTTP Server, either by itself or with WebSphere Application Server and select to install the services.
      2. 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)"
      3. 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).
      4. 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"
      5. 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.
  2. [AIX] [HP-UX] [Linux] [Solaris] On a Linux or supported UNIX operating system, after you install the WebSphere Application Server product, set up a shell script to automatically monitor and restart any related server processes.
    1. Locate the rc.was example shell script, which is in the app_server_root/bin directory.
    2. Create a new shell script for each process that the operating system is to monitor and restart.
    3. Edit each shell script according to comments in its header, which provide instructions for identifying a WebSphere Application Server process.
    4. 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 operating system to call each shell script whenever the system initializes. As it runs, each shell script monitors and starts the server process you specified.

      Important: Everything that is ran from the inittab file runs under the root user. Therefore, if you need the server to automatically start the process under a non-root user ID when the machine starts, you must also add the following line to the inittab file:
      su user -c values

      where values is the file path and arguments that are used to call the rc scripts you created, and user is the non-root user that you have configured WebSphere Application Server to run as.

    Each shell script monitors and restarts the following processes in an WebSphere Application Server Network Deployment environment:
    • A server process on a managed node
    • A node agent process on a managed node
    • A stand-alone Application Server process
    • A deployment manager process
  3. [Windows] On a Windows operating system, after installing the WebSphere Application Server product, use the WASService.exe command to manually define the nodeagent server process as a Windows service.

    You can use the same command to manually define a Windows service for another installation instance or for another configuration instance of either the server1 process or the dmgr process.

  4. Click Apply and then click Save to save the change directly to the master configuration.

Results

[Windows] 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 startServer command, a startNode command, or a startManagercommand 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 the Defining application server processes administrative console page to continue.




Sub-topics
WASService command
Related tasks
Defining application server processes
Related reference
startNode command
startServer command
startManager command
Task topic    

Terms of Use | Feedback

Last updated: Mar 8, 2007 8:14:28 PM CST
http://publib.boulder.ibm.com/infocenter/wasinfo/v6r0/index.jsp?topic=/com.ibm.websphere.nd.doc/info/ae/ae/trun_processrestart.html

© Copyright IBM Corporation 2002, 2006. All Rights Reserved.
This information center is powered by Eclipse technology. (http://www.eclipse.org)