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!
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.
You might want to try this solution and see if it successfully "blocks" Windows from shutting down until Liberty is fully shutdown. ![]() 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 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 (1.8k●6●13)
| 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?
|
![]() I need help windows service for CLM 6.0.1is not working properly.
Comments Here some suggestions:
|