Retrieve Logs on a Container Runner

Overview

Sometimes you may run into issues when using our Container Runner feature such as builds not starting, stopping, or failing due to infrastructure issues. The UI may not present helpful information on how to debug these. Luckily, there is a way to retrieve your Container Runner logs to help troubleshoot.

 

How to Access Container Runner Logs

Follow these steps to locate and access the logs for your Container Runner:

1. Locating the Logs

Since the Container Runner operates on your infrastructure, the logs are maintained on the local machine where the runner is installed.

Linux/MacOS:
Logs are often found in standard system log directories such as /var/log/ or in the installation directory.

If you've configured a specific log directory during the installation/setup process, check that location as well.

Windows:
On Windows systems, logs may be located under the installation path specified during your Runner set up and in your config, such as C:\Program Files\CircleCI\

2. Viewing Logs

For real-time log viewing or troubleshooting, you can utilize the following methods:

  • Using Command Line Tools:
    • Linux/MacOS: Use command-line utilities like tail, cat, or less to read log files:
      • bash tail -f /path/to/your/runner/logs/circleci-runner.log
    • Windows: Use PowerShell to access log contents:
      powershell Get-Content -Path "C:\Path\To\Your\Runner\Logs\circleci-runner.log" -Wait
  • Using Service Managers:
    • If your runner is managed by `systemd`, you can use `journalctl` to access logs: bash sudo journalctl -u circleci-container-runner.service

Additional Resources:

Was this article helpful?
0 out of 0 found this helpful

Comments

0 comments

Article is closed for comments.