runner: OSX Runner service fails to start

Describe the bug

When I ssh into my OSX box, and try to start the service, I receive the following error: Could not find domain for port (Aqua)

The command I’m running is cd actions-runner && ./svc.sh install

The ./run.sh command works without issue

To Reproduce ./svc.sh start

Expected behavior

  • The service starts
  • Rebooting the machine starts the service automatically

Runner Version and Platform

Version of your runner? osx-x64-2.165.2

OS of the machine running the runner? OSX/Windows/Linux/… OSX Catalina

What’s not working?

Could not find domain for port (Aqua)

Job Log Output

$ ./svc.sh install
Creating launch runner in /Users/xxx/Library/LaunchAgents/actions.runner.xxx-xxx.xxx-build-osx.plist
Creating /Users/xxx/Library/Logs/actions.runner.xxx-xxx.xxx-build-osx
Creating /Users/xxx/Library/LaunchAgents/actions.runner.xxx-xxx.xxx-build-osx.plist
Creating runsvc.sh
Creating .service
svc install complete

Runner and Worker’s Diagnostic Logs

N/A

About this issue

  • Original URL
  • State: closed
  • Created 4 years ago
  • Comments: 19 (2 by maintainers)

Most upvoted comments

Looks like this did the trick for me!

sudo cp {/Users/xxx/Library/LaunchAgents,/Library/LaunchDaemons}/your.plist

I was able to reboot my machine without logging in and see the runner active

This is happening on a fresh macOS install.

This issue is still ongoing - MacOS BigSur 11.4 - even if copying to /Library/LaunchAgents or even the Daemon folder, it still won’t run with the same Aqua domain issue.

Thus, once the agent is INSTALLED, you cannot remove it, nor reconfigure it using the built-in SH commands.

Note, generally speaking, we run 2-3 runners on the same mac machine, so that we can run parallel QA checks and builds - the first agent runs fine, but sequent agents give that same Aqua domain issue.

Hey @TingluoHuang, thanks for checking in on it. I’m ssh-ing, and then running ./svc.sh install so it’s the same user. It’s also the only primary user on the machine. I could give this a try

For anyone who ends up here, launchd can’t load user’s services until it logs in via gui. Auto login feature can help in that case

But it still seems a little off to me

I have solution in https://github.com/actions/runner/pull/1102 please add 👍 to that pull request. Hopefully we can convince the maintainers to merge it.

@ivan-gaydamakin thanks for that feedback. I haven’t given it a try, but that could explain all the keychain headaches I was having 😆