It's all about the answers!

Ask a question

Anyone having problems with ELM 7.0.2 as a Windows service not starting - works fine manually


Davyd Norris (1.6k12) | asked Jan 22 '21, 7:09 p.m.
edited Jan 22 '21, 7:09 p.m.
Hi folks,

Got a weird one. I've set up and configured ELM 7.0.2 and everything works fine if I manually start and stop the server using the server.startup.bat files.

I then set it up to run as a Windows service, using Apache Commons daemon and the service starts and then stops. The log messages tell me that "clm is already running" but it's not.

Strange thing is that I first used the exact same manual set up as I have had running on 6.0.6.1 for years with no problem - only thing I did was upgraded commons-daemon to the latest release.

I then had a look and found that V7.x now includes a version of Liberty that includes Windows service registration commands - they are doing *exactly* the same thing as mine but for future simplicity I removed my manual implementation and added the out of the box service registration, with exactly the same problem.

The one thing that is a bit weird is that when I start manually, the gc-verbose* files created by the server end up under the liberty/servers/clm directory, but when I start the service they appear in the  top level server directory where the startup scripts are, so maybe there's a starting directory issue, but that hasn't changed between 6.x and 7.x in my set up.

Any help much appreciated



Comments
Bartosz Chrabski commented Jan 24 '21, 3:10 a.m. | edited Jan 24 '21, 3:10 a.m.

Open the service created for 7.0.2 and check if it is started as syste. User. By default it will be run as user used for creating the service. Switxh it to system user. 

Accepted answer


permanent link
Bartosz Chrabski (3.3k12243) | answered Jan 24 '21, 3:11 a.m.
edited Jan 24 '21, 3:58 a.m.

 Open the service created for 7.0.2 and check if it is started as system user. By default it will be run as user used for creating the service. Switch it to system user. 

Davyd Norris selected this answer as the correct answer

Comments
Davyd Norris commented Jan 24 '21, 8:03 a.m.
We have a winner - many thanks!

Once you have registered the service, you have to explicitly manually change the service to run as the "Local System Account", which is the top option - it's not enough to run as the "Local System" as a user. This is an additional step that you must perform after you have registered the service.

I need to go back to my 6.x VM and see if I changed it there as I don't remember this extra step being necessary in the 6.x windows service, but it's fixed my issue in 7.x.

This is something that is not spelt out in either the wiki mentioned in this thread, the 7.x online help, or in the Liberty server docs so I have expanded on the answer here.

Davyd Norris commented Jan 24 '21, 11:16 p.m.
Further to this, if you add the parameter

--ServiceUser NT Authority\LocalSystem

to the command line then this will create the service as the Local System account and there will be no need to manually adjust it later

One other answer



-1
permanent link
Bartosz Chrabski (3.3k12243) | answered Jan 23 '21, 6:04 a.m.

Hi Dayvd,


The setup for 7.0 was changed and now commons is embedded into the Jazz package.

This article will be helpful


Additionally, you can check out the movie I have prepared some time ago. I think in part 3 or 4 iis autostart.


Comments
Davyd Norris commented Jan 23 '21, 8:38 p.m.
Sorry - I must not have been very clear in my question. This is exactly what I have done.

I previously used my own manual registration, which was exactly the same as what has now been built into V7.x, and it worked fine in 6.0.x but stopped working properly in 7.x.

I then replaced my manual registration with the built in and had exactly the same issue. The service starts and then stops, and the log messages say the clm server is already running but it's not, so there must be an error starting the server that's being interpreted as the server running.

Server works fine from the batch files, and is installed at C:\IBM\JazzTeamServer so should be accessible from all user accounts

Your answer


Register or to post your answer.