Automatically cycling 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. This task describes how to set up monitored processes.

To set up this function on a Linux and UNIX-based operating system, have root authority to edit the inittab.

On a Windows operating system, belong to the Administrator group and have the user rights Act as part of the operating system and Log on as a service to define Windows services. The installation wizard grants you the user rights, if your user ID is part of the Administrator group. It 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.

You can also add the user rights manually if you are performing a silent installation on a Windows platform. For example, to grant the user rights to your administrator group user ID on a Windows 2000 Server platform...

  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.

Consult your operating system help for more information.

There are several environments where you might use this function of automatically cycling servers. You can restart the server server process in a stand-alone WAS environment, for example. Here is a list of processes you might consider cycling...

You can create Windows services during installation, using the installation wizard. The wizard lets you create services for these servers...

You must manually create a shell script that automatically starts any of the processes previously mentioned, on a Linux and UNIX-based operating system. Each Windows service or UNIX shell script controls a single process, such as a stand-alone WAS instance. Multiple stand-alone Application Server processes require multiple Windows service or UNIX scripts, which you can define.

If you do not install the WAS base product as a Windows service during installation, you can use the WASService command in the $WAS_HOME/bin directory to do so at a later time. Use the tool to add any WebSphere Application Server process as a Windows service. The operating system can then monitor each server process, and restart the server if it stops.

  1. 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 for the base WAS product, to select services that the installation wizard can set up:

      1. Click Run WAS as a service.

        If you select this option, the installation wizard creates the following service during the installation

        IBM WAS V5 - server

        The IBM WAS V5 - server service controls the server process in a stand-alone environment.

        After you complete and verify the installation, use the Windows NT Services Control panel, or the Windows 2000 (or later) Services panel to change the IBM WAS V5 - server service to an automatic startup type.

        1. Right click IBM WAS V5 - server and click Properties.

        2. Click Automatic from the Startup type list box and click OK.

        WAS v5.1 does not support Windows NT.

      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 1.3.2x (either 1.3.26 or 1.3.28 for V5.1)

        • IBM HTTP Administration 1.3.2x (either 1.3.26 or 1.3.28)

        The installation wizard defines the startup type of these services as automatic. It is not necessary that you do so.

      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 1.3.2x.x or 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 1.3.26(1)"
             apache -k install -f conf\admin.conf -n "IHS 1.3.26 Administration (1)"

        If you are installing IBM HTTP Server 1.3.28, use these commands

             apache -k install -n "IHS 1.3.28(1)"
             apache -k install -f conf\admin.conf -n "IHS 1.3.28 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 1.3.26(1).

      4. Remove the default service names installed by the first install by running the following commands:

             apache -k uninstall -n "IBM HTTP Server 1.3.26"
             apache -k uninstall -n "IBM HTTP Administration 1.3.26"

      5. Install the second copy of IBM HTTP Server, either by itself or with WebSphere Application Server. The default service names will now correspond to the second install.

      Note that Customized service names must be unique on your system.

  2. After installing, use the WASService.exe utility in the $WAS_HOME\bin directory to manually define a Windows service for another installation or configuration instance of the base WAS product.

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.

You can also use the Start the Server and Stop the Server commands to control the IBM WAS on a Windows system. Access these commands from the Start menu, clicking Start > Programs > IBM WebSphere > Application Server V5.1.

Processes started by a startServercommand are not running as monitored processes, regardless of how you have configured them.

For example, you can configure a base Application Server as a WAS monitored process. However, if you start the Application Server instance using the startServer command, the operating system does not monitor or restart the Application Server because the operating system did not start the process as a monitored process.

Return to Install the product to continue.