#1016131 libapache2-mod-jk: Apache does not start after upgrade (JkWorkersFile only allowed once) #1016131
- Package:
- libapache2-mod-jk
- Source:
- libapache2-mod-jk
- Description:
- Apache 2 connector for the Tomcat Java servlet engine
- Submitter:
- Thorsten Glaser
- Date:
- 2023-02-06 21:06:02 UTC
- Severity:
- normal
- Tags:
After upgrading from buster to bullseye, apache2 does not start any more if libapache2-mod-jk was installed and active prior to the upgrading: $ sudo cleanenv / /etc/init.d/apache2 start Starting Apache httpd web server: apache2 failed! The apache2 configtest failed. ... (warning). Output of config test was: AH00526: Syntax error on line 23 of /etc/apache2/mods-available/httpd-jk.conf: JkWorkersFile only allowed once Action 'configtest' failed. The Apache error log may have more information. This is caused by: $ sudo fgrep -ri JkWorkersFile /etc/ /etc/apache2/mods-available/jk.conf: JkWorkersFile /etc/libapache2-mod-jk/workers.properties /etc/apache2/mods-available/httpd-jk.conf: JkWorkersFile /etc/libapache2-mod-jk/workers.properties Both files exist… $ ll /etc/apache2/mods-available/jk.conf /etc/apache2/mods-available/httpd-jk.conf -rw-r--r-- 1 root root 4802 Oct 14 2018 /etc/apache2/mods-available/httpd-jk.conf -rw-r--r-- 1 root root 4802 Jun 4 2020 /etc/apache2/mods-available/jk.conf … and belong to the same package(!): $ dpkg -S /etc/apache2/mods-available/jk.conf /etc/apache2/mods-available/httpd-jk.conf libapache2-mod-jk: /etc/apache2/mods-available/jk.conf libapache2-mod-jk: /etc/apache2/mods-available/httpd-jk.conf My best guess is that the conffile was renamed but the renaming process was done improperly / violating Policy. As both files are identical… $ md5sum /etc/apache2/mods-available/jk.conf /etc/apache2/mods-available/httpd-jk.conf f6ebd56d10bf0dcb17d79b2133cb9f5c /etc/apache2/mods-available/jk.conf f6ebd56d10bf0dcb17d79b2133cb9f5c /etc/apache2/mods-available/httpd-jk.conf … I guess I can manually deactivate and remove one. Looking at https://packages.debian.org/bullseye/libapache2-mod-jk and https://packages.debian.org/bullseye/amd64/libapache2-mod-jk/filelist httpd-jk.conf seems to be the one that has to go (this is a hint for other people running into this issue). The root cause of this is that applications using mod_jk in buster had to do a workaround to load httpd-jk.conf due to #928813 so… # work around Debian #928813 <IfFile /etc/apache2/mods-available/httpd-jk.conf> # either /etc/apache2/conf-available/httpd-jk.conf with a2enconf httpd-jk # *or* /etc/apache2/mods-available/jk.conf with a2enmod jk # would be correct, but here we are Include /etc/apache2/mods-available/httpd-jk.conf </IfFile> … ends up loading this twice because the old file was not removed during the upgrade. $ sudo rm /etc/apache2/mods-available/httpd-jk.conf $ sudo cleanenv / /etc/init.d/apache2 start Starting Apache httpd web server: apache2 .. This helped, indeed.
Hello, I had only a quick look at this issue. I remember that one configuration file was wrongly named back when Stretch was oldstable and Buster the new stable distribution. For now I suggest to downgrade this bug to important because the issue is not present when upgrading from Bullseye to Bookworm. I can take a look at it later. We probably only need to use a maintscript file to remove the obsolete configuration file on upgrade. Regards, Markus