(Windows)
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 WAS 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 WAS 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 you prevent common problems. The following procedure is an example of using the WASServiceHelper utility to create a service using the minimum number of parameters.
Tasks
- Change to the following directory:
app_server_root\bin- Launch the WASServiceHelper utility.
wasservicehelper.bat- 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.
- In response to Select number next to the profile, select the number associated with the profile for which we want to create the service.
- In response to Select number next to server, select the number associated with the server.
- Enter the service name for our service.
- In the next steps, accept the default values by pressing Enter or make changes as needed.
- 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.
- Enter the log root path.
We can press Enter to accept the default location, or we can enter the full path to your log root directory.
- Enter the log file name.
We can press Enter to accept the default location, or we can enter the full path to your log file directory.
- 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.
- 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.
- 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.
- 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
WASService command Video: Using the WASServiceHelper utility to create a Windows service for V8 and higher (V8.0)