How to start WAS Liberty as a Windows service for CLM 6.0.1?
WAS Liberty has replaced Apache Tomcat as the out of the box application server. It was well documented how to start Tomcat as a Windows service. There is no equivalent documentation for WAS Liberty. Searching Google has not returned any useful results.
Has anyone figured out how to do this?
Accepted answer
There is already a RFE for Liberty fo running it as a Windows service: https://www.ibm.com/developerworks/rfe/execute?use_case=viewRfe&CR_ID=29865
As Shubjit pointed out, using Apache Commons Daemon is an option. Here is what I did to create the service using Apache Commons Daemon to run CLM 601 in Liberty, I hope it helps:
1. Download the binaries for Windows from http://www.apache.org/dist/commons/daemon/binaries/windows/
2. Unzip the downloaded file
3. Run the following script to create a Manual service. You need to change the values in the variables, and you might need to change other values too (e.g. --Startup if you want this service to be automatic):
@echo off set DAEMON_EXEC="C:\commons-daemon-1.0.15-bin-windows\amd64\prunsrv.exe"
set SERVER_START_COMMAND="C:\CLM\6.0.1\server\server.startup.bat"
set SERVER_START_COMMAND_PATH="C:\CLM\6.0.1\server"
set SERVER_STOP_COMMAND="C:\CLM\6.0.1\server\server.shutdown.bat"
set SERVER_STOP_COMMAND_PATH="C:\CLM\6.0.1\server"
set LOG_PATH="C:\CLM\6.0.1\server\logs\daemon"
set SERVICE_NAME=CLM601_LIBERTY
set SERVICE_DISPLAY_NAME="CLM 6.0.1 running in Liberty Profile"
set SERVICE_DESCRIPTION="CLM 6.0.1 running in Liberty Profile"
set INSTALL_SERVICE_COMMAND=%DAEMON_EXEC% //IS//%SERVICE_NAME% --Startup=manual --DisplayName=%SERVICE_DISPLAY_NAME% --Description=%SERVICE_DESCRIPTION% ++DependsOn=Tcpip --LogPath=%LOG_PATH% --StdOutput=auto --StdError=auto --StartMode=exe --StartPath=%SERVER_START_COMMAND_PATH% --StartImage=%SERVER_START_COMMAND% --StopMode=exe --StopPath=%SERVER_STOP_COMMAND_PATH% --StopImage=%SERVER_STOP_COMMAND%
%INSTALL_SERVICE_COMMAND%
Comments
1 vote
5 other answers
Comments
Can't seem to comment on this topic so asking a question in the answer box. The Apache document says the following:
Both Win32 and UNIX like platforms are supported. For Win32 platforms use procrun. For UNIX like platforms use jsvc.
Has anyone used this on a 64x windows system
Comments
A MUCH easier way is to use the WIndows task panels. This requires no external tool, libraries, or shell scripts.
Comments
I need help windows service for CLM 6.0.1is not working properly.
https://validedge.com/err-connection-timed-out/