Use this when Jenkins builds fail, stay queued or cannot use credentials or plugins.
Jenkins Troubleshooting
Troubleshoot Jenkins by reading the console output, checking agent connectivity and labels, plugin versions and compatibility, credentials IDs, workspace permissions and the system log.
1. Failures: agent offline, workspace issues, plugin incompatibility, credential errors, Groovy sandbox rejections.
2. Read console output.
3. Check agent status.
4. Plugin updates/rollbacks.
5. Replay with fixes in test.
trigger → agent → stage → step → error
Context & applicabilityCommon mistakes · platform/version boundaries
Operational reference
Fast context before you go deeper.
curl -sS -D - -o /dev/null <jenkins-url>/api/jsonPrimary Commands
Configuration and operational commands for this Topic.
Verification & Troubleshooting
Start with the observed symptom, prove the nearest boundary, and move outward only when the current state is understood.
Use the operational verification above to establish the expected state.
Capture the concrete output, symptom, packet, log or counter before changing anything.
Step 1 Command read-back and what it shows Verify boundary
Known-good is the controller read endpoint returns success, the intended job leaves the queue, required stages complete and the original artifact/deployment verification passes; broken state is controller errors, persistent queueing, offline agents, plugin/credential failures or a completed build that does not produce the expected downstream state. Controller API health shows Jenkins service reachability only, but it does not show agent capacity, pipeline correctness or external deployment health.
Step 2 Common mistakes Narrow the fault
- Ignoring the agent's own logs.
Step 3 Observation-driven branch and next-check logic Narrow the fault
If the API is unreachable/5xx, inspect controller/proxy/service health; if the controller responds but jobs queue indefinitely, inspect executor/label/agent state; if a build starts and fails, inspect the first failing stage, workspace/tooling and external response.
- Console output shows the first error.
- Offline agents leave builds queued.
- Wrong credential IDs fail quietly.
- Console output of failed build — error
- Agent logs and connectivity — infrastructure
- Jenkins system log (/manage/log) — controller
ReferenceHow it works2 sections · depth on demand
In depth
Troubleshooting Jenkins starts with the console log of the failing build, then narrows down to the agent, the pipeline definition or the controller.
| Symptom | Check |
|---|---|
| Build waits in queue | Agent with the label online? Free executors? |
RejectedAccessException | Script approval needed (sandbox) |
| Credentials not found | Credential ID and folder scope |
| Works locally, fails on agent | Tool versions, PATH, workspace leftovers |
| Controller slow or out of memory | Heap size, number of builds kept, plugin issues |
| Webhook does not start builds | Webhook delivery log, Jenkins URL, CSRF/crumb settings |
curl -s -u user:token https://jenkins.example.com/computer/api/json?pretty=true | grep -E 'displayName|offline'
Check *Manage Jenkins → System Log* for controller-side errors, and use pipeline replay to test fixes without committing.
How it works
Jenkins Troubleshooting is governed by Jenkins controller availability, queue scheduling, agent executors, credentials and pipeline step state. The controller accepts jobs, evaluates pipeline logic and schedules work onto matching agents; agents then execute steps with workspace/tool/credential context while external systems receive build/deploy actions. Reverse proxy/TLS, agent connectivity, plugin health, credentials, SCM and downstream services are separate things to check. The important state separation is that a reachable controller is not equivalent to an available executor, and a green controller API does not show a specific pipeline or downstream deployment can run.
ReferenceImportant terms & boundaries1 section · depth on demand
Mechanics
The linked authority for bounded mechanics is Jenkins User Handbook; documentation support is separate from observed lab/production Evidence.
Additional reference context Scope · expected state · examples · history · terminology Open only when you need the supporting context
Verification history & basis
When and against what this Topic was checked. Later text edits do not count as a new check.
Authoritative/upstream documentation reviewed for bounded claims in Jenkins > Jenkins Troubleshooting. Documentation verification only; this is not observed lab or production Evidence.
Basis: https://www.jenkins.io/doc/ · confidence 94%