• Icon: Improvement Improvement
    • Resolution: Fixed
    • Icon: Critical Critical
    • packaging
    • None
    • 2.335, 2.332.1

      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

          [JENKINS-41218] Provide native systemd unit

          Mark Waite added a comment -

          I've tested packaging PR 266 and found no issues. The transition is looking good to me.

          I've tested in Debian 10, Debian 11, and Red Hat Enterprise Linux 8. I won't be testing in a System V init environment like Devuan. Others will need to do that testing. wwuck, are you available to test the latest build of PR 266 in one of your Devuan environments?

          Mark Waite added a comment - I've tested packaging PR 266 and found no issues. The transition is looking good to me. I've tested in Debian 10, Debian 11, and Red Hat Enterprise Linux 8. I won't be testing in a System V init environment like Devuan. Others will need to do that testing. wwuck , are you available to test the latest build of PR 266 in one of your Devuan environments?

          Tom added a comment -

          markewaite I have run a test on build 36.  Would you like me to test the artifact from build 37 as well?

          Tom added a comment - markewaite I have run a test on build 36.  Would you like me to test the artifact from build 37 as well?

          Mark Waite added a comment -

          No need to run the test again. Thanks for testing.

          Mark Waite added a comment - No need to run the test again. Thanks for testing.

          Basil Crow added a comment -

          Fixed in jenkinsci/packaging#266. Released in 2.335.

          Basil Crow added a comment - Fixed in jenkinsci/packaging#266 . Released in 2.335 .

          basil 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 Konecny added a comment - basil 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).

          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 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.

          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.

          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.

          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.

          Ian Williams added a comment -

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

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

          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 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
            nickbrown Nicholas Brown
            Votes:
            14 Vote for this issue
            Watchers:
            28 Start watching this issue

              Created:
              Updated:
              Resolved: