Closed joel-schaal closed 1 year ago
Based on the comment in the referenced issue, it appears that concurrently running Linux containers and Windows containers on a Windows 10 computer is not well supported by Docker.
concurrently running Linux containers and Windows containers on a Windows 10 computer is not well supported
I am not sure... The following works well
docker run -i --rm --name agent1 --init -v agent1-workdir:C:/Users/jenkins/Work jenkins/agent:jdk11-windowsservercore-ltsc2019 java -jar C:/ProgramData/Jenkins/agent.jar -workDir C:/Users/jenkins/Work
What I don't understand is why I can't do the same from the Jenkins master directly... And what is this missing file in the error log ?!
It would be easier if I knew the command that was sent from Jenkins to Docker Desktop.
I'm closing this issue for the following reasons:
jenkins/agent
image, but more about Docker usage on Windows network (Docker Desktop creates a VM either Hyper-V or WSL as for today).@joel-schaal if you still have the issue, do you mind switching to community.jenkins.io? That would grant you way more people to help you as this issue tracker is scoped to the jenkins/agent
image only (feature requests/bugs).
Of course, if you are able to provide new elements that shows it is a problem with the image, feel free to reopen!
Version report
Jenkins and plugins versions report:
Prerequisite
Reproduction steps
jenkins/jenkins:latest
)tcp://host.docker.internal:2375
windows
jenkins/agent:jdk11-nanoserver-1809
C:\Users\Jenkins
Results
Expected result:
Have a node started, the pipeline would run on it and display "Hello World" in the execution logs.
Actual result:
The following messages appears in System Log:
Oct 16, 2021 2:39:22 AM SEVERE com.nirima.jenkins.plugins.docker.DockerCloud$1 run Error in provisioning; template='DockerTemplate{configVersion=2, labelString='windows', connector=DockerComputerAttachConnector{}, remoteFs='C:\Users\Jenkins', instanceCap=2, mode=NORMAL, retentionStrategy=com.nirima.jenkins.plugins.docker.strategy.DockerOnceRetentionStrategy@29, dockerTemplateBase=DockerTemplateBase{image='jenkins/agent:jdk11-nanoserver-1809', environment=[FS_DIR=C:/ProgramData/Jenkins, JAR_NAME=agent.jar], bindAllPorts=false, cpuPeriod=0, cpuQuota=0, privileged=false, tty=false}, removeVolumes=false, stopTimeout=1000, pullStrategy=PULL_ALWAYS, pullTimeout=300, nodeProperties=[hudson.slaves.EnvironmentVariablesNodeProperty@b2202fe], disabled=BySystem,0 ms,29 sec,Template provisioning failed., name='win'}' for cloud='docker' com.github.dockerjava.api.exception.BadRequestException: {"message":"container 33adda5798db4ef2f0695cd966a2158361fea5e9b23cbca570dd202649c5a80f encountered an error during hcsshim::System::CreateProcess: failure in a Windows system call: The system cannot find the file specified. (0x2)\n[Event Detail: Provider: 00000000-0000-0000-0000-000000000000]\n[Event Detail: Provider: 00000000-0000-0000-0000-000000000000]\n[Event Detail: onecore\vm\compute\management\orchestration\vmhostedcontainer\processmanagement.cpp(173)\vmcomputeagent.exe!00007FF70F4C9F4B: (caller: 00007FF70F47E13A) Exception(6) tid(38c) 80070002 The system cannot find the file specified.\r\n CallContext:[\Bridge_ProcessMessage\VmHostedContainer_ExecuteProcess] \n Provider: 00000000-0000-0000-0000-000000000000]"}
Oct 16, 2021 2:39:29 AM WARNING hudson.slaves.NodeProvisioner update Unexpected exception encountered while provisioning agent Image of jenkins/agent:jdk11-nanoserver-1809 com.github.dockerjava.api.exception.BadRequestException: {"message":"container 33adda5798db4ef2f0695cd966a2158361fea5e9b23cbca570dd202649c5a80f encountered an error during hcsshim::System::CreateProcess: failure in a Windows system call: The system cannot find the file specified. (0x2)\n[Event Detail: Provider: 00000000-0000-0000-0000-000000000000]\n[Event Detail: Provider: 00000000-0000-0000-0000-000000000000]\n[Event Detail: onecore\vm\compute\management\orchestration\vmhostedcontainer\processmanagement.cpp(173)\vmcomputeagent.exe!00007FF70F4C9F4B: (caller: 00007FF70F47E13A) Exception(6) tid(38c) 80070002 The system cannot find the file specified.\r\n CallContext:[\Bridge_ProcessMessage\VmHostedContainer_ExecuteProcess] \n Provider: 00000000-0000-0000-0000-000000000000]"}
Oct 16, 2021 2:39:59 AM INFO com.nirima.jenkins.plugins.docker.DockerCloud canAddProvisionedAgent Provisioning 'jenkins/agent:jdk11-nanoserver-1809' number 1 (of 2) on 'docker'; Total containers: 0 (of 3) Oct 16, 2021 2:39:59 AM INFO com.nirima.jenkins.plugins.docker.DockerCloud provision Will provision 'jenkins/agent:jdk11-nanoserver-1809', for label: 'windows', in cloud: 'docker' Oct 16, 2021 2:39:59 AM INFO hudson.slaves.NodeProvisioner$StandardStrategyImpl apply Started provisioning Image of jenkins/agent:jdk11-nanoserver-1809 from docker with 1 executors. Remaining excess workload: 0 Oct 16, 2021 2:39:59 AM INFO com.nirima.jenkins.plugins.docker.DockerTemplate pullImage Pulling image 'jenkins/agent:jdk11-nanoserver-1809'. This may take awhile... Oct 16, 2021 2:40:00 AM INFO com.nirima.jenkins.plugins.docker.DockerTemplate pullImage Finished pulling image 'jenkins/agent:jdk11-nanoserver-1809', took 457 ms Oct 16, 2021 2:40:00 AM INFO com.nirima.jenkins.plugins.docker.DockerTemplate doProvisionNode Trying to run container for image "jenkins/agent:jdk11-nanoserver-1809" Oct 16, 2021 2:40:00 AM INFO com.nirima.jenkins.plugins.docker.DockerTemplate doProvisionNode Trying to run container for node win-00018p7fnkrig from image: jenkins/agent:jdk11-nanoserver-1809 Oct 16, 2021 2:40:00 AM INFO com.nirima.jenkins.plugins.docker.DockerTemplate doProvisionNode Started container ID 8c232986c20a5123c76a34ba192af2b2664c55466c0ac26d975481e4fc49f889 for node win-00018p7fnkrig from image: jenkins/agent:jdk11-nanoserver-1809 Oct 16, 2021 2:40:02 AM SEVERE com.github.dockerjava.core.async.ResultCallbackTemplate onError Error during callback com.github.dockerjava.api.exception.BadRequestException: {"message":"container 8c232986c20a5123c76a34ba192af2b2664c55466c0ac26d975481e4fc49f889 encountered an error during hcsshim::System::CreateProcess: failure in a Windows system call: The system cannot find the file specified. (0x2)\n[Event Detail: Provider: 00000000-0000-0000-0000-000000000000]\n[Event Detail: Provider: 00000000-0000-0000-0000-000000000000]\n[Event Detail: onecore\vm\compute\management\orchestration\vmhostedcontainer\processmanagement.cpp(173)\vmcomputeagent.exe!00007FF70F4C9F4B: (caller: 00007FF70F47E13A) Exception(6) tid(398) 80070002 The system cannot find the file specified.\r\n CallContext:[\Bridge_ProcessMessage\VmHostedContainer_ExecuteProcess] \n Provider: 00000000-0000-0000-0000-000000000000]"}
Oct 16, 2021 2:40:02 AM SEVERE com.nirima.jenkins.plugins.docker.DockerCloud$1 run Error in provisioning; template='DockerTemplate{configVersion=2, labelString='windows', connector=DockerComputerAttachConnector{}, remoteFs='C:\Users\Jenkins', instanceCap=2, mode=NORMAL, retentionStrategy=com.nirima.jenkins.plugins.docker.strategy.DockerOnceRetentionStrategy@29, dockerTemplateBase=DockerTemplateBase{image='jenkins/agent:jdk11-nanoserver-1809', environment=[FS_DIR=C:/ProgramData/Jenkins, JAR_NAME=agent.jar], bindAllPorts=false, cpuPeriod=0, cpuQuota=0, privileged=false, tty=false}, removeVolumes=false, stopTimeout=1000, pullStrategy=PULL_ALWAYS, pullTimeout=300, nodeProperties=[hudson.slaves.EnvironmentVariablesNodeProperty@b2202fe], disabled=BySystem,0 ms,29 sec,Template provisioning failed., name='win'}' for cloud='docker' com.github.dockerjava.api.exception.BadRequestException: {"message":"container 8c232986c20a5123c76a34ba192af2b2664c55466c0ac26d975481e4fc49f889 encountered an error during hcsshim::System::CreateProcess: failure in a Windows system call: The system cannot find the file specified. (0x2)\n[Event Detail: Provider: 00000000-0000-0000-0000-000000000000]\n[Event Detail: Provider: 00000000-0000-0000-0000-000000000000]\n[Event Detail: onecore\vm\compute\management\orchestration\vmhostedcontainer\processmanagement.cpp(173)\vmcomputeagent.exe!00007FF70F4C9F4B: (caller: 00007FF70F47E13A) Exception(6) tid(398) 80070002 The system cannot find the file specified.\r\n CallContext:[\Bridge_ProcessMessage\VmHostedContainer_ExecuteProcess] \n Provider: 00000000-0000-0000-0000-000000000000]"}
Oct 16, 2021 2:40:09 AM WARNING hudson.slaves.NodeProvisioner update Unexpected exception encountered while provisioning agent Image of jenkins/agent:jdk11-nanoserver-1809 com.github.dockerjava.api.exception.BadRequestException: {"message":"container 8c232986c20a5123c76a34ba192af2b2664c55466c0ac26d975481e4fc49f889 encountered an error during hcsshim::System::CreateProcess: failure in a Windows system call: The system cannot find the file specified. (0x2)\n[Event Detail: Provider: 00000000-0000-0000-0000-000000000000]\n[Event Detail: Provider: 00000000-0000-0000-0000-000000000000]\n[Event Detail: onecore\vm\compute\management\orchestration\vmhostedcontainer\processmanagement.cpp(173)\vmcomputeagent.exe!00007FF70F4C9F4B: (caller: 00007FF70F47E13A) Exception(6) tid(398) 80070002 The system cannot find the file specified.\r\n CallContext:[\Bridge_ProcessMessage\VmHostedContainer_ExecuteProcess] \n Provider: 00000000-0000-0000-0000-000000000000]"}
Oct 16, 2021 2:40:39 AM INFO com.nirima.jenkins.plugins.docker.DockerCloud canAddProvisionedAgent Provisioning 'jenkins/agent:jdk11-nanoserver-1809' number 1 (of 2) on 'docker'; Total containers: 0 (of 3) Oct 16, 2021 2:40:39 AM INFO com.nirima.jenkins.plugins.docker.DockerCloud provision Will provision 'jenkins/agent:jdk11-nanoserver-1809', for label: 'windows', in cloud: 'docker' Oct 16, 2021 2:40:39 AM INFO hudson.slaves.NodeProvisioner$StandardStrategyImpl apply Started provisioning Image of jenkins/agent:jdk11-nanoserver-1809 from docker with 1 executors. Remaining excess workload: 0
docker run -i --rm --name agent1 --init -v agent1-workdir:C:/Users/jenkins/Work jenkins/agent:jdk11-windowsservercore-ltsc2019 java -jar C:/ProgramData/Jenkins/agent.jar -workDir C:/Users/jenkins/Work