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
WOW!! This was the perfect answer. I had the CLM WAS Liberty process running as a service in short order. This was easier than setting up Apache/Tomcat!
Roberto, thanks so much for posting such a complete and succinct solution. You rock!
1 vote
Agreed, this is a perfect answer. It took me literally 10 minutes to configure Liberty to run as a Windows service.
5 other answers
Comments
You might want to try this solution and see if it successfully "blocks" Windows from shutting down until Liberty is fully shutdown.
Hi Robert - yes @kenny smith contributed the same answer, and Kenny's method like the Apache Daemon method works perfectly well to start/stop Liberty manually but I couldn't get it to work any better during Windows shutdown - so Liberty (and presumably DB2 which I have on this same test env) is still being stopped dead.
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
Hi Thomas
Thank you Shubjit,
I followed the wiki and everything worked fine except for the daemon logs. The "C:\IBM\JazzTeamServer\server\logs" folder does not exist until WLP has been started once so the first messages are missed.
A MUCH easier way is to use the WIndows task panels. This requires no external tool, libraries, or shell scripts.
Comments
I've used this on Windows 2012 server (not sure the revision of it), as well as Windows 10 (my local laptop). I've not noticed this issue when I've done this. I'll go back and check my instructions just to make sure I've got every step listed.
I need help windows service for CLM 6.0.1is not working properly.
https://validedge.com/err-connection-timed-out/
Comments
Here some suggestions:
- Do not answer on an old accepted question with a new question
- Create your own question
- The question above does not contain any information that could reasonably be used - contact support or provide information e.f. see How should I ask a question in the Forum if I want to receive useful answers?
- I would have converted this into a question, but there is nothing in there that would be actionable