[JIRA] (JENKINS-41106) Jenkins build fails with java.io.IOException: Failed to mkdirs: sometimes, not always

53 views
Skip to first unread message

peterenmariska@gmail.com (JIRA)

unread,
Jan 16, 2017, 11:58:02 AM1/16/17
to jenkinsc...@googlegroups.com
peter bos created an issue
 
Jenkins / Bug JENKINS-41106
Jenkins build fails with java.io.IOException: Failed to mkdirs: sometimes, not always
Issue Type: Bug Bug
Assignee: Carlos Sanchez
Components: kubernetes-plugin
Created: 2017/Jan/16 4:57 PM
Priority: Minor Minor
Reporter: peter bos

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

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

Add Comment Add Comment
 
This message was sent by Atlassian JIRA (v7.1.7#71011-sha1:2526d7c)
Atlassian logo

peterenmariska@gmail.com (JIRA)

unread,
Jan 17, 2017, 2:49:07 AM1/17/17
to jenkinsc...@googlegroups.com
peter bos updated an issue
Change By: peter bos
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

peterenmariska@gmail.com (JIRA)

unread,
Jan 18, 2017, 2:29:01 AM1/18/17
to jenkinsc...@googlegroups.com
peter bos commented on Bug JENKINS-41106
 
Re: Jenkins build fails with java.io.IOException: Failed to mkdirs: sometimes, not always

Update: It seems that when de slave name is != "jnlp" this behaviour occurs. When the container name is other than jnlp 2 containters are being started in one pod....Why is the mystery.

jenkins-ci@carlossanchez.eu (JIRA)

unread,
Feb 12, 2017, 12:18:01 PM2/12/17
to jenkinsc...@googlegroups.com
Carlos Sanchez updated an issue
 
Change By: Carlos Sanchez
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:

{code}
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

{code}




Jenkins system log:
{code}
{code}

jenkins-ci@carlossanchez.eu (JIRA)

unread,
Feb 12, 2017, 12:20:01 PM2/12/17
to jenkinsc...@googlegroups.com

jenkins-ci@carlossanchez.eu (JIRA)

unread,
Feb 12, 2017, 12:20:01 PM2/12/17
to jenkinsc...@googlegroups.com
Carlos Sanchez commented on Bug JENKINS-41106
 
Re: Jenkins build fails with java.io.IOException: Failed to mkdirs: sometimes, not always

the slave container name must be jnlp or it will create a different one, see JENKINS-40847

Reply all
Reply to author
Forward
0 new messages