43

A strange thing happen sometime, Jenkins start displaying " Jenkins is going to shut down" even when nobody turned this message on and restarting Jenkins.

Screenshot:

enter image description here

sashoalm
  • 75,001
  • 122
  • 434
  • 781
user3232823
  • 1,867
  • 3
  • 18
  • 27
  • It just display message “Jenkins is going to shut down” and cancel all schedule jobs, then i have to restart process and kick off jobs. One thing, everytime it happen around midnight of a specific day of week (lets say Thursday mid night) and work fine all other days of week. May be some update is scheduled and restart Jenkins after update? I looked into Jenkins logs, and didn’t find anything. Is there a specific one I need to look into? Any advice!! – user3232823 Oct 13 '14 at 14:10
  • 2
    Hello, I have a plug in "Thin backup" which was configured to shut down after back up. Changed this setting and it is working fine now. It's bit tricky because this plug in is not under configure system, its under manage jenkins. You can easily miss it. – user3232823 Oct 29 '14 at 19:32

4 Answers4

64

I have a plug in "Thin backup" which was configured to shut down after back up. Changed this setting and it is working fine now. It's bit tricky to find it because this plug in is not under configure system, its under manage jenkins. You can easily miss it.

As mentioned by Florian below the ThinBackup setting in question is named Wait until Jenkins/Hudson is idle to perform a backup which comes with a Force Jenkins to quiet mode after specified minutes.

AudioDroid
  • 2,292
  • 2
  • 20
  • 31
user3232823
  • 1,867
  • 3
  • 18
  • 27
  • 10
    Thanks. Just wanted to add that the `thinBackup` setting in question - in the currently available version 1.7.4 - in named `Wait until Jenkins/Hudson is idle to perform a backup` which comes with a `Force Jenkins to quiet mode after specified minutes` value: "To be sure that nothing get changed during the backup Jenkins will swichted to a 'Quiet Mode' where no new jobs in the queue are handled. However this value in minutes specify when Jenkins get forced to the 'Quiet Mode'." – Florian Oct 26 '15 at 13:22
  • 3
    Thank you so much! Thin Backup caused this here too – user2636840 Jan 21 '16 at 07:53
  • 2
    I see this also. It happens when a long running job gets stuck, thinBackup wants to do backup but only when jobs not running so it cannot do backup and restart. If stuck job is killed I see it takes a few minutes before the jenkins restart is done. – gaoithe Aug 12 '17 at 13:13
  • 4
    This answer is - and the comments to it - still relevant in mid-2019. – montrealist May 31 '19 at 14:29
  • 1
    Still relevant in late 2020. There was no way I could have figured it out this on my own. Thanks. It says that if we disable this option backup correctness is not guaranteed. I have setup Thin backup to run when I am 100% sure no one will be changing the job configuration (there are only 2 admins). Does running jobs too have any impact on backup? – tryingToLearn Oct 16 '20 at 07:16
26

This message is displayed when someone with enough administration rights has clicked "Prepare for Shutdown" from the global configuration, or went to http://jenkins/safeRestart URL.

If you are absolutely sure that none of the administration have clicked "Prepare for Shutdown" (which you cannot be sure of, unless you are the only administrator), then you should look for someone using your credentials, either directly in browser, or through command line.

Review your webserver's access logs and see if anyone or anything (some script) is accessing the /safeRestart URL and /quietDown URL.

Slav
  • 27,057
  • 11
  • 80
  • 104
  • 1
    Thanks for being help!!! It doesn’t restart Jenkins. It just display message “Jenkins is going to shut down” and cancel all schedule jobs. One thing it happen around midnight of a specific day of week (lets say Thursday mid night) and it work fine all other days of week. May be some update is scheduled and restart Jenkins after update? I looked into Jenkins logs, and didn’t find anything. Is there a specific one I need to look into? Any advice!! – user3232823 Oct 13 '14 at 13:30
  • There is nothing in Jenkins logs when someone clicks `/quietDown` URL. You will have to check your webserver access logs to get the exact time this happens. Like I mentioned, make sure other people don't have admin rights, and make sure there is no automatic script calling this URL. A Jenkins update would not trigger this. – Slav Oct 14 '14 at 13:22
  • So it was a plug in. Thanks for great help !! – user3232823 Oct 29 '14 at 19:33
13

To get rid of the 'Shutdown' message one can also login to the actual Jenkins admin section, go to "Manage Jenkins" link on the left then click on ->"Cancel Shutdown"

Znamor
  • 131
  • 1
  • 4
  • **Note:** in case of the above issue with ThinBackup this only helps temporarily; when you refresh the UI the message is back (I suppose the plugin keeps pushing Jenkins into quiet mode). – montrealist May 31 '19 at 14:27
3

Please check any builds are running more then excepted time. Because of this reason most of time is will show "Jenkins going to shut down".

Arun kumar
  • 31
  • 1