简体   繁体   中英

FATAL: Failed to start gitlab-runner: "launchctl" failed with stderr: Load failed: 5: Input/output error

After installing and registering gitlab-runner, when I'm running gitlab-runner start I get this error message. What will be the reason for this?

Runtime platform                                    arch=amd64 os=darwin pid=65915 revision=c1edb478 version=14.0.1
FATAL: Failed to start gitlab-runner: "launchctl" failed with stderr: Load failed: 5: Input/output error

I edited the /Users/USERNAME/Library/LaunchAgents/gitlab-runner.plist file and changed the location of the log files to a location writeable by my user:

<key>StandardOutPath</key>
    <string>/Users/USERNAME/.gitlab-runner/gitlab-runner.out.log</string>
<key>StandardErrorPath</key>
    <string>/Users/USERNAME/.gitlab-runner/gitlab-runner.err.log</string>

Then issued a

launchctl unload /Users/USERNAME/Library/LaunchAgents/gitlab-runner.plist
launchctl load -w /Users/USERNAME/Library/LaunchAgents/gitlab-runner.plist
gitlab-runner stop
gitlab-runner start
gitlab-runner status

And the service is up and running

For more info: https://gitlab.com/gitlab-org/gitlab-runner/-/issues/28136

cd ~

sudo chmod +x /usr/local/bin/gitlab-runner

gitlub-runner start

为我工作

gitlab-runner uninstall
gitlab-runner install
gitlab-runner start

fixed it for me, as stated here: https://docs.gitlab.com/runner/install/osx.html#upgrade-the-service-file

I installed with brew and getting same error when I tried

gitlab-runner start

I have to start the runner service with brew and it worked

brew services restart gitlab-runner

在此处输入图片说明

Seeming your runner running in a non-sudo, bring the gitlab-runner daemon can't write log to the path that requires sudo permission. For example, the path in my Mac OS "/usr/local/var/log/gitlab-runner.out.log".

I had this on an M1 Mac. I had to install the M1 specific version of the GitLab Runner: https://gitlab.com/gitlab-org/gitlab-runner/-/issues/26561

Check that exist directory /usr/local/var If not, create it

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM