Skip to content
Latchkey
Jenkins

Jenkins pipeline and agent errors - diagnosed.

Fix Jenkins failures: Jenkinsfile/pipeline syntax, plugin errors, agent connectivity, credentials, and build step failures.

Pipeline & Groovy

Jenkinsfile, declarative/scripted syntax.

"${bamboo.X} ... not resolved"Fix Bamboo "${bamboo.X}" appearing literally in CI - a variable was not resolved because it is undefined at t… "Broken build ... test failures"Fix a Bamboo "Broken build" caused by test failures in CI - the test task parsed results, found failing tests… "Deployment ... failed"Fix a Bamboo "Deployment failed" result in CI - a deployment task exited non-zero, a required artifact was mi… "return code ... was ... not 0"Fix Bamboo "Failing task since return code of the command was N and not 0" in CI - a script or command task e… "Maximum number of ... reached"Fix Bamboo "Maximum number of concurrent builds has been reached" in CI - the plan or agent concurrency limit… "OutOfMemoryError: Java heap space"Fix Bamboo "java.lang.OutOfMemoryError: Java heap space" in CI - a build task (or the agent JVM) exhausted it… "shared artifact ... not found"Fix Bamboo "shared artifact not found" in CI - a job subscribed to an artifact from another job, but the prod… "The plan has been disabled"Fix Bamboo "The plan has been disabled" in CI - triggers and manual runs are blocked because the plan is disa… "no files matched"Fix Bamboo "Unable to publish artifact, no files matched the pattern" in CI - the artifact definition's copy… "branch ... not found"Fix a Bamboo branch plan failing with "branch not found" in CI - the plan branch points at a source branch th… Build "database is locked"Fix a Bamboo build failing on a database lock or connection error in CI - the build's own test database (or a… "Cannot connect to the Docker daemon"Fix Bamboo "Cannot connect to the Docker daemon at unix:///var/run/docker.sock" in CI - the Docker task ran o… "quarantined ... flaky tests"Understand Bamboo quarantined flaky tests in CI - quarantining stops a known-flaky test from failing the buil… "Cannot run program ... No such file or directory"Fix Jenkins "java.io.IOException: error=2, No such file or directory" / "Cannot run program" - the agent trie… "checkout scm" failureFix Jenkins "checkout scm" failures - a detached/missing revision, shallow-clone ref errors, submodule failur… "ClassCastException" on step argsFix Jenkins "java.lang.ClassCastException: ... cannot be cast to ..." raised while binding a step argument -… "Cannot cast object ... to class"Fix Jenkins "org.codehaus.groovy.runtime.typehandling.GroovyCastException: Cannot cast object 'X' with class… "hudson.AbortException"Fix the Jenkins hudson.AbortException, the generic build-step abort raised when a step like sh, checkout, or… "java.lang.NoSuchMethodError"Fix the Jenkins java.lang.NoSuchMethodError thrown at runtime in a pipeline, usually from a plugin or core ve… "java.lang.StackOverflowError" in pipelineFix Jenkins "java.lang.StackOverflowError" raised during pipeline execution - deep or recursive Groovy under… "Loading libraries failed"Fix Jenkins "Loading libraries failed" / "Compilation error" when a shared library fails to load - a Groovy c… "No such property"Fix the Jenkins groovy.lang.MissingPropertyException "No such property" error caused by an undefined variable… "MissingPropertyException"Fix Jenkins "groovy.lang.MissingPropertyException: No such property" in a Jenkinsfile - an undefined variable… "No such DSL method found among steps"Fix Jenkins "java.lang.NoSuchMethodError" / "No such DSL method 'X' found among steps" - the pipeline called… "No such DSL method found"Fix the Jenkins "No such DSL method X found among steps" error caused by a missing plugin, a misspelled step… "No such DSL method"Fix Jenkins "java.lang.NoSuchMethodError: No such DSL method 'X' found" - a misspelled step, a missing plugin… "none of the test reports contained any results"Fix Jenkins junit "ERROR: Step ‘Publish JUnit test result report’ failed: none of the test reports contained… "java.lang.NoSuchMethodError"Fix Jenkins "java.lang.NoSuchMethodError" in a pipeline - a method that exists at compile time but not at run… "java.io.NotSerializableException"Fix Jenkins "java.io.NotSerializableException" in a pipeline - non-serializable objects held across a step in… "RejectedAccessException: ... signature"Fix Jenkins "RejectedAccessException" script-approval failures - a sandboxed script using an unapproved class… "Scripts not permitted to use method"Fix Jenkins "org.jenkinsci.plugins.scriptsecurity.sandbox.RejectedAccessException: Scripts not permitted to u… Replay runs old codeFix Jenkins "Replay" confusion - a replay running the original build’s Jenkinsfile/library instead of the lat… "Required context hudson.FilePath is missing"Fix the Jenkins "Required context class hudson.FilePath is missing" error caused by running a workspace step… "Required context class hudson.Launcher is missing"Fix Jenkins "Required context class hudson.Launcher is missing. Perhaps you forgot to surround the code with… "script returned exit code 1"Fix the Jenkins "script returned exit code 1" failure where a sh step command exited non-zero, failing the st… "script returned exit code N"Fix Jenkins "ERROR: script returned exit code N" from an sh/bat step - the command ran and exited non-zero. R… "Scripts not permitted to use method"Fix Jenkins "Scripts not permitted to use method/staticMethod/new" RejectedAccessException from the Groovy sa… "Scripts not permitted to use method"Fix the Jenkins "Scripts not permitted to use method" sandbox rejection by approving the signature or moving… "Stage ‘X’ skipped due to when conditional"Understand and fix Jenkins "Stage ‘X’ skipped due to when conditional" - a Declarative `when {}` evaluated fa… "No steps specified for stage"Fix the Jenkins declarative pipeline error where a stage is missing a steps block, which Jenkins rejects at v… "Timeout has been exceeded"Fix the Jenkins "Timeout has been exceeded" error where a timeout step or wrapper aborted the build because a… "Missing required section"Fix Jenkins "WorkflowScript: N: Missing required section 'agent'" / "Missing required parameter" - the Declar… "WorkflowScript: unexpected token"Fix Jenkins "WorkflowScript: N: unexpected token" Groovy parse errors in a Jenkinsfile - a stray brace, bad q… "WorkflowScript: unexpected token"Fix the Jenkins "WorkflowScript: N: unexpected token" Groovy parse error that fails a Jenkinsfile before any… "Could not resolve <library>@<version>"Fix Jenkins "@Library could not be resolved" / "Could not resolve <name>@<version>" - a non-existent branch/t… "No artifacts found that match"Fix Jenkins "No artifacts found that match the file pattern" from archiveArtifacts - wrong path, missing buil… "expected to call ... but wound up catching"Fix Jenkins CPS "expected to call X but wound up catching Y" / "Possible mismatch" - calling pipeline steps f… post condition skippedFix Jenkins declarative "post" blocks that do not run - wrong condition (success vs failure vs always), post… "when" evaluation errorFix Jenkins declarative "when" problems - a stage silently skipped, a when { expression {} } returning a non-… "cd: no such file or directory" in dirFix Jenkins shell failures inside a `dir(...)` block - the directory does not exist in the workspace yet, so… "Failed to send out email"Fix Jenkins Email Extension "Failed to send out e-mail" / SMTP errors - unconfigured SMTP, bad credentials, a… "Rejected" / aborted at inputFix Jenkins pipelines that fail at an `input` step with "Rejected by <user>" / "org.jenkinsci.plugins.workflo… input step abortedFix Jenkins input-step timeouts - a build aborted because no one approved the input prompt within the timeout… "[<resource>] is locked, waiting..."Fix Jenkins Lockable Resources "lock" step stalls - a build waiting forever for a resource held by a stuck jo… matrix cell failureFix Jenkins declarative matrix failures - a single axis cell failing the whole matrix, missing excludes, or a… "aborted" (milestone)Understand Jenkins "milestone" aborting older builds - a newer build passing a milestone cancels older in-fli… "Jenkinsfile not found"Fix Jenkins multibranch / pipeline-from-SCM "ERROR: ... Jenkinsfile not found" - the configured script path d… "due to earlier failure(s)"Fix Jenkins parallel stage failures - when one branch fails and failFast aborts the others with "Aborted due… "due to timeout"Fix Jenkins pipeline timeouts - "Cancelling nested steps due to timeout" and "Timeout has been exceeded" - by… "NoSuchFileException" from readFileFix Jenkins "java.nio.file.NoSuchFileException" from the `readFile`/`writeFile` step - the path does not exis… "net.sf.json.JSONException"Fix Jenkins readJSON/writeJSON errors - malformed JSON, a missing file, or the Pipeline Utility Steps plugin… credential printed in logsFix Jenkins secrets appearing unmasked in build logs - interpolating a bound credential in a Groovy string, e… oversized stashFix Jenkins stash/unstash size problems - huge stashes overloading the controller, slow transfers, or stash u… "No files match the includes pattern"Fix Jenkins stash "No files match the includes pattern" and unstash "No such saved stash" - wrong includes, m…

Agents & nodes

Agent connectivity, executors, labels.

No space left on JenkinsFix "No Space Left on Device" on Jenkins: why it happens and the Jenkins-specific way to give the job the res… "Elastic agent failed to start"Fix Bamboo "Elastic agent failed to start" in CI - Bamboo could not launch or connect an EC2 elastic instance… "failed because no agent"Fix a Bamboo build that "failed because no agent could be found to run it" in CI - the scheduler timed out wa… "No agents are available"Fix Bamboo "There are no agents available that can build this job" in CI - no online agent has every capabili… Deployment "no agent available"Fix a Bamboo deployment that queues with "no agent" in CI - no online agent has the capabilities the deployme… Agent "Offline" / "Disabled"Fix a Bamboo remote agent showing "Offline" or "Disabled" in CI - the agent lost its connection to the server… Registry timeout on JenkinsFix Dependency Download Timeout / Registry 5xx on Jenkins: why it happens and the Jenkins-specific way to giv… Exit code 137 on JenkinsFix Exit Code 137 (Out of Memory) on Jenkins: why it happens and the Jenkins-specific way to give the job the… "Cannot connect to the Docker daemon"Fix Jenkins pipeline "Cannot connect to the Docker daemon at unix:///var/run/docker.sock. Is the docker daemo… "Cannot contact <agent>"Fix Jenkins "Cannot contact <agent>: java.lang.InterruptedException" / "hudson.remoting.RequestAbortedExcepti… "Cannot contact agent"Fix the Jenkins "Cannot contact agent" InterruptedException where the controller lost contact with an agent a… "hudson.remoting.ChannelClosedException"Fix Jenkins "hudson.remoting.ChannelClosedException: channel is already closed" - the controller-agent remoti… "Jenkins doesn't have label"Fix the Jenkins "doesn't have label X" or no-agent-online problem where a job waits forever because no connec… "FATAL: command execution failed"Fix the Jenkins "FATAL: command execution failed" error where remoting could not run a command on the agent,… "FATAL: command execution failed"Fix Jenkins "FATAL: command execution failed" - a broken remoting channel, killed agent process, or fatal lau… "No space left on device"Fix the Jenkins "No space left on device" build failure where the agent workspace or temp disk filled up duri… "java.lang.OutOfMemoryError"Fix the Jenkins java.lang.OutOfMemoryError where a build process on the agent exhausted heap or the host OOM-… "remote file operation failed"Fix the Jenkins "remote file operation failed" error where a workspace file action on the agent failed, often… "Waiting for next available executor"Fix Jenkins builds stuck on "Waiting for next available executor" - no agent matches the label, executors are… "No space left on device"Fix Jenkins "No space left on device" on an agent - workspace bloat, undeleted Docker layers, or stale builds… Agent is offlineFix a Jenkins agent showing offline / "is offline" - failed JNLP/SSH launch, wrong Java, low disk, or a clock… "java.lang.OutOfMemoryError: Java heap space"Fix Jenkins "java.lang.OutOfMemoryError: Java heap space" / exit 137 on an agent - the build or agent JVM exc… "channel is already closed"Fix the Jenkins error where an agent went offline mid-build and the controller reports a closed channel, kill… "(blocked)" in queueFix Jenkins builds stuck "(blocked)" - Throttle Concurrent Builds limits, disableConcurrentBuilds, an upstrea… workspace cleanup failedFix Jenkins cleanWs / Workspace Cleanup failures - files locked or root-owned that cannot be deleted, the plu… "agent provisioning failed"Fix the Jenkins cloud agent provisioning failure where the controller could not launch a dynamic Kubernetes,… Controller "OutOfMemoryError"Fix Jenkins controller "java.lang.OutOfMemoryError" - the master JVM ran out of heap or GC overhead under bui… executor starvationFix Jenkins executor starvation - builds holding executors while idle (input/sleep inside node), too few exec… "Couldn't find any revision to build"Fix Jenkins "ERROR: Couldn't find any revision to build. Verify the repository and branch configuration" - th… "Host key verification failed"Fix Jenkins git checkout "Host key verification failed. fatal: Could not read from remote repository" - the a… "fatal: Authentication failed"Fix Jenkins git checkout "fatal: Authentication failed for 'https://...'" - the HTTPS credentials are missing… "Connection refused" (JNLP)Fix Jenkins inbound (JNLP) agent "Connection refused" / "Failed to connect" - a wrong agent port, blocked fir… Kubernetes agent pod failedFix Jenkins Kubernetes plugin pod failures - a pod stuck Pending/ImagePullBackOff, a bad pod template, RBAC e… "/bin/sh: Bad substitution"Fix Jenkins shell step "/bin/sh: 1: Bad substitution" - the `sh` step runs under POSIX `/bin/sh` (dash), whic… "Cannot run program "nohup""Fix Jenkins sh-step failure "Cannot run program "nohup": error=2, No such file or directory" - the Durable Ta… tool auto-install failureFix Jenkins "tool" auto-installer failures - a download that failed, an undefined tool name, or a wrong insta… "Permission denied" (workspace)Fix Jenkins workspace "Permission denied" / "mkdir: cannot create directory" errors - wrong file ownership, a… Job timeout on JenkinsFix Job Timeout / Exceeded Maximum Time on Jenkins: why it happens and the Jenkins-specific way to give the j…

Plugins & credentials

Plugin and credential errors.

"command not found"Fix a Bamboo script task failing with "command not found" in CI - the executable is not installed on the agen… "Failed to source repository"Fix Bamboo "Failed to source code repository" in CI - the agent could not reach or read the configured VCS re… "failed to checkout"Fix Bamboo "The plan failed to checkout" in CI - the source checkout task could not update the working copy,… "JDK ... not defined"Fix Bamboo "JDK <label> is not defined" in CI - a task references a JDK capability label that no agent (or th… "Authentication failed"Fix Bamboo VCS "Authentication failed" in CI - the repository rejected the credentials Bamboo sent, so the ag… "java.lang.ClassNotFoundException"Fix the Jenkins java.lang.ClassNotFoundException that appears after a plugin update when a class moved, was r… "Could not find credentials with ID"Fix the Jenkins "Could not find credentials entry with ID" error where withCredentials or a step references a… "Failed to load: <plugin>"Fix Jenkins "Failed to load: <plugin>" at startup - a corrupt .hpi/.jpi, an unmet dependency, or a partially-… "No valid crumb was included in the request"Fix Jenkins "403 No valid crumb was included in the request" - CSRF protection rejecting an API/plugin call t… "Failed to load: plugin"Fix the Jenkins "Failed to load" plugin error caused by a missing or too-old dependency plugin that the faili… "requires a restart"Fix Jenkins plugins installed but inactive - "requires a restart", an unmet dependency, or a step still missi… docker.build failureFix Jenkins Docker Pipeline "docker.build" failures - no Docker daemon on the agent, a missing Dockerfile/con… docker.withRegistry failureFix Jenkins "docker.withRegistry" failures - denied/unauthorized push or pull, a missing/wrong registry crede… "fatal: could not read Username"Fix Jenkins "fatal: could not read Username for 'https://github.com'" during checkout - missing or wrong Git… "requires a newer version of Jenkins"Fix Jenkins plugin version incompatibility - "Failed to load: <plugin>" / "requires a newer version" / depend… "requires a newer version of Jenkins"Fix Jenkins "Failed to load: X. ... requires a newer version of Jenkins (W.X.Y) than is running (Z)" - a plug… "No such (global|implicit) library"Fix Jenkins "No such global library" / "No such DSL method 'library'" - an unconfigured shared library, wrong… "No tool named X found"Fix Jenkins "IllegalArgumentException: No tool named X found" from a `tools {}` block - the tool installation… "Could not find credentials entry with ID"Fix Jenkins withCredentials "Could not find credentials entry with ID" / wrong binding type - missing credent…
Explore other topics