jenkinsci/jenkins · error · IllegalStateException
no longer a configured node for {0}
Error message
no longer a configured node for {0} What it means
Thrown by AbstractBuild.AbstractBuildExecution.getCurrentNode() when Executor.currentExecutor() is non-null but its Computer's getNode() returns null. This means the executor is still alive but the node it was running on has been removed from the Jenkins configuration (decommissioned/deleted) while the build is still active. The message includes the computer (agent) name.
Source
Thrown at core/src/main/java/hudson/model/AbstractBuild.java:427
/**
* Lease of the workspace.
*/
private Lease lease;
/**
* Returns the current {@link Node} on which we are building.
* @return Returns the current {@link Node}
* @throws IllegalStateException if that cannot be determined
*/
protected final @NonNull Node getCurrentNode() throws IllegalStateException {
Executor exec = Executor.currentExecutor();
if (exec == null) {
throw new IllegalStateException("not being called from an executor thread");
}
Computer c = exec.getOwner();
Node node = c.getNode();
if (node == null) {
throw new IllegalStateException("no longer a configured node for " + c.getName());
}
return node;
}
public Launcher getLauncher() {
return launcher;
}
public BuildListener getListener() {
return listener;
}
/**
* Allocates the workspace from {@link WorkspaceList}.
*
* @param n
* Passed in for the convenience. The node where the build is running.
* @param wslView on GitHub (pinned to 2e228ff40b)
Solutions
- Avoid deleting or reconfiguring agents while builds are running on them — drain the agent first
- For cloud/ephemeral agents, ensure the agent is retained until builds complete (set idle timeout / retention appropriately)
- Catch IllegalStateException in build logic and fail the build gracefully with a clear message
- If the node must be removed, abort builds on it first via Jenkins API before removal
Defensive patterns
Strategy: try-catch
Validate before calling
Computer c = Executor.currentExecutor().getOwner();
if (c.getNode() == null) {
throw new AbortException("Node " + c.getName() + " was removed mid-build; aborting");
} Try / catch
try {
Node node = build.getCurrentNode();
} catch (IllegalStateException e) {
if (e.getMessage().startsWith("no longer a configured node")) {
// fail the build cleanly; the agent was removed
}
throw e;
} Prevention
- Never delete or deconfigure agents with running builds — drain first
- For cloud agents, set retention so they survive until builds finish
- Catch IllegalStateException in build wrappers and report a clear cause
When it happens
Trigger: Called from a build thread (run(), decideWorkspace(), or pre-checkout logic) after the agent/node was taken offline and removed from Jenkins while the build's executor was still allocated to it.
Common situations: An agent is deleted or its configuration is removed mid-build; a transient/ephemeral agent (cloud) is reaped while a build is running; a node rename or reconfiguration invalidates the computer-to-node mapping during a build.
Related errors
- Failed to join the process
- Error occurred while performing this command, see previous s
- Node ' already exists
- {0} seems to be offline
- Failed to unpack %s (%d bytes read)
AI-assisted analysis of jenkinsci/jenkins@2e228ff40b (2026-08-14).
Data as JSON: /api/errors/ff7eef2c1ea53063.
Report an issue: GitHub.