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

Setting JENKINS_ENABLE_ACCESS_LOG="yes" causes jenkins startup failure

    Details

    • Similar Issues:
    • Released As:
      Jenkins 2.175

      Description

      If you set JENKINS_ENABLE_ACCESS_LOG="yes" in /etc/default/jenkins, the startup script in /etc/init.d/jenkins appends -accessLoggerClassName... to DAEMON_ARGS.  This is incorrect and causes jenkins startup to fail with the error

      Dec 12 10:50:43 dtg-jenkins jenkins[28926]: /usr/bin/daemon: unrecognized option '--accessLoggerClassName=winstone.accesslog.SimpleA
      Dec 12 10:50:43 dtg-jenkins jenkins[28926]: usage: daemon [options] [--] [cmd arg...]
      Dec 12 10:50:43 dtg-jenkins jenkins[28926]: options:
      Dec 12 10:50:43 dtg-jenkins jenkins[28926]: -h, --help - Print a help message then exit
      ...

      Changing the line in /etc/init.d/jenkins to 

           JENKINS_ARGS="$JENKINS_ARGS --accessLoggerClassName=winstone.accesslog.SimpleAccessLogger --simpleAccessLogger.format=combined --simpleAccessLogger.file=/var/log/$NAME/access_log"

      makes jenkins start correctly and the access log appear correctly in /var/log/jenkins/access_log

        Attachments

          Activity

          Hide
          oleg_nenashev Oleg Nenashev added a comment -

          Keith Marshwould you like to submit a pull request for it?

          Show
          oleg_nenashev Oleg Nenashev added a comment - Keith Marsh would you like to submit a pull request for it?
          Hide
          keithmarsh2 Keith Marsh added a comment -

          That's been done.  It's my first PR, so if I've gone awry, put me straight please.

          https://github.com/jenkinsci/packaging/pull/111

          Show
          keithmarsh2 Keith Marsh added a comment - That's been done.  It's my first PR, so if I've gone awry, put me straight please. https://github.com/jenkinsci/packaging/pull/111
          Hide
          oleg_nenashev Oleg Nenashev added a comment -

          https://github.com/jenkinsci/packaging/pull/111 fixes it. IIUC it might be reasonable to backport it, but I am not sure whether we have a process for packaging

          Show
          oleg_nenashev Oleg Nenashev added a comment - https://github.com/jenkinsci/packaging/pull/111  fixes it. IIUC it might be reasonable to backport it, but I am not sure whether we have a process for packaging
          Hide
          oleg_nenashev Oleg Nenashev added a comment -

          To be released in Jenkins 2.175

          Show
          oleg_nenashev Oleg Nenashev added a comment - To be released in Jenkins 2.175

            People

            • Assignee:
              Unassigned
              Reporter:
              keithmarsh2 Keith Marsh
            • Votes:
              1 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: