Jenkins Safe Restart

185 views
Skip to first unread message

capt edgar

unread,
Jun 19, 2015, 11:00:31 AM6/19/15
to jenkins...@googlegroups.com
Does anyone know or aware of any command-line option or scripts to restart Jenkins installed on Apache Tomcat?

I found this on Google https://wiki.jenkins-ci.org/display/JENKINS/SafeRestart+Plugin but just wondering if anyone had used this plugin to make it work for jenkins installed on Apache Tomcat7

regards

Suckow, Thomas J

unread,
Jun 19, 2015, 11:14:44 AM6/19/15
to jenkins...@googlegroups.com
I think you can disable a tomcat service via some api call. Then you could re-enable it.

--
You received this message because you are subscribed to the Google Groups "Jenkins Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-use...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-users/c83423b8-d591-46a9-b9e7-7f055c5fa054%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

capt edgar

unread,
Jun 19, 2015, 12:01:31 PM6/19/15
to jenkins...@googlegroups.com
Hi thomas

Can you be more specific please?

Regards

Richard Bywater

unread,
Jun 20, 2015, 3:00:41 AM6/20/15
to jenkins...@googlegroups.com

Does the safe-restart Jenkins CLI command work with Tomcat?

Richard


--
You received this message because you are subscribed to the Google Groups "Jenkins Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-use...@googlegroups.com.

capt edgar

unread,
Jun 20, 2015, 6:35:06 AM6/20/15
to jenkins...@googlegroups.com
Hi Richard

I'm a newbie to Jenkins so did some investigation and it turns out neither the SAFERESTART Plugin nor the Jenkins CLI command works if Jenkins is installed on Tomcat Server. It will work only if Jenkins is installed as a standalone service

java -jar jenkins-cli.jar -noCertificateCheck -s https://jenkins-test/login --username **** --password ****
java -jar jenkins-cli.jar -noCertificateCheck -s https://jenkins-test/safe-restart  --username **** --password ****

I kept getting this 

root cause 
hudson.lifecycle.RestartNotSupportedException: Default Windows lifecycle does not support restart.

It would be nice to have a plugin for Jenkins which will do a safe restart if the Jenkins itself is installed on Apache Tomcat

Just out of interest anyone know of commands/scripts to safe-restart Tomcat?

Regards

Vincent Latombe

unread,
Jun 20, 2015, 6:55:51 AM6/20/15
to Jenkins Users
Hello,

do you have strong constraint to run Jenkins on top of Tomcat? I think it would be much simpler for you if you just run Jenkins with the embedded container and the service wrapper.

Vincent

capt edgar

unread,
Jun 20, 2015, 7:05:31 AM6/20/15
to jenkins...@googlegroups.com
Hi Vincent

unfortunately yes because that is the current set-up and our Jenkins has about 4000 odd jobs so migrating to new architecture in Jenkins would be sometime.

Vincent Latombe

unread,
Jun 20, 2015, 7:48:42 AM6/20/15
to Jenkins Users
It isn't a big change really, the Jenkins working directory which contains all the data can be reused as is.

Vincent

Hiteswar

unread,
Jun 20, 2015, 9:09:00 AM6/20/15
to jenkins...@googlegroups.com
What about to use tomcat service to call restart service in which stop($catalona_home/bin/shutdown.sh)first then by using Catalina_pid to check running Jenkins service and kill it  before starting($catalina_home/bin/startup.sh) Jenkins service .

Regards
Hiteswar

--
You received this message because you are subscribed to the Google Groups "Jenkins Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-use...@googlegroups.com.
Reply all
Reply to author
Forward
0 new messages