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

Setting JENKINS_ENABLE_ACCESS_LOG="yes" causes jenkins startup failure

XMLWordPrintable

    • 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

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

              Created:
              Updated:
              Resolved: