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

Jenkins build fails with java.io.IOException: Failed to mkdirs: sometimes, not always

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Duplicate
    • Icon: Minor Minor
    • kubernetes-plugin
    • None

      Sometimes the jenkins slave does not work. It gives : Failed to mkdirs:

      When building again it sometimes works and builds fine. The pod seems to be killed for some reason and it has the status terminated:error.

      Jenkins 2.40
      kubernetes plugin v0.10
      kubernetes version 1.5.1

      Below are the jenkins build log and system log.

      Jenkins build log:

      java.io.IOException: Failed to mkdirs: /root/workspace/alliander/aansluitconfigurator/develop@2
      	at hudson.FilePath.mkdirs(FilePath.java:1169)
      	at hudson.plugins.git.GitSCM.createClient(GitSCM.java:731)
      	at hudson.plugins.git.GitSCM.checkout(GitSCM.java:1080)
      	at org.jenkinsci.plugins.workflow.steps.scm.SCMStep.checkout(SCMStep.java:109)
      	at org.jenkinsci.plugins.workflow.steps.scm.SCMStep$StepExecutionImpl.run(SCMStep.java:83)
      	at org.jenkinsci.plugins.workflow.steps.scm.SCMStep$StepExecutionImpl.run(SCMStep.java:73)
      	at org.jenkinsci.plugins.workflow.steps.AbstractSynchronousNonBlockingStepExecution$1$1.call(AbstractSynchronousNonBlockingStepExecution.java:47)
      	at hudson.security.ACL.impersonate(ACL.java:260)
      	at org.jenkinsci.plugins.workflow.steps.AbstractSynchronousNonBlockingStepExecution$1.run(AbstractSynchronousNonBlockingStepExecution.java:44)
      	at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
      	at java.util.concurrent.FutureTask.run(FutureTask.java:266)
      	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)
      Finished: FAILURE
      
      

      Jenkins system log:

      Excess workload after pending Spot instances: 1
      Jan 16, 2017 5:05:34 PM INFO hudson.slaves.NodeProvisioner$StandardStrategyImpl apply
      Started provisioning Kubernetes Pod Template from Kubernetes cluster with 1 executors. Remaining excess workload: 0
      Jan 16, 2017 5:05:34 PM INFO org.csanchez.jenkins.plugins.kubernetes.KubernetesCloud$ProvisioningCallback call
      Created Pod: jnlp-slave-normal-19dda6ba48fc6
      Jan 16, 2017 5:05:34 PM INFO org.csanchez.jenkins.plugins.kubernetes.KubernetesCloud$ProvisioningCallback call
      Waiting for Pod to be scheduled (0/100): jnlp-slave-normal-19dda6ba48fc6
      Jan 16, 2017 5:05:36 PM INFO hudson.TcpSlaveAgentListener$ConnectionHandler run
      Accepted connection #188 from /172.16.7.4:51604
      Jan 16, 2017 5:05:37 PM INFO org.csanchez.jenkins.plugins.kubernetes.KubernetesSlave _terminate
      Terminating Kubernetes instance for slave jnlp-slave-normal-19dda6ba48fc6
      Jan 16, 2017 5:05:37 PM INFO org.csanchez.jenkins.plugins.kubernetes.KubernetesSlave _terminate
      Terminated Kubernetes instance for slave jnlp-slave-normal-19dda6ba48fc6
      Jan 16, 2017 5:05:37 PM INFO org.csanchez.jenkins.plugins.kubernetes.KubernetesSlave _terminate
      Disconnected computer jnlp-slave-normal-19dda6ba48fc6
      Jan 16, 2017 5:05:37 PM INFO org.jenkinsci.plugins.workflow.job.WorkflowRun finish
      alliander/aansluitconfigurator/develop #6 completed: FAILURE
      Jan 16, 2017 5:05:40 PM SEVERE org.csanchez.jenkins.plugins.kubernetes.KubernetesCloud$ProvisioningCallback call
      Error in provisioning; slave=KubernetesSlave name: jnlp-slave-normal-19dda6ba48fc6, template=org.csanchez.jenkins.plugins.kubernetes.PodTemplate@57f6b759
      Jan 16, 2017 5:05:44 PM WARNING hudson.slaves.NodeProvisioner$2 run
      Unexpected exception encountered while provisioning agent Kubernetes Pod Template
      java.lang.IllegalStateException: Pod no longer exists: jnlp-slave-normal-19dda6ba48fc6
      	at org.csanchez.jenkins.plugins.kubernetes.KubernetesCloud$ProvisioningCallback.call(KubernetesCloud.java:575)
      	at org.csanchez.jenkins.plugins.kubernetes.KubernetesCloud$ProvisioningCallback.call(KubernetesCloud.java:532)
      	at jenkins.util.ContextResettingExecutorService$2.call(ContextResettingExecutorService.java:46)
      	at java.util.concurrent.FutureTask.run(FutureTask.java:266)
      	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)
      
      Feed    All    > SEVERE    > WARNING
      

            csanchez Carlos Sanchez
            k8s_alliander peter bos
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: