14.3.2 Windows Docker Executor - error during hcsshim::System::CreateProcess

Env

AMI: ami-02d1f8062b6ef46a5 (Windows_Server-2019-English-Core-ContainersLatest-2021.09.15)
Runner: https://gitlab-runner-downloads.s3.amazonaws.com/v14.3.2/binaries/gitlab-runner-windows-amd64.zip

PS C:\Gitlab-Runner> [System.Environment]::OSVersion.Version

Major  Minor  Build  Revision
-----  -----  -----  --------
10     0      17763  0

PS C:\Gitlab-Runner> docker version
Client: Mirantis Container Runtime
 Version:           20.10.7
 API version:       1.41
 Go version:        go1.13.15
 Git commit:        40ef3b6
 Built:             08/19/2021 18:54:26
 OS/Arch:           windows/amd64
 Context:           default
 Experimental:      true

What happened

Registration and install were successful.
Went to run a pipeline and received this error:

ERROR: Job failed (system failure): Error response from daemon: container 0af81a338701780d1e93b72e210a5957ab315a0f0db53cd89d7a6423458c90bf encountered an error during hcsshim::System::CreateProcess: failure in a Windows system call: The system cannot find the file specified. (0x2) (exec.go:57:1s)

Since I am using an updated AMI I figured maybe that’s where the issue is. So I uninstalled 14.3.2 and installed my previous runner 12.10.2 and just like that my pipelines were working again.

So what gives?? Is 14.3.2 incompatible with this windows build?

The issue was that my shell was configured for pwsh instead of powershell. I’m not sure why the default shell was changed.

1 Like

Hi, It seams that the default shell has changed from powershell to pwsh in gitLab-Runner 14.0 and later: Types of shells supported by GitLab Runner | GitLab

Were did you changed the default shell in your environment?

I installed pwsh in my docker image with: RUN choco install -y pwsh

1 Like

Hi team, I don’t know if this is related, but I am getting the following error:

Preparing the "docker-windows" executor
Using Docker executor with image docker:windowsservercore-ltsc2022 ...
Starting service docker:windowsservercore-ltsc2022 ...
Using locally found image version due to "if-not-present" pull policy
Using docker image sha256:723b6471c336c441aa997a1c5d0672ef1de87fe45687edb769c52bd0edce4e81 for docker:windowsservercore-ltsc2022 with digest docker@sha256:8520b3fc85f5fe47604cbba4353f8b2feda30bcf041e26848bd6d812173f4444 ...
ERROR: Preparation failed: Error response from daemon: container 555e9c060cd5c76e135e15f94f092431efc1f5ab682a8c33c318bb0c86b1b856 encountered an error during hcsshim::System::CreateProcess: failure in a Windows system call: The system cannot find the file specified. (0x2) (docker.go:398:18s)

Can you please help?

In the Gitlab Runner config file, it’s configured to pwsh:

  executor = "docker-windows"
  shell = "pwsh"

I tried both pwsh and powershell, originally, the shell statement wasn’t there. But all cases give me the same error :S

1 Like