Workflow: Rocket Launch Telemetry Demo
Create a workflow file (for example,.github/workflows/launch-telemetry.yml). This workflow triggers on pushes and manual runs, targets a self-hosted runner, and simulates a 60-second rocket launch sequence by printing telemetry every 5 seconds:
- Triggers:
pushandworkflow_dispatch(manual). runs-on: self-hostedexercises your self-hosted runner.timeout-minutes: 10limits maximum job time.- The step prints telemetry lines every 5 seconds for 60 seconds.
main) and start a run (or use the Actions UI to trigger it manually).
Actions UI: canceling a run
Open the workflow run in GitHub Actions. If someone clicks Cancel workflow while the run is in progress, the UI marks the run as canceled and the job log typically includes an “operation was canceled” message. The running step will stop producing additional telemetry lines.
Inspecting the self-hosted runner
Self-hosted runner processes are commonly started with./run.sh. The runner console output shows lifecycle events: connected, listening, running jobs, and job completed/canceled. Example run script output:
- A developer or an API call manually canceled the run.
- The runner process itself exited/stopped while the job was running (e.g., operator stopped it, service restart, system reboot).
Important runner directories: _work and _diag
The two most useful directories inside the runner installation for debugging are:
Example top-level runner layout and
_work listing:
_work to confirm repository content and any runner-generated temporary scripts:
Reviewing diagnostic logs in _diag
The_diag folder contains Runner_*.log and Worker_*.log files and directories with log blocks. These files typically reveal whether the cancellation was a runner disconnect, socket error, or an explicit cancel by a user/API.
Enabling more verbose logs
If logs don’t reveal the cause, enable debug logging for more detail:- Set repository-level secrets
ACTIONS_STEP_DEBUGand/orACTIONS_RUNNER_DEBUGtotrue(use these names exactly). - Re-run the workflow or rerun jobs from the Actions UI.
- Look for additional
##[debug]lines in the workflow log and more verbose entries inRunner_*.logandWorker_*.log.
Check both the Actions UI workflow logs and the runner host directories (
_diag and _work). The UI shows user-facing cancellation; runner logs show whether the runner exited, lost connectivity, or continued to upload logs and cleanup.Debug logs can reveal secrets or sensitive environment values. Enable
ACTIONS_STEP_DEBUG/ACTIONS_RUNNER_DEBUG only in trusted environments and remove the debug secrets when troubleshooting is complete.Troubleshooting checklist (recommended order)
- Reproduce the run and note whether a user/API canceled it via the Actions UI.
- On the self-hosted runner host:
- Check the
run.shconsole for runner start/exit messages. - Inspect
_diag/Runner_*.logandWorker_*.logfor socket/broker errors and “Operation canceled” traces. - Inspect
_workfor the job workspace and any generated temporary scripts to confirm the job’s state at cancellation.
- Check the
- Enable
ACTIONS_STEP_DEBUGand/orACTIONS_RUNNER_DEBUGas repository secrets to collect verbose logs if the cause is unclear. - If the runner process exited unexpectedly, investigate the host OS (systemd logs, resource constraints, OOM kills, or administrative restarts).
- If a user canceled the run, correlate the cancellation timestamp from the Actions UI with runner logs to confirm whether the runner performed uploads and cleanup after the cancel.
_diag and _work folders—will help you determine whether a cancellation was triggered by a user/API call or by runner termination, and will provide diagnostic detail needed to resolve the root cause.