Upgrading Ubuntu 16.04 LTS to Ubuntu 18.04 LTS

home next >
approximate reading time: 4 minutes
created by pur on 2022/03/11 - last changed on 2022/04/04

::Ubuntu 18.04 LTS Bionic Beaver:: Finally, after it was long overdue, we did a release upgrade form Ubuntu 16.04 LTS to Ubuntu 18.04 LTS on our server. We postponed it for long enough but there was no more procrastinating: The first step was to download the release upgrade package:

sudo apt install update-manager-core

We backed up our home and html data and downloaded it because the automatic backup seemed to have failed. So next, we used the do-release-upgrade:

sudo do-release-upgrade

You will then be asked if some packages should be uninstalled which aren't needed anymore. For every config file, where the maintainers decided to change the standard content, you will be asked if you want to keep your old config, install the new standard config file, view the difference or go to shell to inspect and resolve.

So we restarted after a plethora of prompts and were up and running again and were greeted with Ubuntu 18.04 LTS. But our web server didn't survive the reboot.

AFTER BOOT

So we restarted the apache service:

sudo systemctl restart apache2.service

But it failed. So, as suggested we checked out the system logs

sudo journalctl -xe

And there we found the culprit:

systemd[1]: Starting The Apache HTTP Server...
-- Subject: Unit apache2.service has begun start-up
-- Defined-By: systemd
-- Support: http://www.ubuntu.com/support
--
-- Unit apache2.service has begun starting up.
apachectl[3771]: AH00526: Syntax error on line 230 of /etc/apache2/apache2.conf:
apachectl[3771]: Cannot define multiple Listeners on the same IP:port
apachectl[3771]: Action 'start' failed.
apachectl[3771]: The Apache error log may have more information.
systemd[1]: apache2.service: Control process exited, code=exited status=1
systemd[1]: apache2.service: Failed with result 'exit-code'.
systemd[1]: Failed to start The Apache HTTP Server.
-- Subject: Unit apache2.service has failed
-- Defined-By: systemd
-- Support: http://www.ubuntu.com/support
--
-- Unit apache2.service has failed.
--
-- The result is RESULT.

Let's check out what's going on:

-- Unit apache2.service has begun starting up.
apachectl[3771]: AH00526: Syntax error on line 230 of /etc/apache2/apache2.conf:

The apache service started, but there was a syntax error in the apache2.conf. Well, it seems that some configuration syntax has changed since Ubuntu 16.04. Then, the next line luckily tells us exactly what the problem is:

apachectl[3771]: Cannot define multiple Listeners on the same IP:port

So in the apache config file we commented out these lines in /etc/apache2/apache2.conf:

#Listen 80
#Listen 443 https

After a restart of the apache service, all was working again as before :)

BTC: 1WLANzCKEuo8Zvssi84cyqTFePvQ8f8tW