Uploaded image for project: 'Jenkins'
  1. Jenkins
  2. JENKINS-43294

Searching for docker binary is only done on master executor

XMLWordPrintable

      If docker is not installed in the master executor, Jenkins doesn't try to run docker on other executors.

      I run Jenkins from a docker image, and of course I don't have docker in that image. I've limited the below job to run only on executors that have docker installed. I've also configured the plugin globally to fetch the latest docker.

       

      However, I still get the below error:

       

      Creating a Container slave to host hudson.model.FreeStyleProject@1722bec6[CMake/Build_Foo_Linux]#3
      Apr 03, 2017 12:09:51 PM SEVERE it.dockins.dockerslaves.ProvisionQueueListener onEnterBuildable
      Failure to create Docker Slave java.io.IOException: Cannot run program "docker": error=2, No such file or directory at java.lang.ProcessBuilder.start(ProcessBuilder.java:1048) at hudson.Proc$LocalProc.<init>(Proc.java:243) at hudson.Proc$LocalProc.<init>(Proc.java:212) at hudson.Launcher$LocalLauncher.launch(Launcher.java:815) at hudson.Launcher$ProcStarter.start(Launcher.java:381) at hudson.Launcher$ProcStarter.join(Launcher.java:388) at it.dockins.dockerslaves.drivers.CliDockerDriver.serverVersion(CliDockerDriver.java:448) at it.dockins.dockerslaves.drivers.CliDockerDriver.<init>(CliDockerDriver.java:78) at it.dockins.dockerslaves.drivers.PlainDockerAPIDockerDriverFactory.forJob(PlainDockerAPIDockerDriverFactory.java:43) at it.dockins.dockerslaves.DefaultDockerProvisionerFactory.createProvisionerForClassicJob(DefaultDockerProvisionerFactory.java:95) at it.dockins.dockerslaves.DockerSlaves.createStandardJobProvisionerFactory(DockerSlaves.java:101) at it.dockins.dockerslaves.ProvisionQueueListener.prepareExecutorFor(ProvisionQueueListener.java:93) at it.dockins.dockerslaves.ProvisionQueueListener.onEnterBuildable(ProvisionQueueListener.java:62) at hudson.model.Queue$BuildableItem.enter(Queue.java:2522) at hudson.model.Queue$BuildableRunnable.run(Queue.java:2826) at hudson.model.Queue.maintain(Queue.java:1474) at hudson.model.Queue$MaintainTask.doRun(Queue.java:2710) at hudson.triggers.SafeTimerTask.run(SafeTimerTask.java:50) at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511) at java.util.concurrent.FutureTask.runAndReset(FutureTask.java:308) at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$301(ScheduledThreadPoolExecutor.java:180) at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:294) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) at java.lang.Thread.run(Thread.java:745) Caused by: java.io.IOException: error=2, No such file or directory at java.lang.UNIXProcess.forkAndExec(Native Method) at java.lang.UNIXProcess.<init>(UNIXProcess.java:248) at java.lang.ProcessImpl.start(ProcessImpl.java:134) at java.lang.ProcessBuilder.start(ProcessBuilder.java:1029) ... 24 more

            ndeloof Nicolas De Loof
            ovidiub13 Ovidiu-Florin Bogdan
            Votes:
            1 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated:
              Resolved: