+

Search Tips   |   Advanced Search

Use the WASServiceHelper utility to create Windows services for application servers

Use wasservicehelper.bat as a front end for WASService.exe to add, update, or remove WebSphere Application Server services on a Windows operating system.

  • WASService.exe and wasservicehelper.bat must be in their default directory in order to add, update, or remove WebSphere Application Server services on a Windows operating system using the WASServiceHelper utility:

      app_server_root\bin

    Use the WASService command to add or remove a WAS service on a Windows operating system can be confusing and error prone. The WASServiceHelper utility greatly reduces the time it takes to add, update, or remove a Windows service for WebSphere Application Server and reduces the opportunity for errors.

    Supported management functions of the WASServiceHelper utility include the ability to:

    • Add a new or update an existing Windows service using the minimum required parameters

    • Add a new or update an existing Windows service using all available parameters

    • Remove a service

    • Display the status of a service

    • Enable WASService traces for problem determination

    Hints and warnings display as you go to help prevent common problems. The procedure below is an example of using the WASServiceHelper utility to create a service using the minimum number of parameters.

    1. Change to the following directory:

        app_server_root\bin

    2. Launch the WASServiceHelper utility.

        wasservicehelper.bat

    3. In response to Select number next to the options on the main menu, select 1 to create a service using the minimum number of parameters.

    4. In response to Select number next to the profile, select the number associated with the profile for which to create the service.

    5. In response to Select number next to server, select the number associated with the server.

    6. Enter the service name for the service.

    7. In the next steps, accept the default values by pressing Enter or make changes as needed.

      1. Enter any additional start arguments.

        -startArgs and -stopArgs are not required options. Use these options to specify additional parameters used for starting and stopping the JVM process. For example, we can add a user name and password:

          -stopArgs "-username myname -password passw0rd"

        These additional parameters are automatically passed into the script that the Windows service uses to stop the JVM process.

        The default is to provide no additional arguments, and we can press Enter to skip this option.

      2. Enter the log root path.

        We can press Enter to accept the default location, or we can enter the full path to the log root directory.

      3. Enter the log file name.

        We can press Enter to accept the default location, or we can enter the full path to the log file directory.

      4. Enter the configuration root location.

        We can press Enter to accept the default location, or we can enter the full path to the configuration root directory.

      5. Specify the restart policy.

        Enter 1 to automatically restart this service if it fails. Enter 2 to restart manually if the service fails.

        If we press Enter, the default value of 1 is assumed.

      6. Specify the start type.

        Enter 1 if we want this service to automatically start when the operating system starts or when the service is called for the first time. Enter 2 if the service must be started manually using the Windows Services panel.

        If we press Enter, the default value of 1 is assumed.

    8. Review all the parameters in the panel displaying the final command, and then respond to Execute command now? with a Y (yes) or N (no).

      If we enter Y, the WASServiceHelper utility runs the WASService command and calls all of the selected parameters.

      This also creates an entry in a WASServiceHelper.log file in the current directory containing the actual WASService command used to add, update, or remove the service. For example:

      WASService.exe -add "Deployment Mgr01" -serverName "dmgr"
      -profilePath "C:\IBM\WebSphere\AppServer\profiles\Dmgr01"
      -logRoot "C:\IBM\WebSphere\AppServer\profiles\Dmgr01\logs\dmgr"
      -logFile "C:\IBM\WebSphere\AppServer\profiles\Dmgr01\logs\dmgr\WS_startdmgr.log"  -encodeParams -stopArgs "-username vanno -password ****** "
      -startType manual
      -restart false


    Related information:

  • WASService command