-
Bug
-
Resolution: Not A Defect
-
Minor
-
RHEL 8.7
v2.375.3
Installed as RPM
This doesn't seem to break our deploy but I did notice that when we do set the "JENKINS_ENABLE_ACCESS_LOG" variable to "no" in /etc/sysconfig/jenkins, when we launch Jenkins, we do see the following in /var/log/messages:
jenkins[40626]: /usr/bin/jenkins: line 110: no: command not found
Line 110 in /usr/bin/jenkins is:
if [ -n "${JENKINS_ENABLE_ACCESS_LOG}" ] && $JENKINS_ENABLE_ACCESS_LOG; then inferred_jenkins_opts="${inferred_jenkins_opts} --accessLoggerClassName=winstone.accesslog.SimpleAccessLogger" inferred_jenkins_opts="${inferred_jenkins_opts} --simpleAccessLogger.format=combined" inferred_jenkins_opts="${inferred_jenkins_opts} --simpleAccessLogger.file='/var/log/jenkins/access_log'" fi
So I'm assuming it's trying to run the variable "$JENKINS_ENABLE_ACCESS_LOG" in the second half of that if statement and fails.
The migration from system V init to systemd that was done in March 2022 changed the configuration method from using /etc/sysconfig/jenkins (that was Red Hat specific) to use systemctl --edit (same for Red Hat, Debian, openSUSE, and more). It is described in "Managing systemd services". There are also several videos available that outline the transition.
If Jenkins 2.375.3 is still honoring changes in /etc/sysconfig/jenkins, then you may have performed the upgrade incorrectly. When Jenkins is installed with an operating system package manager (yum, dnf, zypper, apt, aptitude), it should be upgraded with the same operating system package manager.
One of the transformations performed by the migration script that converts from System V init to systemd is to change the JENKINS_ENABLE_ACCESS_LOG value to use true and false rather than yes and no.
This is not a bug, but rather an upgrade that was not performed.