Macos self-hosted runner goes offline intermittently with {"code":401,"message":"Unauthorized"} error message.
Platform Notice: Cloud Only - This article only applies to Atlassian products on the cloud platform.
Summary
Bitbucket Cloud's MacOS runners are intermittently going offline.
Environment
Bitbucket Cloud self-hosted MacOS runners
Diagnosis
By looking at the runner logs, it's possible to see that the runner is receiving the following error message:
1
2
3
4
com.atlassian.pipelines.stargate.client.core.exceptions.StargateUnauthorizedException:
Response Summary: HttpResponseSummary{httpStatusCode=401, httpStatusMessage=Unauthorized,
bodyAsString={"code":401,"message":"Unauthorized"}}
...
Cause
The error above indicates that the host runner was unable to communicate with api.atlassian.com.
A self-hosted runner requires continuous connectivity to the following systems:
Solution
To troubleshoot this issue, please do the following:
1. Check the system logs to determine if you are experiencing internet connectivity issues.
2. Verify if the MacOS machine is going into sleep mode.
To diagnose the connectivity problem, you can perform diagnostic tests on the system endpoints mentioned above. For example, you can run a long-running ping to ensure that the MacOS machine maintains continuous connectivity.
Was this helpful?