Skip to content

Gitlab docker based runner unable to fetch repo on C3 instance on type on Google Cloud Platform

Platform: GCP

OS description: Canonical, Ubuntu, 22.04 LTS, amd64 jammy image built on 2023-03-02

Gitlab runner version: tested with 15.10 and 15.11

Runner config:

concurrent = 1
check_interval = 0
[[runners]]
  name = "Gitlab Shared CI"
  url = "https://gitxxxx/"
  token = "xxxxxxxxxxx"
  executor = "docker"
  environment = ["DOCKER_HOST=tcp://docker:2375/"]
  [runners.docker]
    tls_verify = false
    image = "docker:stable"
    privileged = true
    disable_cache = true
    volumes = ["/cache"]
    shm_size = 5000000000
  [runners.cache]
    Insecure = false

Problem:

A job, irrespective of which job, running on top of E2, C2 or N1 instance can fetch repo but when we change the instance type to C3 (by shutting down instance and just changing the instance machine type) and rerun the same job it cannot fetch the repo and reports: fatal: unable to access 'https://gitxxxxx/repod.git/': Recv failure: Connection reset by peer

We tested the connectivity from the platform and it passed 100% (https://console.cloud.google.com/net-intelligence/connectivity/tests/list)

We SSHed into the compute instance running the job from the GCP console and tried to clone the repo using git and it could clone without any problem.

Screenshots:

C3 c3

E2 e2