Uploaded image for project: 'Jenkins'
  1. Jenkins
  2. JENKINS-41218

Provide native systemd unit

    XMLWordPrintable

Details

    • Improvement
    • Status: Closed (View Workflow)
    • Critical
    • Resolution: Fixed
    • packaging
    • None
    • 2.335, 2.332.1

    Description

      Currently debian packages (and presumably redhat/suse/etc) ship with old style SysV init.d file.

      Most distributions are now systemd based, and to be able to make use of it's additional features it would be useful have /lib/systemd/system/jenkins.service file.

      This would allow features like systemd's restart functionality to work (useful when Jenkins occasionally crashes, etc). See discussion around this here: http://serverfault.com/questions/760552/how-to-use-automatic-restart-with-jenkins-on-systemd

      Details of how provide both systemd unit file and SysV init file are detailed here:
      https://wiki.debian.org/Teams/pkg-systemd/Packaging

      This should be applicable to all distro, and systemd unit most likely the same across them all, as it's much more standardised than each distros SysV init infrastructure.

      https://github.com/jenkinsci/packaging

      Attachments

        Issue Links

          Activity

            basil Basil Crow added a comment -

            Does this change the ability of Jenkins to run on ports 80 and/or 443? One needs root privilege to use those ports, the old init.d worked with https port set to 443, but I had no luck starting Jenkins 2.335 via systemd on port 443 (I ended up using NGINX as a proxy).

            zbynek Fixed in jenkinsci/packaging#285 toward Jenkins 2.336. In the future, please file a new Jira issue with details about the Linux distribution being used and steps to reproduce the problem.

            basil Basil Crow added a comment - Does this change the ability of Jenkins to run on ports 80 and/or 443? One needs root privilege to use those ports, the old init.d worked with https port set to 443, but I had no luck starting Jenkins 2.335 via systemd on port 443 (I ended up using NGINX as a proxy). zbynek Fixed in jenkinsci/packaging#285 toward Jenkins 2.336. In the future, please file a new Jira issue with details about the Linux distribution being used and steps to reproduce the problem.

            We just upgraded LTS from 2.319.3 to 2.332.1 and this seemed to break our install. To fix we had to manually re-enable the service with:

            systemctl enable jenkins

            After running that, all is well.

            jsnod Jordan Snodgrass added a comment - We just upgraded LTS from 2.319.3 to 2.332.1 and this seemed to break our install. To fix we had to manually re-enable the service with: systemctl enable jenkins After running that, all is well.
            hybby drew j added a comment -

            We've recently upgraded to LTS 2.332.1 as well and have noticed that on RHEL-based distos, the shipped unit file does not respect the configuration which is still written to `/etc/sysconfig/jenkins`.

            We had a custom `JENKINS_JAVA_CMD` statement which was ignored as a part of rebuilding on the new LTS version, which caused the service to fail to start up.

            I think if the RHEL package is going to ship wit h `/etc/sysconfig/jenkins`, the unit file needs to respect it when it's altered.

            hybby drew j added a comment - We've recently upgraded to LTS 2.332.1 as well and have noticed that on RHEL-based distos, the shipped unit file does not respect the configuration which is still written to `/etc/sysconfig/jenkins`. We had a custom `JENKINS_JAVA_CMD` statement which was ignored as a part of rebuilding on the new LTS version, which caused the service to fail to start up. I think if the RHEL package is going to ship wit h `/etc/sysconfig/jenkins`, the unit file needs to respect it when it's altered.
            ianw Ian Williams added a comment -

            hybby, that should probably be a new issue, linked to this one as this issue is closed.

            ianw Ian Williams added a comment - hybby , that should probably be a new issue, linked to this one as this issue is closed.
            basil Basil Crow added a comment -

            lkisac01 Kindly refrain from commenting on closed tickets with requests for help that have nothing to do with the ticket you are commenting on. This is a bug tracker, not a help desk. A quick search of this bug tracker will show that you are looking for JENKINS-67165. For further requests for help please post to the user mailing list.

            basil Basil Crow added a comment - lkisac01 Kindly refrain from commenting on closed tickets with requests for help that have nothing to do with the ticket you are commenting on. This is a bug tracker, not a help desk. A quick search of this bug tracker will show that you are looking for JENKINS-67165 . For further requests for help please post to the user mailing list .

            People

              basil Basil Crow
              nickbrown Nicholas Brown
              Votes:
              14 Vote for this issue
              Watchers:
              28 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: