Gitlab windows runner failing to run jobs with network bridge not found error

Problem to solve

After getting some problems with multiple jobs using the same repository I decided to upgrade my version of the gitlab runner to 17.5.0. Additionally I wanted this to run without someone needing to log into the machine, so I swapped from Docker Desktop and installed Docker Engine separately. Now whenever I run a job I get this message:

Running with gitlab-runner 17.5.0 (66a723c3)
  on *redacted*, system ID: *redacted*
Preparing the "docker-windows" executor
00:00
Using Docker executor with image mcr.microsoft.com/dotnet/sdk:6.0-windowsservercore-ltsc2022 ...
Pulling docker image mcr.microsoft.com/dotnet/sdk:6.0-windowsservercore-ltsc2022 ...
Using docker image sha256:63ee7360d6b02535ea1966dd2cf2b38d63650481e2ba185a22cbb96c94039c04 for mcr.microsoft.com/dotnet/sdk:6.0-windowsservercore-ltsc2022 with digest mcr.microsoft.com/dotnet/sdk@sha256:2ec36451e33dc5311868351800e55128b98139ea4314efcc749f93ee9e60d49f ...
Preparing environment
00:00
ERROR: Container "de03283ee9389fb8560eb67af7ea7fbd1d853aa846db2f6f8448b16b813f77df" not found or removed. Will retry...
ERROR: Job failed (system failure): prepare environment: Error response from daemon: network bridge not found (exec.go:77:0s). Check https://docs.gitlab.com/runner/shells/index.html#shell-profile-loading for more information

The error makes it look like there is a problem with the shell configuration, which being on Windows gives me the option of powershell or pwsh. I have tried both configurations and neither work. I have also tried unregistering the runner and registering it again and get the same problem.

I have also tried running the runner in debug mode, but that doesn’t give me anymore information than this, so I am now completely stumped.

Configuration

concurrent = 4
check_interval = 0
connection_max_age = "15m0s"
shutdown_timeout = 0

[session_server]
  session_timeout = 1800

[[runners]]
  name = "redacted"
  url = "redacted"
  id = 7
  token = "redacted"
  token_obtained_at = 2024-10-28T14:13:51Z
  token_expires_at = 0001-01-01T00:00:00Z
  executor = "docker-windows"
  shell = "powershell"
  [runners.custom_build_dir]
  [runners.cache]
    MaxUploadedArchiveSize = 0
    [runners.cache.s3]
    [runners.cache.gcs]
    [runners.cache.azure]
  [runners.docker]
    tls_verify = false
    image = "mcr.microsoft.com/windows/servercore:1809"
    privileged = false
    disable_entrypoint_overwrite = false
    oom_kill_disable = false
    disable_cache = false
    volumes = ["c:\\cache"]
    shm_size = 0
    network_mtu = 0

This is my runner toml file, which as I have mentioned I have changed the shell between pwsh and powershell.

Versions

Gitlab version: 17.5.1
Runner version: 17.5.0
Docker version: 27.3.0

  • Self-managed
  • GitLab.com SaaS
  • Dedicated

I have managed to fix this by rolling back the version of the gitlab runner to 17.1.0. It appears that the version I was using can only be used with Linux? At least on the face of it.