Following this answer, I have tried restarting a Jenkins instance using:
(jenkins_url)/safeRestart
and
(jenkins_url)/restart
Both failed with the following message:
Jenkins cannot restart itself as currently configured.
Searching for Jenkins cannot restart itself as currently configured
shows that the message appears when the app.lifecycle.canRestart
is on, but I am not sure how to set it.
Any idea how to make Jenkins restartable?
I also restarted the Jenkins service and it worked. It did take 3-4 minutes after I restarted the service for the page to load up, though. So make sure you're patient before moving on to something else.
Create a job e.g. "Reboot-Slave", and set it with shell "shutdown -r -t 0", and take the target slave name as a parameter. (in this way, the restart command will be executed directly on the target slave that you want to restart.)
Go to Manage Jenkins links. Find the option "Install as Windows service". Click on install. Now (jenkins_url)/restart option will work. I faced this same issue now
I installed Restart Safely plugin available in Jenkins Plugin Manager
Jenkins -> Manage Jenkins -> Manage Plugins -> Search for Safe Restart -> Install it.
Then Go to Manage Jenkins -> "Install as Windows service" -> install
Then Restart Safely appear on the Dashboard. Thanks to Shwetank Singh.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With