Jenkins Agent Offline - Node Disconnected and Builds Won’t Start
An agent is marked offline, so jobs targeting it never start. Unlike a mid-build drop, this is a launch/connection problem: the agent failed to connect or was taken offline, often due to launch config, Java, disk, or a secret/clock mismatch.
What this error means
On Manage Jenkins → Nodes the agent shows offline (or "Disconnected"), and jobs with that label sit queued. The agent log shows the launch attempt failing rather than a build error.
agent-windows-2 is offline
Launch failed - cleaning up connection
java.io.IOException: Unexpected termination of the channel
SEVERE: Failed to connect: connection refusedCommon causes
Launch method misconfigured
A wrong SSH host/key/credential, a blocked JNLP inbound port, or an incorrect agent JAR/secret prevents the agent from completing its connection handshake.
Wrong or missing Java on the agent
The agent host has no compatible JRE (or the wrong major version), so the remoting agent cannot start.
Agent taken offline by a monitor
Built-in monitors mark a node offline when free disk, temp space, or response time crosses a threshold - the node is healthy network-wise but disqualified.
How to fix it
Read the agent log and fix the launch
- Open Manage Jenkins → Nodes → <agent> → Log to see why the launch failed.
- For SSH agents, verify host, port, credentials, and that the key is authorized.
- For inbound (JNLP) agents, confirm the agent port is open and the secret matches.
Install a compatible Java and clear disk pressure
# on the agent host
java -version # must satisfy the controller's required Java
df -h / # free space if a disk monitor took it offlineHow to prevent it
- Provision agents from a known-good image with the correct Java preinstalled.
- Alert on the node disk/response monitors before they force agents offline.
- Manage agent connection secrets/credentials so they do not drift.