Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[BUG]: "File exists" error on mount creation when trying to run container jobs on self-hosted agent: #5119

Open
1 of 4 tasks
NenoLoje opened this issue Feb 14, 2025 · 0 comments

Comments

@NenoLoje
Copy link

What happened?

The Problem

Can not run linux container job on self-hosted Windows agent

The Error

"Initialize containers" job fails with the following error:

C:\Program Files\Docker\Docker\resources\bin\docker.EXE start 9660a18a6304d3ac00fe93718a0949817af312545ea70a00f0796139cedfab7d
Error response from daemon: error while creating mount source path '/run/desktop/mnt/host/c/Agent2/externals': mkdir /run/desktop/mnt/host/c/Agent2/externals: file exists
Error: failed to start containers: 9660a18a6304d3ac00fe93718a0949817af312545ea70a00f0796139cedfab7d
##[warning]Docker start failed with exit code 1, back off 00:00:10 seconds before retry.

Versions

Azure DevOps

  • Azure DevOps Services org

Machine

  • Windows Server 2022 | Microsoft Windows [Version 10.0.20348.3091]
  • Machine is not domain-joined (workspace mode)

Docker for Windows

  • is running
  • can run containers (manually)
  • docker.EXE version --format '{{.Server.APIVersion}}' = '1.47'

Azure Pipelines agent

  • Agent version: - 4.251.0
  • Agent install directory: c:\Agent2
  • Agent running as:
  • has been added to local group "docker-users"

Container

  • mcr.microsoft.com/dotnet/sdk:8.0

YAML Pipeline:

jobs:
- job: TestContainerJob
  displayName: 'Test Container Job'
  pool:
    name: BuildAgents
  container: mcr.microsoft.com/dotnet/sdk:8.0
  steps:
  - checkout: none
  - script: |
      echo %COMPUTERNAME%

Environment type (Please select at least one enviroment where you face this issue)

  • Self-Hosted
  • Microsoft Hosted
  • VMSS Pool
  • Container

Azure DevOps Server type

dev.azure.com (formerly visualstudio.com)

Azure DevOps Server Version (if applicable)

No response

Operation system

Windows Server 2022

Version controll system

No response

Relevant log output

2025-02-14T10:22:46.9815358Z ##[section]Starting: Initialize containers
2025-02-14T10:22:46.9922310Z DockerActionRetries variable value: True
2025-02-14T10:22:46.9940129Z ##[command]C:\Program Files\Docker\Docker\resources\bin\docker.EXE version --format '{{.Server.APIVersion}}'
2025-02-14T10:22:47.1795576Z '1.47'
2025-02-14T10:22:47.1871134Z Docker daemon API version: '1.47'
2025-02-14T10:22:47.1871976Z ##[command]C:\Program Files\Docker\Docker\resources\bin\docker.EXE version --format '{{.Client.APIVersion}}'
2025-02-14T10:22:47.3373269Z '1.47'
2025-02-14T10:22:47.3459008Z Docker client API version: '1.47'
2025-02-14T10:22:47.3481763Z ##[command]C:\Program Files\Docker\Docker\resources\bin\docker.EXE ps --all --quiet --no-trunc --filter "label=7bf2a3"
2025-02-14T10:22:47.5227934Z ##[command]C:\Program Files\Docker\Docker\resources\bin\docker.EXE network prune --force --filter "label=7bf2a3"
2025-02-14T10:22:47.6700870Z DockerActionRetries variable value: True
2025-02-14T10:22:47.6707988Z ##[command]C:\Program Files\Docker\Docker\resources\bin\docker.EXE pull mcr.microsoft.com/dotnet/sdk:8.0
2025-02-14T10:22:48.5543163Z 8.0: Pulling from dotnet/sdk
2025-02-14T10:22:49.0210424Z Digest: sha256:a617978b6c483cf585feefa648b0d9d53c783b0cbeab59b0c06a2d807b64c4f0
2025-02-14T10:22:49.0416989Z Status: Image is up to date for mcr.microsoft.com/dotnet/sdk:8.0
2025-02-14T10:22:49.0418152Z mcr.microsoft.com/dotnet/sdk:8.0
2025-02-14T10:22:49.0577083Z ##[command]C:\Program Files\Docker\Docker\resources\bin\docker.EXE inspect --format="{{.Os}}" mcr.microsoft.com/dotnet/sdk:8.0
2025-02-14T10:22:49.2974507Z linux
2025-02-14T10:22:49.3284176Z ##[command]C:\Program Files\Docker\Docker\resources\bin\docker.EXE info -f "{{range .Plugins.Network}}{{println .}}{{end}}"
2025-02-14T10:22:49.9090770Z bridge
2025-02-14T10:22:49.9091480Z host
2025-02-14T10:22:49.9092855Z ipvlan
2025-02-14T10:22:49.9093388Z macvlan
2025-02-14T10:22:49.9093847Z null
2025-02-14T10:22:49.9094332Z overlay
2025-02-14T10:22:49.9230392Z ##[command]C:\Program Files\Docker\Docker\resources\bin\docker.EXE network create --label 7bf2a3 vsts_network_505954306d6744759e3009f4d8afc708
2025-02-14T10:22:50.3166509Z f48c336a2a43136eb77acd11e3efc68ae93f59049f20a47e8354b89fa383eaab
2025-02-14T10:22:50.3660567Z ##[command]C:\Program Files\Docker\Docker\resources\bin\docker.EXE inspect --format="{{index .Config.Labels \"com.azure.dev.pipelines.agent.handler.node.path\"}}" mcr.microsoft.com/dotnet/sdk:8.0
2025-02-14T10:22:50.6209746Z ##[command]C:\Program Files\Docker\Docker\resources\bin\docker.EXE create --name 3f4abf185a1244d09e896849952625f4_mcrmicrosoftcomdotnetsdk80_de7e49 --label 7bf2a3 --network vsts_network_505954306d6744759e3009f4d8afc708  -v "C:\Agent2\_work\1":"/__w/1" -v "C:\Agent2\_work\_temp":"/__w/_temp" -v "C:\Agent2\_work\_tasks":"/__w/_tasks" -v "C:\Agent2\_work\_tool":"/__t" -v "C:\Agent2\externals":"/__a/externals":ro -v "C:\Agent2\_work\.taskkey":"/__w/.taskkey" mcr.microsoft.com/dotnet/sdk:8.0 "node" -e "setInterval(function(){}, 24 * 60 * 60 * 1000);"
2025-02-14T10:22:51.5088434Z 8dea58df0f7e266357364935d4d00bfc088b4aa278689290128fc4d24f5f50e9
2025-02-14T10:22:51.5225691Z DockerActionRetries variable value: True
2025-02-14T10:22:51.5242134Z ##[command]C:\Program Files\Docker\Docker\resources\bin\docker.EXE start 8dea58df0f7e266357364935d4d00bfc088b4aa278689290128fc4d24f5f50e9
2025-02-14T10:22:52.5829990Z Error response from daemon: error while creating mount source path '/run/desktop/mnt/host/c/Agent2/externals': mkdir /run/desktop/mnt/host/c/Agent2/externals: file exists
2025-02-14T10:22:52.5830992Z Error: failed to start containers: 8dea58df0f7e266357364935d4d00bfc088b4aa278689290128fc4d24f5f50e9
2025-02-14T10:22:52.5980958Z ##[warning]Docker start failed with exit code 1, back off 00:00:10 seconds before retry.
2025-02-14T10:23:02.6007050Z ##[command]C:\Program Files\Docker\Docker\resources\bin\docker.EXE start 8dea58df0f7e266357364935d4d00bfc088b4aa278689290128fc4d24f5f50e9
2025-02-14T10:23:03.7126885Z Error response from daemon: error while creating mount source path '/run/desktop/mnt/host/c/Agent2/externals': mkdir /run/desktop/mnt/host/c/Agent2/externals: file exists
2025-02-14T10:23:03.7137172Z Error: failed to start containers: 8dea58df0f7e266357364935d4d00bfc088b4aa278689290128fc4d24f5f50e9
2025-02-14T10:23:03.7217336Z ##[warning]Docker start failed with exit code 1, back off 00:00:10 seconds before retry.
2025-02-14T10:23:13.7220999Z ##[command]C:\Program Files\Docker\Docker\resources\bin\docker.EXE start 8dea58df0f7e266357364935d4d00bfc088b4aa278689290128fc4d24f5f50e9
2025-02-14T10:23:14.7745176Z Error response from daemon: error while creating mount source path '/run/desktop/mnt/host/c/Agent2/externals': mkdir /run/desktop/mnt/host/c/Agent2/externals: file exists
2025-02-14T10:23:14.7745884Z Error: failed to start containers: 8dea58df0f7e266357364935d4d00bfc088b4aa278689290128fc4d24f5f50e9
2025-02-14T10:23:14.7916884Z ##[warning]Docker start failed with exit code 1, back off 00:00:10 seconds before retry.
2025-02-14T10:23:24.8183634Z ##[error]Docker start fail with exit code 1
2025-02-14T10:23:24.8189077Z ##[section]Finishing: Initialize containers
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant