Skip to content

Commit 0358910

Browse files
authored
Add section for self-hosted runner network check (#24542)
1 parent f96b7ff commit 0358910

File tree

3 files changed

+38
-1
lines changed

3 files changed

+38
-1
lines changed

content/actions/hosting-your-own-runners/about-self-hosted-runners.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ For more information about installing and using self-hosted runners, see "[Addin
5555
You can use any machine as a self-hosted runner as long at it meets these requirements:
5656

5757
* You can install and run the self-hosted runner application on the machine. For more information, see "[Supported architectures and operating systems for self-hosted runners](#supported-architectures-and-operating-systems-for-self-hosted-runners)."
58-
* The machine can communicate with {% data variables.product.prodname_actions %}. For more information, see "[Communication between self-hosted runners and {% data variables.product.prodname_dotcom %}](#communication-between-self-hosted-runners-and-github)."
58+
* The machine can communicate with {% data variables.product.prodname_actions %}. For more information, see "[Communication between self-hosted runners and {% data variables.product.product_name %}](#communication-requirements)."
5959
* The machine has enough hardware resources for the type of workflows you plan to run. The self-hosted runner application itself only requires minimal resources.
6060
* If you want to run workflows that use Docker container actions or service containers, you must use a Linux machine and Docker must be installed.
6161

@@ -125,6 +125,8 @@ Some extra configuration might be required to use actions from {% data variables
125125

126126
{% endif %}
127127

128+
<a name="communication-requirements"></a>
129+
128130
## Communication between self-hosted runners and {% data variables.product.product_name %}
129131

130132
The self-hosted runner polls {% data variables.product.product_name %} to retrieve application updates and to check if any jobs are queued for processing. The self-hosted runner uses a HTTPS _long poll_ that opens a connection to {% data variables.product.product_name %} for 50 seconds, and if no response is received, it then times out and creates a new long poll. The application must be running on the machine to accept and run {% data variables.product.prodname_actions %} jobs.

content/actions/hosting-your-own-runners/monitoring-and-troubleshooting-self-hosted-runners.md

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,38 @@ shortTitle: Monitor & troubleshoot
3333
* **Active**: The runner is currently executing a job.
3434
* **Offline**: The runner is not connected to {% data variables.product.product_name %}. This could be because the machine is offline, the self-hosted runner application is not running on the machine, or the self-hosted runner application cannot communicate with {% data variables.product.product_name %}.
3535

36+
## Checking self-hosted runner network connectivity
37+
38+
You can use the self-hosted runner application's `run` script with the `--check` parameter to check that a self-hosted runner can access all required network services on {% data variables.product.product_location %}.
39+
40+
In addition to `--check`, you must provide two arguments to the script:
41+
42+
* `--url` with the URL to your {% data variables.product.company_short %} repository, organization, or enterprise. For example, `--url https://github.com/octo-org/octo-repo`.
43+
* `--pat` with the value of a personal access token, which must have the `workflow` scope. For example, `--pat ghp_abcd1234`. For more information, see "[Creating a personal access token](/authentication/keeping-your-account-and-data-secure/creating-a-personal-access-token)."
44+
45+
For example:
46+
47+
{% mac %}
48+
49+
{% data reusables.github-actions.self-hosted-runner-check-mac-linux %}
50+
51+
{% endmac %}
52+
{% linux %}
53+
54+
{% data reusables.github-actions.self-hosted-runner-check-mac-linux %}
55+
56+
{% endlinux %}
57+
{% windows %}
58+
59+
```shell
60+
run.cmd --check --url <em>https://github.com/octo-org/octo-repo</em> --pat <em>ghp_abcd1234</em>
61+
```
62+
63+
{% endwindows %}
64+
65+
The script tests each service, and outputs either a `PASS` or `FAIL` for each one. If you have any failing checks, you can see more details on the problem in the log file for the check. The log files are located in the `_diag` directory where you installed the runner application, and the path of the log file for each check is shown in the console output of the script.
66+
67+
If you have any failing checks, you should also verify that your self-hosted runner machine meets all the communication requirements. For more information, see "[About self-hosted runners](/actions/hosting-your-own-runners/about-self-hosted-runners#communication-requirements)."
3668

3769
## Reviewing the self-hosted runner application log files
3870

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
```shell
2+
./run.sh --check --url <em>https://github.com/octo-org/octo-repo</em> --pat <em>ghp_abcd1234</em>
3+
```

0 commit comments

Comments
 (0)