Skip to content

session server health check: ERROR: Mux handler not found

Summary

When the runner is configured with the session server and is behind a reverse proxy or load balancer, the load balancer defaults to a health check at /. GitLab returns a 404 and spams the logs with "ERROR: Mux handler not found". There should be a health check endpoint that returns a 200 without spamming the runner logs.

Steps to reproduce

  1. Configure the session server in the runner
  2. Configure a load balancer with default health check /

Actual behavior

Runner returns a 404 and logs "ERROR: Mux handler not found builds=0 uri=/"

Expected behavior

Runner returns a 204 or 200 and logs a debug message.

Environment description

config.toml contents
# config.toml
[session_server]
  listen_address = "0.0.0.0:8093"
  advertise_address = "runner-0.<fqdn>:443"
  session_timeout = 1800

Used GitLab Runner version

Possible fixes

Anyone of these:

  • Add a route / that returns a 200 or 204 and logs a debug message.
  • Add a route /healthcheck that returns a 204 and include in documentation.