Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

"Log on as" a network user: Error 1068: The dependency service or group failed to start. #3683

Open
jlees-intel opened this issue Jan 29, 2025 · 0 comments
Labels
bug Something isn't working

Comments

@jlees-intel
Copy link

Describe the bug
A clear and concise description of what the bug is.
When I attempt to configure a runner to log in as a network user (LDAP maybe? Not sure if that term applies here), the authentication succeeds (check the log) but when it tries to run, I get this error:

Windows could not start the GitHub Actions Runner (RUNNER NAME) service on Local Computer.

Error 1068: The dependency service or group failed to start.

To Reproduce
Steps to reproduce the behavior:
While on a network account, i.e. one where "whoami" returns {network][username], e.g. mydomain\janedoe, install a runner and install as a service.
Enter the network username and password.
Let it try to start the service.

Expected behavior
A clear and concise description of what you expected to happen.
I expect that the runner should be able to log in as my user, start successfully, and then run as if it was me.
My reason for doing this, instead of letting it run as a network service by default, is because I need my runners to access a managed network drive. It's configured so that only authenticated users can access it, so the service must be logged in as me to access those resources.

NOTE: When editing the service directly in the "Log on as" tab, changing the account from e.g. "mydomain\janedoe" anything else, including just "janedoe" results in the error "The account name is invalid or does not exist, or the password is invalid for the account name specified", which indicates to me that "mydomain\janedoe" is, in fact, the correct user.

Runner Version and Platform

Version of your runner? actions-runner-win-x64-2.321.0

OS of the machine running the runner? Windows 11

What's not working?

Please include error messages and screenshots.

Image

Job Log Output

If applicable, include the relevant part of the job / step log output here. All sensitive information should already be masked out, but please double-check before pasting here.
N/A

Runner and Worker's Diagnostic Logs

If applicable, add relevant diagnostic log information. Logs are located in the runner's _diag folder. The runner logs are prefixed with Runner_ and the worker logs are prefixed with Worker_. Each job run correlates to a worker log. All sensitive information should already be masked out, but please double-check before pasting here.

[2025-01-29 02:11:42Z INFO NativeWindowsServiceHelper] Verify credential for account [USERNAME].
[2025-01-29 02:11:45Z INFO NativeWindowsServiceHelper] Credential for account '[USERNAME]' is valid.
[2025-01-29 02:11:45Z INFO WindowsServiceControlManager] Credential validation succeed
[2025-01-29 02:11:45Z INFO WindowsServiceControlManager] Service name 'actions.runner.[REPO NAME].JL-WORKBOOK-1485' display name 'GitHub Actions Runner ([REPO NAME].JL-WORKBOOK)' will be used for service configuration.
[2025-01-29 02:11:45Z INFO WindowsServiceControlManager] Verifying if the account has LogonAsService permission
[2025-01-29 02:11:45Z INFO WindowsServiceControlManager] Account: [DOMAIN]\[USERNAME] already has Logon As Service Privilege.
[2025-01-29 02:11:45Z INFO WindowsServiceControlManager] Create local group and grant folder permission to service logon account.
[2025-01-29 02:11:45Z INFO HostContext] Well known directory 'Bin': 'C:\Users\[USERNAME]\actions-runner\bin'
[2025-01-29 02:11:45Z INFO HostContext] Well known directory 'Root': 'C:\Users\[USERNAME]\actions-runner'
[2025-01-29 02:11:45Z INFO ConfigurationStore] Read setting file: 370 chars
[2025-01-29 02:11:45Z INFO HostContext] Well known directory 'Bin': 'C:\Users\[USERNAME]\actions-runner\bin'
[2025-01-29 02:11:45Z INFO HostContext] Well known directory 'Root': 'C:\Users\[USERNAME]\actions-runner'
[2025-01-29 02:11:45Z INFO HostContext] Well known directory 'Work': 'C:\Users\[USERNAME]\actions-runner\_work'
[2025-01-29 02:11:45Z INFO HostContext] Well known directory 'Bin': 'C:\Users\[USERNAME]\actions-runner\bin'
[2025-01-29 02:11:45Z INFO NativeWindowsServiceHelper] Calculated unique group name GITHUB_ActionsRunner_G83b7e
[2025-01-29 02:11:45Z INFO NativeWindowsServiceHelper] Trying to create group GITHUB_ActionsRunner_G83b7e
[2025-01-29 02:11:45Z INFO NativeWindowsServiceHelper] Local Group 'GITHUB_ActionsRunner_G83b7e' created
[2025-01-29 02:11:45Z INFO NativeWindowsServiceHelper] Trying to add userName [DOMAIN]\[USERNAME] to the group GITHUB_ActionsRunner_G83b7e
[2025-01-29 02:11:45Z INFO NativeWindowsServiceHelper] Account '[DOMAIN]\[USERNAME]' is added to local group 'GITHUB_ActionsRunner_G83b7e'.
[2025-01-29 02:11:45Z INFO NativeWindowsServiceHelper] Set full access control to group for the folder C:\Users\[USERNAME]\actions-runner
[2025-01-29 02:11:45Z INFO NativeWindowsServiceHelper] Set full access control to group for the folder C:\Users\[USERNAME]\actions-runner\_work
[2025-01-29 02:11:45Z INFO NativeWindowsServiceHelper] Local group 'GITHUB_ActionsRunner_G83b7e' already has full control to path 'C:\Users\[USERNAME]\actions-runner\_work'.
[2025-01-29 02:11:45Z INFO Terminal] WRITE LINE: Granting file permissions to '[DOMAIN]\[USERNAME]'.
[2025-01-29 02:11:45Z INFO HostContext] Well known directory 'Bin': 'C:\Users\[USERNAME]\actions-runner\bin'
[2025-01-29 02:11:45Z INFO ProcessInvokerWrapper] Starting process:
[2025-01-29 02:11:45Z INFO ProcessInvokerWrapper]   File name: '"C:\Users\[USERNAME]\actions-runner\bin\RunnerService.exe"'
[2025-01-29 02:11:45Z INFO ProcessInvokerWrapper]   Arguments: 'init'
[2025-01-29 02:11:45Z INFO ProcessInvokerWrapper]   Working directory: ''
[2025-01-29 02:11:45Z INFO ProcessInvokerWrapper]   Require exit code zero: 'True'
[2025-01-29 02:11:45Z INFO ProcessInvokerWrapper]   Encoding web name:  ; code page: ''
[2025-01-29 02:11:45Z INFO ProcessInvokerWrapper]   Force kill process on cancellation: 'False'
[2025-01-29 02:11:45Z INFO ProcessInvokerWrapper]   Redirected STDIN: 'False'
[2025-01-29 02:11:45Z INFO ProcessInvokerWrapper]   Persist current code page: 'False'
[2025-01-29 02:11:45Z INFO ProcessInvokerWrapper]   Keep redirected STDIN open: 'False'
[2025-01-29 02:11:45Z INFO ProcessInvokerWrapper]   High priority process: 'False'
[2025-01-29 02:11:45Z INFO ProcessInvokerWrapper] Process started with process id 31720, waiting for process exit.
[2025-01-29 02:11:45Z INFO ProcessInvokerWrapper] STDOUT/STDERR stream read finished.
[2025-01-29 02:11:45Z INFO ProcessInvokerWrapper] STDOUT/STDERR stream read finished.
[2025-01-29 02:11:45Z INFO ProcessInvokerWrapper] Finished process 31720 with exit code 0, and elapsed time 00:00:00.0984050.
[2025-01-29 02:11:45Z INFO Terminal] WRITE LINE: Service actions.runner.[REPO NAME].JL-WORKBOOK-1485 successfully installed
[2025-01-29 02:11:45Z INFO Terminal] WRITE LINE: Service actions.runner.[REPO NAME].JL-WORKBOOK-1485 successfully set recovery option
[2025-01-29 02:11:45Z INFO Terminal] WRITE LINE: Service actions.runner.[REPO NAME].JL-WORKBOOK-1485 successfully set to delayed auto start
[2025-01-29 02:11:45Z INFO Terminal] WRITE LINE: Service actions.runner.[REPO NAME].JL-WORKBOOK-1485 successfully configured
[2025-01-29 02:11:45Z INFO HostContext] Well known directory 'Bin': 'C:\Users\[USERNAME]\actions-runner\bin'
[2025-01-29 02:11:45Z INFO HostContext] Well known directory 'Root': 'C:\Users\[USERNAME]\actions-runner'
[2025-01-29 02:11:45Z INFO HostContext] Well known config file 'Service': 'C:\Users\[USERNAME]\actions-runner\.service'
[2025-01-29 02:11:45Z INFO WindowsServiceControlManager] Configuration was successful, trying to start the service
[2025-01-29 02:11:45Z ERR  NativeWindowsServiceHelper] System.InvalidOperationException: Cannot start service 'actions.runner.[REPO NAME].JL-WORKBOOK-1485' on computer '.'.
 ---> System.ComponentModel.Win32Exception (1068): The dependency service or group failed to start.
   --- End of inner exception stack trace ---
   at System.ServiceProcess.ServiceController.Start(String[] args)
   at System.ServiceProcess.ServiceController.Start()
   at GitHub.Runner.Listener.Configuration.NativeWindowsServiceHelper.StartService(String serviceName)
[2025-01-29 02:11:45Z ERR  NativeWindowsServiceHelper] #####################################################
[2025-01-29 02:11:45Z ERR  NativeWindowsServiceHelper] System.ComponentModel.Win32Exception (1068): The dependency service or group failed to start.
[2025-01-29 02:11:45Z ERR  Terminal] WRITE ERROR: Cannot start the service. Check the logs for more details.
[2025-01-29 02:11:45Z ERR  Runner] System.InvalidOperationException: Cannot start service 'actions.runner.[REPO NAME].JL-WORKBOOK-1485' on computer '.'.
 ---> System.ComponentModel.Win32Exception (1068): The dependency service or group failed to start.
   --- End of inner exception stack trace ---
   at System.ServiceProcess.ServiceController.Start(String[] args)
   at System.ServiceProcess.ServiceController.Start()
   at GitHub.Runner.Listener.Configuration.NativeWindowsServiceHelper.StartService(String serviceName)
   at GitHub.Runner.Listener.Configuration.WindowsServiceControlManager.ConfigureService(RunnerSettings settings, CommandSettings command)
   at GitHub.Runner.Listener.Configuration.ConfigurationManager.ConfigureAsync(CommandSettings command)
   at GitHub.Runner.Listener.Runner.ExecuteCommand(CommandSettings command)
[2025-01-29 02:11:45Z ERR  Runner] #####################################################
[2025-01-29 02:11:45Z ERR  Runner] System.ComponentModel.Win32Exception (1068): The dependency service or group failed to start.
[2025-01-29 02:11:45Z ERR  Terminal] WRITE ERROR: Cannot start service 'actions.runner.[REPO NAME].JL-WORKBOOK-1485' on computer '.'.
[2025-01-29 02:11:45Z INFO Listener] Runner execution has finished with return code 1
@jlees-intel jlees-intel added the bug Something isn't working label Jan 29, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant