Skip to content

All jobs start but then fail with winrm errors but I don't have Windows

I'm think that I probably have a configuration wrong but I can't seem to have any jobs complete. The errors that I get are similar to:

Cleaning up project directory and file based variables
00:00
WARNING: Failed to inspect predefined container a2d4e8f0b7a148ce938a4bf271cc74413a20bebd79a36b73c7630ac0fd6af5cf error during connect: Get "http://internal.tunnel.invalid/v1.43/containers/a2d4e8f0b7a148ce938a4bf271cc74413a20bebd79a36b73c7630ac0fd6af5cf/json": winrm tunnel: EOF () (docker_command.go:134:0s)
Using helper image:  registry.gitlab.com/gitlab-org/gitlab-runner/gitlab-runner-helper:x86_64-102c81ba
Authenticating with credentials from job payload (GitLab Registry)
Pulling docker image registry.gitlab.com/gitlab-org/gitlab-runner/gitlab-runner-helper:x86_64-102c81ba ...
WARNING: Failed to pull image with policy "always": error during connect: Post "http://internal.tunnel.invalid/v1.43/images/create?fromImage=registry.gitlab.com%2Fgitlab-org%2Fgitlab-runner%2Fgitlab-runner-helper&tag=x86_64-102c81ba": winrm tunnel: EOF () (manager.go:250:0s)
ERROR: Job failed (system failure): error during connect: Post "http://internal.tunnel.invalid/v1.43/containers/75f1451ace9897809605098f1f46fd48f9542e0964ac86fbf38cf7813d75726b/wait?condition=not-running": winrm tunnel: EOF ()

I have set up my environment with an Amazon Linux 2023 AMI that has docker, GitLab Runner, and the fleeting-plugin-aws installed. I have my main EC2 instance running with that AMI and an Autoscale group setup to spin up machines with that AMI.

Here is my config.toml:

concurrent = 10

[[runners]]
name = "Gitlab Docker Autoscaler"
url = "https://gitlab.com"
token = "my-gitlab-token"
shell = "sh"   # use powershell or pwsh for Windows AMIs

# uncomment for Windows AMIs when the Runner manager is hosted on Linux
# environment = ["FF_USE_POWERSHELL_PATH_RESOLVER=1"]

executor = "docker-autoscaler"

# Docker Executor config
[runners.docker]
image = "busybox:latest"

# Autoscaler config
[runners.autoscaler]
plugin = "fleeting-plugin-aws-linux-amd64"

capacity_per_instance = 1
max_use_count = 1
max_instances = 10

[runners.autoscaler.plugin_config] # plugin specific configuration (see plugin documentation)
name             = "GitLab Runner ASG"               # AWS Autoscaling Group name
region       = "us-east-1"
#profile           = "default"                     # optional, default is 'default'
config_file       = "/home/ec2-user/.aws/config"      # optional, default is '~/.aws/config'
# credentials_file = "/home/user/.aws/credentials" # optional, default is '~/.aws/credentials'

[runners.autoscaler.connector_config]
username          = "ec2-user"
protocol          = "ssh"
key_pathname      = "/home/ec2-user/.ssh/my-key.pem"
#use_external_addr = true

[[runners.autoscaler.policy]]
idle_count = 1
idle_time = "10m0s"

I appreciate any help in resolving this.

To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information