
When Jenkins pipelines fail, the fastest way to recovery is a consistent troubleshooting sequence. This guide helps DevOps engineers and platform teams quickly isolate whether the problem is in the Jenkins controller, agents, plugins, or job configuration, then move toward a safe fix.
Originally published on 2015-09-02; fully revised and updated.
Start with a fast Jenkins triage workflow
Use this flow to avoid guesswork and reduce time spent jumping between unrelated logs.
flowchart TD
A[Alert or user report] --> B{Is Jenkins reachable}
B -- no --> C[Check service status and host health]
C --> D[Inspect system logs for crashes or OOM]
B -- yes --> E[Open Jenkins log recorder at /log]
E --> F{Failure scope}
F -- Controller --> G[Review jenkins log and plugin errors]
F -- Agent --> H[Check agent connection and agent logs]
F -- Job --> I[Inspect build console and recent changes]
G --> J[Apply fix and retest]
H --> J
I --> J
J --> K[Monitor next builds]
Check Jenkins logs in the right order
Start with Jenkins-native logs, then move outward to service and operating system logs.
- Controller log recorder (UI): http://jenkins-master/log (replace with your Jenkins controller hostname). You can also define custom loggers and levels such as severe, warning, info, config, fine, finer, finest, and all.
- Service log on Linux package installs: often
/var/log/jenkins/jenkins.log. - Systemd journal: useful when file logs are sparse or rotated.
- Windows service logs: commonly
jenkins.err.logandjenkins.out.log. - Agent logs on Windows (from original guide):
logs\\slaves.
# Linux package log
sudo tail -f /var/log/jenkins/jenkins.log
# systemd deployments
sudo journalctl -u jenkins -f
# containerized Jenkins
docker logs -f jenkinsCode language: PHP (php)
# Quick error-focused scan
grep -iE "exception|error|outofmemory|oom" /var/log/jenkins/jenkins.logCode language: PHP (php)
Compare common failure scopes before fixing
| Symptom | Likely scope | First place to check | Typical next action |
|---|---|---|---|
| Jenkins UI not reachable | Controller or host | systemctl/journal, OS logs | Recover service, check OOM or disk pressure |
| UI reachable but builds never start | Queue, executors, or agents | Jenkins queue, node status, controller logs | Restore agent connectivity or free executors |
| One pipeline failing after plugin change | Job or plugin compatibility | Build console plus plugin logs | Rollback or upgrade plugin carefully, then retest |
| Jobs disappeared after reboot | Storage or JENKINS_HOME mount | Mount status, jobs directory | Remount volume and validate data path |
Common incidents and practical fixes
Jenkins hangs or becomes unresponsive
The original guide points to Jenkins hang troubleshooting: https://wiki.jenkins-ci.org/display/JENKINS/Jenkins+is+hanging.
# Capture a thread dump from the Jenkins Java process (example)
sudo jstack $(pgrep -f jenkins.war) > /tmp/jenkins-thread-dump.txtCode language: PHP (php)
Site down with no 404: possible process crash or OOM kill
A common cause is the Jenkins Java process being terminated by memory pressure. Restarting may restore service temporarily, but you should confirm root cause.
sudo systemctl status jenkins
dmesg | grep -i -E "out of memory|killed process"
sudo journalctl -u jenkins --since "1 hour ago"Code language: JavaScript (javascript)
Site is up but no jobs are displayed
From the original post, one cause is a server reboot where the data volume did not remount correctly. Validate the Jenkins home path and job directory before deeper changes.
echo $JENKINS_HOME
mount | grep -i jenkins
ls -lah $JENKINS_HOME/jobs
# Example remount pattern from the original guide
sudo mount <device> <path>Code language: PHP (php)
java.lang.OutOfMemoryError: PermGen space
The original article references a PermGen troubleshooting page: http://www.scmgalaxy.com/scm/build-workflow-management/jenkins/jenkins-java-lang-outofmemoryerror-permgen-space-issues.html. PermGen is mainly a legacy Java issue; modern JVMs use Metaspace instead. Confirm your Java and Jenkins versions before applying old JVM tuning advice.
Verify Jenkins and plugin health safely
Before upgrades or large fixes, take a backup and stage changes in a lower environment where possible.
# Example backup workflow for package-based installs
sudo systemctl stop jenkins
sudo tar -czf /tmp/jenkins-home-backup.tgz /var/lib/jenkins
sudo systemctl start jenkinsCode language: PHP (php)
- Keep Jenkins core and plugins on supported, stable releases.
- Update in small batches so regressions are easier to isolate.
- After each update, run a smoke pipeline and validate agent connectivity.
Monitoring and references from the original guide
- Jenkins monitoring plugin reference (legacy wiki): https://wiki.jenkins-ci.org/display/JENKINS/Monitoring
- Jenkins hang troubleshooting (legacy wiki): https://wiki.jenkins-ci.org/display/JENKINS/Jenkins+is+hanging
- Controller log recorder endpoint pattern: http://jenkins-master/log
Best practices
- Standardize an incident checklist: reachability, controller logs, agent state, then job-level logs.
- Alert on memory, disk, queue depth, and executor saturation before outages occur.
- Document your Jenkins home location, backup process, and restart procedure.
- Treat plugin updates like code changes: review, test, deploy, and verify.
I’m Rajesh Kumar, a DevOps, SRE, DevSecOps, Cloud, and Platform Engineering expert passionate about sharing practical knowledge, real-world experiences, and industry best practices. I have worked at Cotocus and regularly write about technology, travel, investing, health, product reviews, and digital marketing through my various platforms.
I publish technical articles at DevOps School, travel stories at Holiday Landmark, stock market insights at Stocks Mantra, health and fitness guidance at My Medic Plus, product reviews at TrueReviewNow, and SEO and digital marketing strategies at Wizbrand.
Find Trusted Cardiac Hospitals
Compare heart hospitals by city and services — all in one place.
Explore Hospitals