Removing /etc/apache2/conf-available/javascript-common.conf causes crash when upgrading from focal

Bug #1988227 reported by Lena Voytek
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
apache2 (Ubuntu)
In Progress
Undecided
Lena Voytek
javascript-common (Ubuntu)
New
Undecided
Unassigned

Bug Description

With apache2 and javascript-common installed, if /etc/apache2/conf-available/javascript-common.conf is deleted then the command

a2enconf javascript-common

will fail causing apache2 to crash when upgrading. This is similar to LP: #1986959 and its duplicates, though not the same given the symlink error stated:

ERROR: /etc/apache2/conf-enabled/javascript-common.conf is a dangling symlink!

To reproduce, you can run the following commands:

# lxc launch images:ubuntu/focal test-apache2
# lxc exec test-apache2 bash

# apt update && apt dist-upgrade -y
# apt install ubuntu-release-upgrader-core apport pciutils apache2 javascript-common -y
# rm /etc/apache2/conf-available/javascript-common.conf
# do-release-upgrade

ProblemType: Package
DistroRelease: Ubuntu 22.04
Package: apache2 2.4.52-1ubuntu4.1
ProcVersionSignature: Ubuntu 5.15.0-46.49-generic 5.15.39
Uname: Linux 5.15.0-46-generic x86_64
000-default.conf: Error: [Errno 40] Too many levels of symbolic links: '/etc/apache2/sites-enabled/000-default.conf'
Apache2ConfdDirListing: False
Apache2Modules:
 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
 httpd (pid 3909) already running
ApportVersion: 2.20.11-0ubuntu82.1
Architecture: amd64
CasperMD5CheckResult: unknown
Date: Tue Aug 30 21:26:42 2022
Dmesg:

ErrorMessage: installed apache2 package post-installation script subprocess returned error exit status 1
Python3Details: /usr/bin/python3.10, Python 3.10.4, python3-minimal, 3.10.4-0ubuntu2
PythonDetails: N/A
RebootRequiredPkgs: Error: path contained symlinks.
RelatedPackageVersions:
 dpkg 1.21.1ubuntu2.1
 apt 2.4.7
SourcePackage: apache2
Title: package apache2 2.4.52-1ubuntu4.1 failed to install/upgrade: installed apache2 package post-installation script subprocess returned error exit status 1
UpgradeStatus: Upgraded to jammy on 2022-08-30 (0 days ago)
error.log:
 [Tue Aug 30 21:24:00.367235 2022] [mpm_event:notice] [pid 2530:tid 140097858546752] AH00489: Apache/2.4.41 (Ubuntu) configured -- resuming normal operations
 [Tue Aug 30 21:24:00.367323 2022] [core:notice] [pid 2530:tid 140097858546752] AH00094: Command line: '/usr/sbin/apache2'
 [Tue Aug 30 21:25:24.067795 2022] [mpm_event:notice] [pid 2530:tid 140097858546752] AH00491: caught SIGTERM, shutting down
 [Tue Aug 30 21:25:24.101614 2022] [mpm_event:notice] [pid 3909:tid 140294896139392] AH00489: Apache/2.4.41 (Ubuntu) configured -- resuming normal operations
 [Tue Aug 30 21:25:24.101704 2022] [core:notice] [pid 3909:tid 140294896139392] AH00094: Command line: '/usr/sbin/apache2'

Revision history for this message
Lena Voytek (lvoytek) wrote :
Changed in apache2 (Ubuntu):
status: New → In Progress
assignee: nobody → Lena Voytek (lvoytek)
tags: removed: need-duplicate-check
Revision history for this message
Lena Voytek (lvoytek) wrote :

Looks like the error

ERROR: /etc/apache2/conf-enabled/javascript-common.conf is a dangling symlink!

is unrelated to whether or not apache2 crashes. If you also delete /etc/apache2/conf-enabled/javascript-common.conf then the a2enconf failure still happens without a symlink issue.

New test case:

# lxc launch images:ubuntu/focal test-apache2
# lxc exec test-apache2 bash

# apt update && apt dist-upgrade -y
# apt install ubuntu-release-upgrader-core apport pciutils apache2 javascript-common -y
# rm /etc/apache2/conf-available/javascript-common.conf /etc/apache2/conf-enabled/javascript-common.conf
# do-release-upgrade

Revision history for this message
Lena Voytek (lvoytek) wrote (last edit ):

The error can also be reproduced by updating javascript-common normally. Using no-change version updates in my ppa I reproduced it with the following commands

# lxc launch images:ubuntu/jammy test-apache2
# lxc exec test-apache2 bash

# apt update && apt dist-upgrade -y
# apt install software-properties-common apport apache2 javascript-common -y
# rm /etc/apache2/conf-available/javascript-common.conf /etc/apache2/conf-enabled/javascript-common.conf
# add-apt-repository ppa:lvoytek/apache2-test-update
# apt update
# apt upgrade -y

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers