How do we get the logs for a failing launchd service? This is the github-runner service setup by nix-darwin
.
It is surprisingly impossible to find a way to do this. One of the reasons macOS sucks compared to Linux.
$ sudo launchctl kickstart -kp system/org.nixos.github-runner-heist-extra-1
service spawned with pid: 84781
$
And that PID no longer exists after that.
Guess that's why it is failing -- my token expired.
(But can't confirm -- just guessing)
You will have to use either the log
cli command in MacOS, or if you have access to GUI you can use Console app to start filtering all the messages with system/org.nixos.github-runner-heist-extra-1
in it and then kickstart your daemon
If you still don’t see anything, you can try enabling debug
mode first, with launchctl debug
and then start filtering for logs again
Console app never showed any logs for the crashed service, but I'll try the debug
command next time this happens.
Nothing's coming through:
❯ sudo launchctl debug system/org.nixos.github-runner-dioxus-desktop-template-1 --stdout ~/out --stderr ~/err
Service configured for next launch.
And:
srid on appreciate ~/code
❯ sudo launchctl kickstart system/org.nixos.github-runner-dioxus-desktop-template-1
srid on appreciate ~/code
❯ more ~/out
srid on appreciate ~/code
❯ more ~/err
3 messages were moved from this topic to #nixos > Self-hosted GitHub runners by Srid.
The new nix-darwin module writes the log files (see topic referenced above), thus allowing me to not repy on Apple's slipshod tech.
Last updated: Nov 13 2024 at 10:48 UTC