question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

`Load failed: 5: Input/output error` on ./svc.sh run | Mac Big Sur Issues?

See original GitHub issue

Describe the bug Just deployed 2 new self-hosted runners on Mac Minis, I get the error Load failed: 5: Input/output error when I install and then start the runner as a service. Interestingly the service appears to start and the runner appears online on github.com Silicon Intel OS Version Big Sur 11.2.3

To Reproduce

  1. Install the latest self-hosted runner (v2.278.0 at the time of writing) and setup the runner ./config.sh --url $URL --token $TOKEN
  2. Install the runner as a service ./svc.sh install
  3. Run the service ./svc.sh run

Expected behavior No error is posted

Runner Version and Platform

Silicon Intel OS Version Big Sur 11.2.3 Runner Version v2.278.0

What’s not working?

The runner appears to register with github and take work, currently testing to see if there is any functional issues, will update

Job Log Output

I’ve replaced our actual org and hostname values with $org and $hostname

starting actions.runner.$org.$hostname
Load failed: 5: Input/output error
status actions.runner.$org.$hostname:

/Users/runner/Library/LaunchAgents/actions.runner.$org.$hostname.plist

Started:
512 0 actions.runner.$org.$hostname

Runner and Worker’s Diagnostic Logs

If you google load failed 5 input/output error you will find lots of posts about this error on a wide array of software being installed as a service with lots of references to Big Sur. Something has changed in relation to Big Sur and services and the plist that gets auto generated by the service install script and / or the values within the plist no longer being valid for some reason.

Example Search Results https://developer.apple.com/forums/thread/665661 https://www.reddit.com/r/MacOS/comments/kbko61/launchctl_broken/ https://www.reddit.com/r/MacOS/comments/kbko61/launchctl_broken/gpv2to1/

EDIT

It looks like launchctl load | unload are now legacy commands, the svc.sh script probably needs looking to setup / run the service in a > Big sur compliant way?

https://ss64.com/osx/launchctl.html

Subcommands from the previous implementation of launchd are generally
available, though some may be unimplemented. Unimplemented subcommands
are documented as such.

load | unload [-wF] [-S sessiontype] [-D searchpath] paths ...
        Load the specified configuration files or directories of
        configuration files.  Jobs that are not on-demand will be started
        as soon as possible. All specified jobs will be loaded before any
        of them are allowed to start. Note that per-user configuration
        files (LaunchAgents) must be owned by root (if they are located
        in /Library/LaunchAgents) or the user loading them (if they are
        located in $HOME/Library/LaunchAgents).  All system-wide daemons
        (LaunchDaemons) must be owned by root. Configuration files must
        disallow group and world writes. These restrictions are in place
        for security reasons, as allowing writability to a launchd
        configuration file allows one to specify which executable will be
        launched.

Issue Analytics

  • State:open
  • Created 2 years ago
  • Reactions:11
  • Comments:20 (1 by maintainers)

github_iconTop GitHub Comments

11reactions
brandonbirdjcommented, May 20, 2021

I had a similar sounding issue that does appear to be related to the launchctl update issues. From what I understand on https://babodee.wordpress.com/2016/04/09/launchctl-2-0-syntax/ using load is now replaced with bootstrap however that alone was not my issue.

The issue I found is that load and bootstrap both require the user to be in a gui session to configure them. I originally was only configuring over ssh. Running ./svc.sh start over vnc in a terminal session worked for me.

I would like to see the setup script modified to use the newer launchctl settings and configure it to run in the user/ domain instead of gui/ that way it can be configured solely over ssh.

5reactions
c3-kaspesicommented, Jun 21, 2022

This is also an issue with monterey on ec2 mac metal instance

Command: ./svc.sh start Result:

starting actions.runner.X
Load failed: 5: Input/output error
Try running `launchctl bootstrap` as root for richer errors.
status actions.runner.X:

/Users/ec2-user/Library/LaunchAgents/actions.runner.X.plist

Stopped

ec2-user@X actions-runner % launchctl list | grep action
(Didnt start)
Read more comments on GitHub >

github_iconTop Results From Across the Web

Big Sur - LaunchAgents - Load error 5: input/output error
I am having a mysterious problem trying to load a user LaunchAgent under Big Sur - It is the .plist of gniemetz's automount.sh...
Read more >
brew services. Cant start service. get "Bootstrap failed: 5
plist` exited with 5. I recently upgraded macOs to BigSur 11.5. 2. Ive uninstall and reinstalled homebrew and xcode.
Read more >
launchctl broken? : r/MacOS
"Load failed: 5: Input/output error"." I've tried manually loading some of the existing plists on my system and they give the same error....
Read more >
Enable/load .plist issue after Big Sur update - Ask Different
Load and unload give Input/Output errors. I have a script that runs every 30 minutes during the day. It is located in ~/Library/LaunchAgents...
Read more >
gitlab runner doesn't start on boot on M1 Mac (#28389)
This error is due to where the LaunchAgent is configured to write files containing stdout and stderr. When installing the runner, it is ......
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found