[ https://issues.jenkins-ci.org/browse/JENKINS-8801?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=159491#comment-159491 ]
Edward Rudd commented on JENKINS-8801: -------------------------------------- I rechecked the latest jenkins release and it seems that a "restart" when updating plugins doesn't actually do a full restart (e.g. respawning the java process) so the PID remains the same after "restarting" when loading new/updated plugins. Whether there are other "Cases" where a restart does cause a re-spawn (and new pid) I am unsure of. IF that can be confirmed that a restart never introduces a new pid, then this can be resolved. > When using the init scripts in the Redhat RPM package, the PID file is not > updated when restarted from web interface > -------------------------------------------------------------------------------------------------------------------- > > Key: JENKINS-8801 > URL: https://issues.jenkins-ci.org/browse/JENKINS-8801 > Project: Jenkins > Issue Type: Bug > Components: core > Affects Versions: current > Environment: CentOS 5 x86, OpenJDK > Reporter: Edward Rudd > > The init script stored the PID of the java process start in > /var/run/jenkins.pid. This is used when the init script stops or restarts > the jenkins proces. It is also used when rotating log files via the > logrotate script. > However, if I install a plugin, or update a plugin and restart jenkins from > the web interface the PID is incorrect (it's the PID when jenkins first > started, NOT after it was restarted via the web interface). This causes the > log rotation script to not work and the init scripts to not shut down/restart > jenkins. > The logrotation is what really brought this to my attention as the logs were > rotated, but since the PID was incorrect jenkins was not sent the SIGALARM so > that it would reopen the log files.. And as such kept logging to the now > deleted log file and consequently filled up that partition. > Ideally jenkins should manage the PID itself, and just have an extra argument > passed on startup.. i.e. --pidfile /var/run/jenkins.pid -- This message is automatically generated by JIRA. If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.jenkins-ci.org/secure/ContactAdministrators!default.jspa For more information on JIRA, see: http://www.atlassian.com/software/jira