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
Just to add more more information to Shubjit's 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" Ralph Schoon selected this answer as the correct answer
Comments 1
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!
Brian Lahaie
commented Apr 14 '17, 6:20 p.m.
Agreed, this is a perfect answer. It took me literally 10 minutes to configure Liberty to run as a Windows service. |
5 other answers
Hi Jeffery
I found this forum link and there is a user who has confirmed that it works.
Comments
Hi Shubjit
I've tried the Apache Daemon and yes functionally it successfully creates a Windows service which can be started/stopped. It seems particularly nice because it uses the server.startup.bat it's easy to change the JVM parameters.
The catch I've found is that Windows (at least 2012 R2 and 2016 server editions) is so keen/desperate to stop services quickly during shutdown that it ignores the fact that Liberty hasn't actually stopped and just shuts down regardless, stopping Liberty dead of course. At the next startup the rm log often shows that RM wasn't shut down properly - this is risking RM index corruption which may require a full reindex. I've done some searching and while there should be a registry variable WaitToKillServiceTimeout which should be able to extend how long Windows waits, it doesn't seem to have any effect.
It seems that using Apache Daemon is in the "sort of works but can cause lurking problems" category - it definitely seems dangerous when running DOORS Next Generation. And of course it's formally not supported.
Robert Carter
commented May 16 '19, 12:37 p.m.
You might want to try this solution and see if it successfully "blocks" Windows from shutting down until Liberty is fully shutdown.
Ian Barnard
commented May 17 '19, 6:06 a.m.
| edited May 17 '19, 6:24 a.m.
FORUM ADMINISTRATOR / FORUM MODERATOR / JAZZ DEVELOPER
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:
Comments
Shubjit Naik
commented Mar 31 '17, 10:00 a.m.
Hi Thomas
Yes we tested this on Windows 64 bit and it worked. We have included this in our deployment Wiki.
Thank you Shubjit,
|
Ian Barnard (2.3k●7●14)
| answered May 16 '19, 12:44 p.m.
FORUM ADMINISTRATOR / FORUM MODERATOR / JAZZ DEVELOPER edited May 16 '19, 1:06 p.m.
As I said above, I have tried Apache Daemon with multiple versions 6.0.5 - 6.0.6.1 and while it works in terms of creating a Windows service that can be started and stopped, my experience was that there is definitely a problem cleanly stopping liberty and the apps running in it during Windows shutdown.
What seems to happen is that Windows is so keen to shutdown quickly that it waits a nominal 12 seconds then carries on shutting down. On my VM, manually stopping the service takes about 25s for Liberty to exit and release RAM, watching Task Manager. From the same starting point with the service running I can restart Windows in 15s - this has to be stopping Liberty and DB2 dead, in the middle of whatever it was doing.
This is a hazard for at least DOORS Next Generation, which on subsequent startup often complains that the app wasn't cleanly shutdown - and if it wasn't cleanly shutdown this is risking index corruption which might require a full reindex. And of course running Liberty as a service is formally not supported.
As a result I'd avoid Apache Daemon on any production/staging environment which might have non-admin-initiated server shutdown/restarts.
Be great if anyone can tell me how to configure Windows to be more patient?
|
A MUCH easier way is to use the WIndows task panels. This requires no external tool, libraries, or shell scripts.
I've documented that here:
Comments
Hi Kenny
I really wanted your solution to work, but I couldn't get it to. In fact restart was even faster using your method of shutdown - I got as low as 6s.
I'm using Windows 2012R2 Server. What version of Windows are you using? How did you confirm that shutdown completes cleanly? If the shutdown happens significantly quicker than the time Liberty normally takes to free all the memory it is allocated in response to a manual shutdown then it was too quick. The only way I know to confirm that shutdown wasn't clean is that during subsequent Liberty startup in rm.log DOORS Next Generation displays "CRJZS6073W The server did not shut down properly, which might have corrupted the RDF indexes located at C:\IBM\JazzTeamServer\server\conf\rm\indices\...."
Kenny Smith
commented May 17 '19, 8:30 a.m.
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.
Comments Here some suggestions:
|
Your answer
Dashboards and work items are no longer publicly available, so some links may be invalid. We now provide similar information through other means. Learn more here.