Package: libapache2-mod-uwsgi Version: 2.0.12-7 Severity: critical File: /etc/apache2/mods-available/uwsgi.load Justification: breaks unrelated software
libapache2-mod-uwsgi provides /etc/apache2/mods-available/proxy_uwsgi.load and /usr/lib/apache2/modules/mod_proxy_uwsgi.so and enables the module in the postinst: apache2_invoke enmod @@module_name@@ || exit 1 https://sources.debian.net/src/uwsgi/2.0.12-7/debian/libapache2-mod-__MODULE__.postinst.in/ However, https://sources.debian.net/src/uwsgi/2.0.12-7/debian/libapache2-mod-__MODULE__.prerm.in/ seems to fail to dismod on purge: Original log is from jessie: $ sudo apt --purge remove libapache2-mod-uwsgi libapache2-mod-wsgi Removing libapache2-mod-uwsgi (2.0.7-1) ... Purging configuration files for libapache2-mod-uwsgi (2.0.7-1) ... Removing libapache2-mod-wsgi (4.3.0-1) ... ERROR: Can't open /etc/apache2/mods-enabled/uwsgi.load: No such file or directoryModule wsgi disabled. apache2_invoke prerm: Disable module wsgi apache2_reload: Your configuration is broken. Not restarting Apache 2 apache2_reload: apache2: Syntax error on line 140 of /etc/apache2/apache2.conf: Could not open configuration file /etc/apache2/mods-enabled/uwsgi.load: No such file or directory Purging configuration files for libapache2-mod-wsgi (4.3.0-1) ... apache2_invoke postrm: Purging state for wsgi Not restarting Apache on a server which is providing multiple hosts is very bad, especially as apt|dpkg exits cleanly. Unless the admin is watching the purge output directly, the reason for the server going offline would not be obvious. Once the problem is spotted: $ sudo a2dismod uwsgi $ sudo apache2ctl restart ... does allow apache to restart successfully. Reproduced in a sid VM: $ sudo apt install libapache2-mod-uwsgi libapache2-mod-wsgi .... $ sudo apache2ctl -M|grep wsgi AH00558: apache2: Could not reliably determine the server's fully qualified domain name, using 127.0.1.1. Set the 'ServerName' directive globally to suppress this message uwsgi_module (shared) wsgi_module (shared) neil@debian-sid:~$ sudo apt --purge remove libapache2-mod-uwsgi libapache2-mod-wsgi Reading package lists... Done Building dependency tree Reading state information... Done The following packages were automatically installed and are no longer required: libjansson4 libmatheval1 libpython2.7 libsodium18 libyaml-0-2 libzmq5 uwsgi-core Use 'sudo apt autoremove' to remove them. The following packages will be REMOVED: libapache2-mod-uwsgi* libapache2-mod-wsgi* 0 upgraded, 0 newly installed, 2 to remove and 0 not upgraded. After this operation, 342 kB disk space will be freed. Do you want to continue? [Y/n] (Reading database ... 46879 files and directories currently installed.) Removing libapache2-mod-uwsgi (2.0.12-7) ... Removing libapache2-mod-wsgi (4.5.7-1) ... Module wsgi disabled. apache2_invoke prerm: Disable module wsgi apache2_reload: Your configuration is broken. Not restarting Apache 2 apache2_reload: apache2: Syntax error on line 140 of /etc/apache2/apache2.conf: Syntax error on line 1 of /etc/apache2/mods-enabled/uwsgi.load: Cannot load /usr/lib/apache2/modules/mod_uwsgi.so into server: /usr/lib/apache2/modules/mod_uwsgi.so: cannot open shared object file: No such file or directory (Reading database ... 46865 files and directories currently installed.) Removing libapache2-mod-wsgi (4.5.7-1) ... Purging configuration files for libapache2-mod-wsgi (4.5.7-1) ... apache2_invoke postrm: Purging state for wsgi Removing libapache2-mod-uwsgi (2.0.12-7) ... Purging configuration files for libapache2-mod-uwsgi (2.0.12-7) ... $ sudo service apache2 restart Job for apache2.service failed because the control process exited with error code. See "systemctl status apache2.service" and "journalctl -xe" for details. $ sudo service apache2 status ● apache2.service - The Apache HTTP Server Loaded: loaded (/lib/systemd/system/apache2.service; enabled; vendor preset: enabled) Active: failed (Result: exit-code) since Mon 2016-10-03 17:22:08 BST; 3s ago Process: 27997 ExecStop=/usr/sbin/apachectl stop (code=exited, status=1/FAILURE) Process: 28004 ExecStart=/usr/sbin/apachectl start (code=exited, status=1/FAILURE) Main PID: 27843 (code=exited, status=0/SUCCESS) Oct 03 17:22:08 debian-sid systemd[1]: apache2.service: Failed with result 'exit-code'. Oct 03 17:22:08 debian-sid systemd[1]: Starting The Apache HTTP Server... Oct 03 17:22:08 debian-sid apachectl[28004]: apache2: Syntax error on line 140 of /etc/apache2/apache2.conf: Could not open configuration file Oct 03 17:22:08 debian-sid apachectl[28004]: Action 'start' failed. Oct 03 17:22:08 debian-sid apachectl[28004]: The Apache error log may have more information. Oct 03 17:22:08 debian-sid systemd[1]: apache2.service: Control process exited, code=exited status=1 Oct 03 17:22:08 debian-sid systemd[1]: Failed to start The Apache HTTP Server. Oct 03 17:22:08 debian-sid systemd[1]: apache2.service: Unit entered failed state. Oct 03 17:22:08 debian-sid systemd[1]: apache2.service: Failed with result 'exit-code'. Again, sudo a2dismod uwsgi fixes the problem. - System Information: Debian Release: stretch/sid APT prefers unstable APT policy: (500, 'unstable'), (500, 'testing'), (500, 'stable'), (1, 'experimental') Architecture: amd64 (x86_64) Foreign Architectures: i386, armhf, arm64 Kernel: Linux 4.7.0-1-amd64 (SMP w/4 CPU cores) Locale: LANG=en_GB.utf8, LC_CTYPE=en_GB.utf8 (charmap=UTF-8) Shell: /bin/sh linked to /bin/dash Init: systemd (via /run/systemd/system) Versions of packages libapache2-mod-uwsgi depends on: ii apache2-bin [apache2-api-20120211] 2.4.23-5 ii libapr1 1.5.2-4 ii libaprutil1 1.5.4-2 ii libc6 2.24-3 Versions of packages libapache2-mod-uwsgi recommends: pn uwsgi-core <none> Versions of packages libapache2-mod-uwsgi suggests: pn uwsgi <none> -- no debconf information

