Installing many packages at once lets the nginx service fail to start
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
nginx (Ubuntu) |
Incomplete
|
Undecided
|
Unassigned | ||
systemd (Ubuntu) |
Confirmed
|
Medium
|
Nick Rosbrook |
Bug Description
Hi,
in our regular tests one does install a whole bunch of server programs to check various things like space, ports, ... - In that test I've started to see since 21st December a fail.
When installing in plucky nginx fails to start.
After digging through many red herrings (e.g. the collision with apache on port 80) I think this still is a real issue, yet I haven't found the lowest level of root cause.
The following will reproduce the issue:
$ lxc launch ubuntu-daily:p p-metric --ephemeral
$ lxc exec p-metric --env=DEBIAN_
$ lxc exec p-metric --env=DEBIAN_
The issue we can see in the log then is
06:05:04 Setting up nginx (1.26.0-3ubuntu1) ...
06:05:04 [0;1;31mJob for nginx.service failed because the control process exited with error code.[0m
06:05:04
06:05:04 [0;1;31mSee "systemctl status nginx.service" and "journalctl -xeu nginx.service" for details.[0m
06:05:04
06:05:04 invoke-rc.d: initscript nginx, action "start" failed.
06:05:04 [0;1;31m×[0m nginx.service - A high performance web server and a reverse proxy server
06:05:04 Loaded: loaded (]8;;file:
06:05:04 Active: [0;1;31mfailed[0m (Result: exit-code) since Wed 2025-01-01 05:05:04 UTC; 11ms ago
06:05:04 Invocation: 7ccc5da4a95940d
06:05:04 Docs: ]8;;man:
06:05:04 Process: 11158 ExecStartPre=
06:05:04 Mem peak: 260K
06:05:04 CPU: 830us
06:05:04
06:05:04 Jan 01 05:05:04 metric-
06:05:04 Jan 01 05:05:04 metric-
06:05:04 Jan 01 05:05:04 metric-
06:05:04 Jan 01 05:05:04 metric-
06:05:04 dpkg: error processing package nginx (--configure):
06:05:04 installed nginx package post-installation script subprocess returned error exit status 1
So we see the config pre-check failing "/usr/sbin/nginx -t -q -g daemon on; master_process on" but it isn't telling us how or why.
A simple "install apache2 + nginx" works fine.
I hope I'm rid of many red herrings that tried to lead me the wrong way and this really is us and will try to simplify the install command to less programs as it might help to understand why it happens.
tags: | added: rls-pp-incoming |
Changed in systemd (Ubuntu): | |
assignee: | nobody → Nick Rosbrook (enr0n) |
Checked further and reduced the set to install to trigger the issue.
And that was ... interesting, imagine a long log that I removed, here is what matters:
1. No other software is needed
I formerly reduced it just to libvirt+nginx, but that only mattered because its dependencies made it upgrade systemd and openssl. Based on the "The following packages will be upgraded:" output I could make it just
$ lxc exec p-metric --env=DEBIAN_ FRONTEND= noninteractive -- apt-get -y --no-install- recommends install systemd nginx
Which will effectively do systemd+ openssl+ nginx:
The following NEW packages will be installed: provider- legacy
nginx nginx-common openssl-
The following packages will be upgraded:
libnss-systemd libpam-systemd libssl3t64 libsystemd-shared libsystemd0 libudev1 openssl systemd systemd-cryptsetup systemd-resolved systemd-sysv systemd-timesyncd udev
2. upgrade vs dist-upgrade before the install matter:
$ lxc exec p-metric --env=DEBIAN_ FRONTEND= noninteractive -- apt-get update -y FRONTEND= noninteractive -- apt-get upgrade -y FRONTEND= noninteractive -- apt-get -y --no-install- recommends install systemd nginx
$ lxc exec p-metric --env=DEBIAN_
$ lxc exec p-metric --env=DEBIAN_
=> still fails
$ lxc exec p-metric --env=DEBIAN_ FRONTEND= noninteractive -- apt-get update -y FRONTEND= noninteractive -- apt-get dist-upgrade -y FRONTEND= noninteractive -- apt-get -y --no-install- recommends install systemd nginx
$ lxc exec p-metric --env=DEBIAN_
$ lxc exec p-metric --env=DEBIAN_
=> works (the same updates were done before)
$ lxc exec p-metric --env=DEBIAN_ FRONTEND= noninteractive -- apt-get update -y FRONTEND= noninteractive -- apt-get upgrade -y FRONTEND= noninteractive -- apt-get -y --no-install- recommends install nginx
$ lxc exec p-metric --env=DEBIAN_
$ lxc exec p-metric --env=DEBIAN_
=> works (not pulling in systemd/openssl)
But if I do the upgrade of ssl/systemd in one go with the nginx install it will fail.