Jenkins agent node offline - remoting handshake failure
Jenkins agent shows 'Offline' in the node management page
Focused incident mode — strips away everything but this runbook.
Symptoms
- Jenkins agent shows 'Offline' in the node management page
- Builds stuck in queue with 'Waiting for next available executor on <agent>'
- Agent log shows 'GO AWAY' or 'remoting mismatch' error
Always update the agent.jar on the agent host after upgrading Jenkins master. Remoting version mismatch is the most common cause of the 'GO AWAY' error.
Evidence to grab
Collect these artifacts before you change anything — they prove (or rule out) each cause.
Agent node status
curl -s -u <USER>:<TOKEN> <JENKINS_URL>/api/json?tree=computer[name,offline,offlineCauseReason]Agent remoting log
ssh <AGENT_HOST> tail -100 ~/.jenkins/logs/remoting.log
Diagnostic flow
Run the steps in order, marking each claim confirmed or refuted. The evidence you gather feeds the ranked causes below.
Guided decision tree is ready.
Steps with commands, expected output, and pass/fail branches.
Ranked root causes
Evidence checklist
- Log shows 'GO AWAY' or 'remoting version mismatch'
- Jenkins was upgraded but the agent JNLP jar was not updated
Confirm before fixing
curl -s -u <USER>:<TOKEN> '<JENKINS_URL>/agent/<AGENT_NAME>/api/json?tree=version'Check the agent's reported remoting version
Fix
curl -s -u <USER>:<TOKEN> '<JENKINS_URL>/jnlpJars/agent.jar' -o agent.jar && ssh <AGENT_HOST> java -jar agent.jar -url <JENKINS_URL> -secret @secret.key -name <AGENT_NAME>Download and relaunch the agent with the matching agent.jar
Resolution runbook
Apply from top to bottom after the cause is confirmed. Review every command before running it — risk tags are shown on each.
curl -s -u <USER>:<TOKEN> '<JENKINS_URL>/computer/<AGENT_NAME>/api/json?tree=offline,offlineCause'Check the agent status
ssh <AGENT_HOST> tail -100 ~/.jenkins/logs/remoting.logRead the agent logs
curl -s -u <USER>:<TOKEN> '<JENKINS_URL>/jnlpJars/agent.jar' -o /tmp/agent.jarDownload the latest agent.jar
ssh <AGENT_HOST> nohup java -jar agent.jar -url <JENKINS_URL> -secret @secret.key -name <AGENT_NAME> > /dev/null 2>&1 &Restart the agent with the updated jar
Prevention
- Upgrade agents in a rolling fashion after each Jenkins master upgrade.
- Monitor agent online status and alert when agents go offline.
- Use Jenkins' built-in agent management API to automate agent health checks.
- Pin the Jenkins and agent versions to avoid unexpected incompatibilities.
Related runbooks
Same stack, same failure family — worth a skim.
Build stuck in queue with 'Waiting for next available executor'
Build fails with 'Workspace is locked by another build'
Commands marked READ CHANGE DESTRUCTIVE — never run DESTRUCTIVE commands against production data you cannot restore. Copy → verify → execute.