-
Bug
-
Resolution: Unresolved
-
Minor
-
None
-
Ubuntu Xenial, Jenkins 2.239 with all plugins up-to-date
The following Jenkins works fine:
pipeline { agent none stages { stage('Test') { agent { docker { image 'node:14-alpine' alwaysPull true } } steps { sh 'pwd' sh 'node --version' } } } }
The following got some issues and it's stuck on "docker pull node:14-alpine" (from Blue Ocean view):
pipeline { agent { dockerfile { filename 'docker/jenkins-agent/Dockerfile' additionalBuildArgs "--build-arg UID=113" } } stages { stage('Test') { agent { docker { image 'node:14-alpine' alwaysPull true } } steps { sh 'node --version' } } } }
When tried without "alwaysPull true", it got stuck on "docker inspect -f . node:14-alpine — Shell Script".
My Dockerfile:
FROM ubuntu:focal AS ubuntu ENV DEBIAN_FRONTEND noninteractive # Creates a user. ARG UID=1001 RUN useradd -rm -d /home/jenkins -s /bin/bash -g root -u $UID jenkins USER jenkins WORKDIR /home/jenkins
Jenkins output:
... [Pipeline] withEnv [Pipeline] { [Pipeline] isUnix [Pipeline] sh ( (hang)
Error after timeout (docker pull node:14-alpine — Shell Script):
process apparently never started in /var/lib/jenkins/workspace/Deploy@2@tmp/durable-75354819 (running Jenkins temporarily with -Dorg.jenkinsci.plugins.durabletask.BourneShellScript.LAUNCH_DIAGNOSTICS=true might make the problem clearer) script returned exit code -2
My understanding is when specifying "agent" inside "stage" it should override/replace the outer "agent", but it seems Jenkins got some issues with this configuration.
I got the same error after an upgrade of Jenkins and a bunch of plugins (including durable). I'm not using Docker. But it happens when in a stage with an explicit node{ sh ... } to hand over to a slave. But I have only got the error on one particular slave, it seams to work for a different slave. I don't know what the difference is.
This is the error:
process apparently never started in C:\Jenkins\workspace\APPBUILDER-MONGOOSE-PIPELINE-DEVELOP@tmp\durable-b7aab64d
(running Jenkins temporarily with -Dorg.jenkinsci.plugins.durabletask.BourneShellScript.LAUNCH_DIAGNOSTICS=true might make the problem clearer)
I have now downgraded to version 1.34, and it seams to help. But I not 100% sure yet, if this error is possibly intermittent in nature.