runner-images icon indicating copy to clipboard operation
runner-images copied to clipboard

error during connect: In the default daemon configuration on Windows, the docker client must be run with elevated privileges to connect.

Open since81 opened this issue 1 year ago • 16 comments

Description

About two weeks ago my pipelines were working, yesterday I tried to run but got error for first pwsh task in container:

error during connect: In the default daemon configuration on Windows, the docker client must be run with elevated privileges to connect.: Get "http://%2F%2F.%2Fpipe%2Fdocker_engine/v1.24/containers/fd8ff246ac5cd257090fd89d1c0e2ba694ee3b594be50704744fdb93928b5911/json": open //./pipe/docker_engine: The system cannot find the file specified.

Platforms affected

  • [X] Azure DevOps
  • [ ] GitHub Actions

Runner images affected

  • [ ] Ubuntu 18.04
  • [ ] Ubuntu 20.04
  • [ ] Ubuntu 22.04
  • [ ] macOS 10.15
  • [ ] macOS 11
  • [ ] macOS 12
  • [X] Windows Server 2019
  • [ ] Windows Server 2022

Image version and build link

20220925.1

Is it regression?

20220905.1

Expected behavior

pwsh task executed

Actual behavior

  - pwsh: |
      $tag = '1.0.0'
      Write-Host "Create a build TAG '$tag'"
      Write-Host "##vso[build.addbuildtag]$tag"
    displayName: Set build tag

Starting: Print environment versions
==============================================================================
Task         : PowerShell
Description  : Run a PowerShell script on Linux, macOS, or Windows
Version      : 2.200.0
Author       : Microsoft Corporation
Help         : https://docs.microsoft.com/azure/devops/pipelines/tasks/utility/powershell
==============================================================================
error during connect: In the default daemon configuration on Windows, the docker client must be run with elevated privileges to connect.: Get "[http://%2F%2F.%2Fpipe%2Fdocker_engine/v1.24/containers/fd8ff246ac5cd257090fd89d1c0e2ba694ee3b594be50704744fdb93928b5911/json"](http://%2F%2F.%2Fpipe%2Fdocker_engine/v1.24/containers/fd8ff246ac5cd257090fd89d1c0e2ba694ee3b594be50704744fdb93928b5911/json%22): open //./pipe/docker_engine: The system cannot find the file specified.
##[error]Exit code 1 returned from process: file name 'C:\Windows\system32\docker.EXE', arguments 'exec -i   fd8ff246ac5cd257090fd89d1c0e2ba694ee3b594be50704744fdb93928b5911 C:\__a\externals\node\bin\node.exe C:\__w\_temp\containerHandlerInvoker.js'.
Finishing: Print environment versions

Repro steps

run pipeline:

pool:
  vmImage: "windows-2019"
container: "some_windows_container"


steps:
  - pwsh: |
      $tag = '1.0.0'
      Write-Host "Create a build TAG '$tag'"
      Write-Host "##vso[build.addbuildtag]$tag"
    displayName: Set build tag

since81 avatar Sep 30 '22 11:09 since81

Hey @since81. We will take a look at it.

al-cheb avatar Sep 30 '22 11:09 al-cheb

@since81, What image do you use for container?

pool:
  vmImage: 'windows-2019'

container: mcr.microsoft.com/windows/servercore:ltsc2019

steps:
- powershell: $PSVersionTable

image image

al-cheb avatar Sep 30 '22 11:09 al-cheb

It is build on top of mcr.microsoft.com/dotnet/framework/runtime:4.8-windowsservercore-ltsc2019 plus visual studio 2017 plus pwsh 7.2.6 plus java 11 plus specific software addon to visual studio 2017

since81 avatar Sep 30 '22 11:09 since81

It is build on top of mcr.microsoft.com/dotnet/framework/runtime:4.8-windowsservercore-ltsc2019 plus visual studio 2017 plus pwsh 7.2.6 plus java 11 plus specific software addon to visual studio 2017

Could you share it?

I have tested:

container: mcr.microsoft.com/powershell:windowsservercore-1809

steps:
- pwsh: '$PSVersionTable'

image

al-cheb avatar Sep 30 '22 12:09 al-cheb

Container is successfully initialized for me also, two first steps of checkout is working, but first pwsh failed.

just run:

steps:
  - checkout: self

  - checkout: support
    path: support

  - powershell: $PSVersionTable

  - pwsh: $PSVersionTable

image

since81 avatar Sep 30 '22 12:09 since81

It is in a private repo, I do not know how to copy/past it.

Can you try with? mcr.microsoft.com/dotnet/framework/runtime:4.8-windowsservercore-ltsc2019

since81 avatar Sep 30 '22 12:09 since81

It is in a private repo, I do not know how to copy/past it.

Can you try with? mcr.microsoft.com/dotnet/framework/runtime:4.8-windowsservercore-ltsc2019

Works fine:

image image

al-cheb avatar Sep 30 '22 12:09 al-cheb

I tried, image by image. this working: mcr.microsoft.com/dotnet/framework/runtime:4.8-windowsservercore-ltsc2019 next layer also working: vs2017 + pwsh

but last is not, will try to get a clue what is a difference.

since81 avatar Sep 30 '22 12:09 since81

I do not know what, but something changed in windows-2019 image. I cannot run any image tags which was working before.

Also, I cannot build new image, which I can build on September 19 from same Dockerfile.

since81 avatar Sep 30 '22 13:09 since81

The latest huge change was - https://github.com/actions/runner-images/issues/6181

al-cheb avatar Sep 30 '22 13:09 al-cheb

@since81, any updates?

al-cheb avatar Oct 04 '22 07:10 al-cheb

Hi @al-cheb ,

I am trying to reproduce error with same binaries of docker which ms are using in azure pipelines. And it is working locally.

I will upload today images and will provide access for you to tests, if you do not mind.

My assumption: can it be because of a big image of windows containers: REPOSITORY TAG IMAGE ID CREATED SIZE _development.azurecr.io/visualstudio 15 26419d1ea151 24 hours ago 12.2GB _development.azurecr.io/buildimage 1.2.3 30022df1b543 2 weeks ago 16GB mcr.microsoft.com/dotnet/framework/runtime 4.8-windowsservercore-ltsc2019 4e1a409f4ff5 3 weeks ago 8.16GB

16GB, but we have only 16GB of free space on ms hosted agents?

since81 avatar Oct 05 '22 09:10 since81

Hi @al-cheb,

can you please try with this image, it was working before:

since81 avatar Oct 06 '22 06:10 since81

@since81, I was able to reproduce the issue locally. Looks like the current docker version contains a bug that was fixed in the latest version, I have prepared a PR - https://github.com/actions/runner-images/pull/6360. This fix we are planning to deploy next week.

al-cheb avatar Oct 06 '22 10:10 al-cheb

Hi @al-cheb,

thank you for your help and effort.

do you still have plan release new images this week?

since81 avatar Oct 13 '22 13:10 since81

@since81, The Win19 deployment is on track - https://github.com/actions/runner-images/pull/6406. I hope we will finish the deployment by Tuesday.

al-cheb avatar Oct 14 '22 11:10 al-cheb

Hi @al-cheb, with new vetsion of image everything working fine. Thank you!

since81 avatar Oct 16 '22 19:10 since81

Hi I am new to docker and just tried to follow the tutorial from docker.com and got the exact same issue, when running docker build -t getting-started . as described here https://docs.docker.com/get-started/02_our_app/

Error is error during connect: In the default daemon configuration on Windows, the docker client must be run with elevated privileges to connect.: Post "http://%2F%2F.%2Fpipe%2Fdocker_engine/v1.24/build?buildargs=%7B%7D&cachefrom=%5B%5D&cgroupparent=&cpuperiod=0&cpuquota=0&cpusetcpus=&cpusetmems=&cpushares=0&dockerfile=Dockerfile&labels=%7B%7D&memory=0&memswap=0&networkmode=default&rm=1&shmsize=0&t=getting-started&target=&ulimits=null&version=1": open //./pipe/docker_engine: The system cannot find the file specified.

How should I solve this?

magnus-book-sb avatar Nov 02 '22 09:11 magnus-book-sb

getting-started

@magnus-book-sb , Please attach your Dockerfile.

al-cheb avatar Nov 02 '22 09:11 al-cheb

This is the dockerfile that was instructed to be created in the tutorial. I had to rename it to .txt since github does not allow plain dockerfile to be attached.

Dockerfile.txt

magnus-book-sb avatar Nov 02 '22 09:11 magnus-book-sb

This is the dockerfile that was instructed to be created in the tutorial. I had to rename it to .txt since github does not allow plain dockerfile to be attached.

Dockerfile.txt

Currently, it's not possible to run linux containers on Windows hosted agents.

al-cheb avatar Nov 02 '22 09:11 al-cheb

So what am I doing wrong? How can I run the tutorial?

magnus-book-sb avatar Nov 02 '22 09:11 magnus-book-sb

So what am I doing wrong? How can I run the tutorial?

You should use Ubuntu hosted agents to run linux containers.

al-cheb avatar Nov 02 '22 09:11 al-cheb

You should use Ubuntu hosted agents to run linux containers.

Sorry I am new to this and I am not following, do you mean I cannot use windows at all to run docker containers? The following command docker version also gives me the same error, is that expected?

magnus-book-sb avatar Nov 02 '22 10:11 magnus-book-sb

You should use Ubuntu hosted agents to run linux containers.

Sorry I am new to this and I am not following, do you mean I cannot use windows at all to run docker containers? The following command docker version also gives me the same error, is that expected?

Please share a link of the failed build.

al-cheb avatar Nov 02 '22 10:11 al-cheb