# Beginning around June 14, MacOS self-hosted runners are failing with 400-Bad Request

**URL:** <https://discuss.circleci.com/t/beginning-around-june-14-macos-self-hosted-runners-are-failing-with-400-bad-request/44518>\
**Category:** Build Environment\
**Tags:** macos\
**Created:** [June 22, 2022, 3:03pm UTC](https://discuss.circleci.com/t/beginning-around-june-14-macos-self-hosted-runners-are-failing-with-400-bad-request/44518 "2022-06-22T15:03:05Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![nick-fields](https://sea2.discourse-cdn.com/circleci/user_avatar/discuss.circleci.com/nick-fields/32/30445_2.png) [@nick-fields](https://discuss.circleci.com/u/nick-fields)\
**Post date:** [June 22, 2022, 3:03pm UTC](https://discuss.circleci.com/t/beginning-around-june-14-macos-self-hosted-runners-are-failing-with-400-bad-request/44518/1 "2022-06-22T15:03:05Z")

</div>

Starting last week, we’ve had a lot of issues with our small fleet of self hosted MacOS runners. First it appeared that an automatic upgrade failed, then once that issue was resolved we’re now seeing the issue of runners showing as active from within CircleCI, but the runner never processes jobs. The runner logs are full of the following error, which seems to be the root cause:

time=“2022-06-15T07:21:40-04:00” level=error msg=“error running task” error=“unexpected error claiming task: server supplied detail: hostname not valid (400-Bad Request)”

Versions  
MacOS: arm64 on Monterey 12.3.1  
Runners: 1.0.39853-df56b3e

---

<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:** [July 6, 2022, 2:22pm UTC](https://discuss.circleci.com/t/beginning-around-june-14-macos-self-hosted-runners-are-failing-with-400-bad-request/44518/2 "2022-07-06T14:22:32Z")

</div>

Hello Nick

I just wanted to follow up on this post in case others run into the same issue.

This issue was due to an issue on CircleCI in regards to the hostname that was being used.

This issue has now been resolved but if anyone else runs into a similar issue please feel free to raise a support ticket linked [here](https://support.circleci.com/hc/en-us)

Kind Regards  
Owen Oliver

---

<div class="post-metadata">

**Author:** ![rit1010](https://sea2.discourse-cdn.com/circleci/user_avatar/discuss.circleci.com/rit1010/32/34738_2.png) [@rit1010](https://discuss.circleci.com/u/rit1010)\
**Post date:** [July 6, 2022, 6:37pm UTC](https://discuss.circleci.com/t/beginning-around-june-14-macos-self-hosted-runners-are-failing-with-400-bad-request/44518/3 "2022-07-06T18:37:32Z")

</div>

I guess the question is what changes have you made as self-hosted runners are now reporting

Agent download unsuccessful.  
error: allocation=“7OUPNF54” download failed: error downloading task agent version=“1.0.132505-9428cda7” os=“linux” arch=“amd64”: could not write file “/tmp/circleci-launch-agent3989761449/circleci-agent/1.0.132505-9428cda7/linux/amd64/circleci-agent.tmp”: context deadline exceeded (Client.Timeout or context cancellation while reading body)

The whole path is created but no file is retrieved.

---

<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:** [July 27, 2022, 1:47pm UTC](https://discuss.circleci.com/t/beginning-around-june-14-macos-self-hosted-runners-are-failing-with-400-bad-request/44518/4 "2022-07-27T13:47:41Z")

</div>

Hello

There was an issue around this time where folder permissions were changed but they are not updated fully within the update causing it to fail as you have seen.

This has now been resolved and should no longer be causing an issue but if you are still having issues you can manually run

```auto
chown -R circleci:circleci /var/opt/circleci

```

This will allow the update to install

Kind Regards  
Owen Oliver
