I am trying to install a runner on my windows 8.1 machine.
I registered the runner with my Gitlab CI server with no errors.
However, when I run the following command I get the following error.
$ gitlab-ci-multi-runner-windows-amd64.exe install --password WINDOWS_MACHINE_PASSWORD$ gitlab-ci-multi-runner-windows-amd64.exe start$ FATA[0000] Failed to start GitLab Runner: The service did not start due to a logon failure.
I also tried the x86 but I get the same error.
Any thoughts on what might be causing this issue?
Thanks in advance.
Designs
Child items
...
Show closed items
Linked items
0
Link issues together to show that they're related or that one is blocking others.
Learn more.
I was finally able to get this to work by going into windows service window. I re-entered the password for the service account and started the service though that window. Not sure why the command line version doesn't work.
@ayufan After downloading a fresh copy of the x86 executable everything seems to work. Not sure why it wasn't working before. Thank you for looking into this.
Whoops. I forgot to run the start command. When I run the start command after running the register and install commands. I get the following error.
time="2015-06-22T09:10:25-07:00" level=fatal msg="Failed to start GitLab Runner: The service did not start due to a logon failure."
I tried this on both a Windows 10 and Windows 8.1 machine.
I am also running the cmd.exe as Administrator. It might also be worth noting that the Windows 10 machine isn't domain joined while the Windows 8.1 machine is.
For anybody also issuing this issue and trying to get this task done in some kind of installer: I managed to implement an automated script which can be executed and avoids this issue:
For Windows 2012 Server (and probably for other recent Windows versions) the "Log on as a service" can be added without the Ntrights.exe tool, by:
going to Control Panel > System and Security > Administrative Tools,
opening the Local Security Policy,
opening Security Settings > Local Policies > User Rights Assigment on the list on the left,
opening Log on as a service on the list on the right,
clicking on a Add User or Group... button.
After adding the user (by writing "by hand" or using the Advanced... button) and applying, the gitlab-ci-multi-runner.exe start should start working.
According to Microsoft's documentation the above should work for: Windows Vista, Windows Server 2008, Windows 7, Windows 8.1, Windows Server 2008 R2, Windows Server 2012 R2, Windows Server 2012, Windows 8.
Setting the Log on as a service right for a user seems to be the best way to resolve the Failed to start GitLab Runner: The service did not start due to a logon failure. problem.
There is no easy way to automate this inside of the gitlab-ci-multi-runner install command.
It can be done quite easy with "clicking" into Control Panel.
It can be also scripted, but the command relays on a quite old tool designed for Windows 2003.
I would suggest that we should describe both of solutions (the one using Ntrights.exe, and the one using Control Panel) in the FAQ and link to this description from the Windows installation documentation.
I would suggest that we should describe both of solutions (the one using Ntrights.exe, and the one using Control Panel) in the FAQ and link to this description from the Windows installation documentation.
It makes sense for me. Maybe we should start distributing Chocolatey package of runner?
@ayufan I've heard about Chocolatey, but it looks interesting. I think we could work on this in the future. But how is this related to the problem of this issue? Does Chocolatey provide any mechanism to manage user permission? If no, then this change will still need to be done manually and we need to describe it somewhere in our documentation.