# Self hosted mac runner, agent shuts down as soon as it starts

**URL:** <https://discuss.circleci.com/t/self-hosted-mac-runner-agent-shuts-down-as-soon-as-it-starts/47143>\
**Category:** Build Environment\
**Tags:** macos, machine-executor\
**Created:** [February 20, 2023, 11:24pm UTC](https://discuss.circleci.com/t/self-hosted-mac-runner-agent-shuts-down-as-soon-as-it-starts/47143 "2023-02-20T23:24:24Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![raza-jamil-reckon](https://sea2.discourse-cdn.com/circleci/user_avatar/discuss.circleci.com/raza-jamil-reckon/32/32398_2.png) [@raza-jamil-reckon](https://discuss.circleci.com/u/raza-jamil-reckon)\
**Post date:** [February 20, 2023, 11:24pm UTC](https://discuss.circleci.com/t/self-hosted-mac-runner-agent-shuts-down-as-soon-as-it-starts/47143/1 "2023-02-20T23:24:24Z")

</div>

I’m trying to set up a self hosted mac runner to run our mobile pipelines. I’ve setup an M1 MBP(Ventura 13.0.1) per [this](https://circleci.com/docs/runner-installation-mac/) document.When I start the agent (the last step in the setup link) it starts up successfully and immediately shuts down. Here’s what the logs say:

```auto
2023-02-21 08:10:46.944262 (system/com.circleci.runner [21737]) <Notice>: internal event: SPAWNED, code = 0
2023-02-21 08:10:46.944269 (system/com.circleci.runner [21737]) <Notice>: service state: xpcproxy
2023-02-21 08:10:46.944276 (system/com.circleci.runner [21737]) <Notice>: deferred event: domain spawn response: 0
2023-02-21 08:10:46.944284 (system/com.circleci.runner [21737]) <Notice>: internal event: SOURCE_ATTACH, code = 0
2023-02-21 08:10:46.952644 (system/com.circleci.runner [21737]) <Notice>: service state: running
2023-02-21 08:10:46.952665 (system/com.circleci.runner [21737]) <Notice>: internal event: INIT, code = 0
2023-02-21 08:10:46.952681 (system/com.circleci.runner [21737]) <Notice>: Successfully spawned circleci-launch-agent[21737] because inefficient
2023-02-21 08:10:46.960455 (pid/21737 [circleci-launch]) <Notice>: uncorking exec source upfront
2023-02-21 08:10:46.960478 (pid/21737 [circleci-launch]) <Notice>: created
2023-02-21 08:10:46.967048 (system/com.circleci.runner [21737]) <Notice>: exited due to exit(1)
2023-02-21 08:10:46.967073 (system/com.circleci.runner [21737]) <Notice>: service state: exited
2023-02-21 08:10:46.967080 (system/com.circleci.runner [21737]) <Notice>: internal event: EXITED, code = 0
2023-02-21 08:10:46.967085 (system) <Notice>: service inactive: com.circleci.runner
2023-02-21 08:10:46.967089 (system/com.circleci.runner [21737]) <Notice>: service state: not running
2023-02-21 08:10:46.967096 (system/com.circleci.runner) <Notice>: Service only ran for 0 seconds. Pushing respawn out by 3 seconds.
2023-02-21 08:10:46.967165 (system/com.circleci.runner) <Notice>: internal event: WILL_SPAWN, code = 0
2023-02-21 08:10:46.967184 (system/com.circleci.runner) <Notice>: service state: spawn scheduled
2023-02-21 08:10:46.967187 (system/com.circleci.runner) <Notice>: service throttled by 3 seconds
2023-02-21 08:10:46.967195 (pid/21737 [circleci-launch]) <Notice>: shutting down
2023-02-21 08:10:46.967203 (pid/21737 [circleci-launch]) <Notice>: cleaning up

```

I’ve tried googling and going through these forums but I couldn’t find any clues or info. Any help is appreciated.

---

<div class="post-metadata">

**Author:** ![owenjoliver](https://sea2.discourse-cdn.com/circleci/user_avatar/discuss.circleci.com/owenjoliver/32/28293_2.png) [@owenjoliver](https://discuss.circleci.com/u/owenjoliver)\
**Post date:** [March 8, 2023, 4:05pm UTC](https://discuss.circleci.com/t/self-hosted-mac-runner-agent-shuts-down-as-soon-as-it-starts/47143/2 "2023-03-08T16:05:00Z")

</div>

Hello

Would it be possible to confirm the version of the `./download-launch-agent.sh` that was downloaded as you are on a m1 can you confirm you downloaded

```auto
# For macOS M1:
export platform=darwin/arm64 && sh ./download-launch-agent.sh

```

Would it be possible to share if you changed any settings within the `launch-agent-config.yaml` if so what did you set?

Finally, would it be possible to run the commands from the troubleshooting guide linked below to see if this resolves your issues.

> **[Troubleshoot self-hosted runner - CircleCI](https://circleci.com/docs/troubleshoot-self-hosted-runner/#machine-runner)**
>
> Errors and troubleshooting methods for container and machine runners.

Kind Regards  
Owen Oliver

---

<div class="post-metadata">

**Author:** ![raza-jamil-reckon](https://sea2.discourse-cdn.com/circleci/user_avatar/discuss.circleci.com/raza-jamil-reckon/32/32398_2.png) [@raza-jamil-reckon](https://discuss.circleci.com/u/raza-jamil-reckon)\
**Post date:** [April 6, 2023, 12:34am UTC](https://discuss.circleci.com/t/self-hosted-mac-runner-agent-shuts-down-as-soon-as-it-starts/47143/3 "2023-04-06T00:34:18Z")

</div>

Hi Owner,

It turned out to be a silly issue. I copy pasted the launch-agent-file but forgot to change the domain so it was using something like [example.circleci.com](http://example.circleci.com) to connect which obviously wouldn’t work.

Regards,  
Raza
