<p>There were several errors.</p>
<ol>
<li>The log files weren't writable. Either set permissions or change to some writable place. I set it <code>/Users/$USERNAME/.gitlab-runner/gitlab-runner.{out,err}.log</code></li>
<li>Ran the bootstrap commands the local terminal suggested that ssh never presented even with identical commands. (I hate this, I have no clue why it is different, but it is).</li>
<li>Copied the [[runners]] section from the <code>/etc/gitlab-runner/config.toml</code> to <code>/Users/$USERNAME/.gitlab-runner/config.toml</code>.</li>
</ol>
<p>After that I issude <code>gitlab-runner stop</code> and <code>gitlab-runner start</code> and checked the GitLab web UI and the runners were connected.</p>

CC BY-SA 4.0
2023-05-10T04:42:19.753Z
2023-05-10T04:42:19.753Z
Sqeaky
<p>I have a pair of Mac Minis with M2 processors that I am trying to setup as runners on a locally hosted gitlab setup. For a variety of other systems I simply followed the instructions on the runners page. When I select Mac and Arm64 here are the instructions I see:</p>
<blockquote>
<p>Download and install binary</p>
</blockquote>
<pre><code># Download the binary for your system
sudo curl --output /usr/local/bin/gitlab-runner https://gitlab-runner-downloads.s3.amazonaws.com/latest/binaries/gitlab-runner-darwin-arm64`

# Give it permission to execute
sudo chmod +x /usr/local/bin/gitlab-runner

# The rest of the commands execute as the user who will run the runner
# Register the runner (steps below), then run
cd ~
gitlab-runner install
gitlab-runner start
</code></pre>
<blockquote>
<p>Command to register runner</p>
</blockquote>
<pre><code>gitlab-runner register --url https://gitlab.blacktoppstudios.com/ --registration-token Fj3n5ngFakeToken
</code></pre>
<p>I needed to create the output folder for the download from AWS, but that seemed to work. But when I try to do <code>gitlab-runner start</code> I get the following error:</p>
<blockquote>
<p>FATAL: Failed to start gitlab-runner: exit status 134</p>
</blockquote>
<p>I couldn't see any results for exist status 134. A number of people had issues with the log files not being writable. I tried setting permissions on the log files and get the same error. If I change the log file location there is no apparent effect also.</p>
<p>I tried to perform the registration step and this appeared to work and create the toml file but didn't change the error message.</p>
<p>If I copy the command out of the file plist file at <code>~/Library/LaunchAgents/gitlab-runner.plist</code> and add <code>--debug</code> I get this command:</p>
<blockquote>
<p>% /usr/local/bin/gitlab-runner --debug run --working-directory /Users/cisadmin  --config /Users/cisadmin/.gitlab-runner/config.toml --service gitlab-runner --syslog</p>
</blockquote>
<p>and that gives me this:</p>
<pre><code>Runtime platform                                    arch=arm64 os=darwin pid=2562 revision=436955cb version=15.11.0
Starting multi-runner from /Users/cisadmin/.gitlab-runner/config.toml...  builds=0
Checking runtime mode                               GOOS=darwin uid=501
WARNING: Running in user-mode.                     
WARNING: Use sudo for system-mode:                 
WARNING: $ sudo gitlab-runner...                   
                                                   
Configuration loaded                                builds=0
listenaddress: &quot;&quot;
sessionserver:
  listenaddress: &quot;&quot;
  advertiseaddress: &quot;&quot;
  sessiontimeout: 1800
concurrent: 1
checkinterval: 0
loglevel: null
logformat: null
user: &quot;&quot;
runners: []
sentrydsn: null
modtime: 2023-05-09T16:43:47.632488987-05:00
loaded: true
shutdowntimeout: 0
  builds=0
Waiting for stop signal                             builds=0
listen_address not defined, metrics &amp; debug endpoints disabled  builds=0
[session_server].listen_address not defined, session endpoints disabled  builds=0
Initializing executor providers                     builds=0
Feeding runners to channel                          builds=0
Starting worker                                     builds=0 worker=0
Feeding runners to channel                          builds=0
</code></pre>
<p>The <code>listen_address not defined</code> has me concerned but I have no further insight into what this means or how to troubleshoot it. I would appreciate any insight on how to approach <code>Failed to start gitlab-runner: exit status 134</code>.</p>
<p>EDIT - Some Docs suggested that local terminal have different permissions somehow than ssh connections. Well I tried following the steps from a local prompt and rebooted and now <code>gitlab-runner status</code> says that it is running, but it still isn't showing as connected from the runners listing  on the gitlab web ui.</p>
<p>I looked into the config.toml and it is missing the [[runners]] section. I tried creating one by copying and adapting from a</p>

<gitlab><gitlab-ci-runner><macos>
Gitlab Runner setup issues on Mac Mini with M2 processor
Sqeaky
# Gitlab Runner setup issues on Mac Mini with M2 processor

(Asked by: username_0 on 2023-05-10)

I have a pair of Mac Minis with M2 processors that I am trying to setup as runners on a locally hosted gitlab setup. For a variety of other systems I simply followed the instructions on the runners page. When I select Mac and Arm64 here are the instructions I see:

Download and install binary

# Download the binary for your system
sudo curl --output /usr/local/bin/gitlab-runner https://gitlab-runner-downloads.s3.amazonaws.com/latest/binaries/gitlab-runner-darwin-arm64`

# Give it permission to execute
sudo chmod +x /usr/local/bin/gitlab-runner

# The rest of the commands execute as the user who will run the runner
# Register the runner (steps below), then run
cd ~
gitlab-runner install
gitlab-runner start


Command to register runner

gitlab-runner register --url https://gitlab.blacktoppstudios.com/ --registration-token Fj3n5ngFakeToken

I needed to create the output folder for the download from AWS, but that seemed to work. But when I try to do gitlab-runner start I get the following error:

FATAL: Failed to start gitlab-runner: exit status 134

I couldn't see any results for exist status 134. A number of people had issues with the log files not being writable. I tried setting permissions on the log files and get the same error. If I change the log file location there is no apparent effect also.
I tried to perform the registration step and this appeared to work and create the toml file but didn't change the error message.
If I copy the command out of the file plist file at ~/Library/LaunchAgents/gitlab-runner.plist and add --debug I get this command:

% /usr/local/bin/gitlab-runner --debug run --working-directory /Users/cisadmin  --config /Users/cisadmin/.gitlab-runner/config.toml --service gitlab-runner --syslog

and that gives me this:
Runtime platform                                    arch=arm64 os=darwin pid=2562 revision=436955cb version=15.11.0
Starting multi-runner from /Users/cisadmin/.gitlab-runner/config.toml...  builds=0
Checking runtime mode                               GOOS=darwin uid=501
WARNING: Running in user-mode.                     
WARNING: Use sudo for system-mode:                 
WARNING: $ sudo gitlab-runner...                   
                                                   
Configuration loaded                                builds=0
listenaddress: ""
sessionserver:
  listenaddress: ""
  advertiseaddress: ""
  sessiontimeout: 1800
concurrent: 1
checkinterval: 0
loglevel: null
logformat: null
user: ""
runners: []
sentrydsn: null
modtime: 2023-05-09T16:43:47.632488987-05:00
loaded: true
shutdowntimeout: 0
  builds=0
Waiting for stop signal                             builds=0
listen_address not defined, metrics & debug endpoints disabled  builds=0
[session_server].listen_address not defined, session endpoints disabled  builds=0
Initializing executor providers                     builds=0
Feeding runners to channel                          builds=0
Starting worker                                     builds=0 worker=0
Feeding runners to channel                          builds=0

The listen_address not defined has me concerned but I have no further insight into what this means or how to troubleshoot it. I would appreciate any insight on how to approach Failed to start gitlab-runner: exit status 134.
EDIT - Some Docs suggested that local terminal have different permissions somehow than ssh connections. Well I tried following the steps from a local prompt and rebooted and now gitlab-runner status says that it is running, but it still isn't showing as connected from the runners listing  on the gitlab web ui.
I looked into the config.toml and it is missing the [[runners]] section. I tried creating one by copying and adapting from a

**Tags:** gitlab, gitlab-ci-runner, macos


---

## 1 answers

### Answer by username_0 on 2023-05-10. Score: 1 | Accepted answer

There were several errors.

1. The log files weren't writable. Either set permissions or change to some writable place. I set it `/Users/$USERNAME/.gitlab-runner/gitlab-runner.{out,err}.log`
2. Ran the bootstrap commands the local terminal suggested that ssh never presented even with identical commands. (I hate this, I have no clue why it is different, but it is).
3. Copied the [[runners]] section from the `/etc/gitlab-runner/config.toml` to `/Users/$USERNAME/.gitlab-runner/config.toml`.

After that I issude `gitlab-runner stop` and `gitlab-runner start` and checked the GitLab web UI and the runners were connected.


---

