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

Setting JENKINS_ENABLE_ACCESS_LOG="yes" causes jenkins startup failure

    • Jenkins 2.175

      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

          [JENKINS-55149] Setting JENKINS_ENABLE_ACCESS_LOG="yes" causes jenkins startup failure

          Oleg Nenashev added a comment -

          keithmarsh2would you like to submit a pull request for it?

          Oleg Nenashev added a comment - keithmarsh2 would you like to submit a pull request for it?

          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

          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

          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

          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

          Oleg Nenashev added a comment -

          To be released in Jenkins 2.175

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

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

              Created:
              Updated:
              Resolved: