-
-
Notifications
You must be signed in to change notification settings - Fork 101
Restarting the Jenkins master
Martijn Verburg edited this page Jan 30, 2018
·
3 revisions
In the event that Jenkins crashes, use the following steps to bring it back online:
-
ssh [email protected]
(you'll need to get the password from LastPass if you're in the approved list) service jenkins restart
If the service doesn't start and there's no obvious reason in /var/log/jenkins/jenkins.log
then you can try
nohup /usr/bin/daemon --name=jenkins --inherit --env=JENKINS_HOME=/home/jenkins/.jenkins --output=/var/log/jenkins/jenkins.log --pidfile=/var/run/jenkins/jenkins.pid -- /usr/bin/java -Djava.awt.headless=true -jar /usr/share/jenkins/jenkins.war --webroot=/var/cache/jenkins/war --httpPort=8080
Don't forget to exit your shell!
Look at /var/log/jenkins/jenkins.log
Most of the time it's because someone accidentally started Jenkins as root (e.g. not via the service) and so /var/cache/jenkins/ is owned by root:root
and you'll need to recursively change ownership to jenkins:jenkins
e.g.
chown -R jenkins:jenkins /var/cache/jenkins/