eXamining the Xenial Xerus

closeHey, just so you know ... this post is now about 4 years and 3 months old. Please keep that in mind as it very well may contain broken links and/or outdated information.

Ah, April. The Stanley Cup Finals have started and my Tampa Bay Lightning have already advanced to round 2. The NBA Finals have also started and my Cleveland Cavaliers are looking to sweep the Pistons on Sunday and move on to the conference semi-finals. We’re about a month into the new baseball season and both my Rays and Indians are off to slow starts. The NFL draft starts in a few days, which mean new hopes for the Browns (including RG3) and Bucs.

Besides the confluence of sporting events, though, April means a new Ubuntu release! 16.04 LTS, Xenial Xerus arrived this past week and per my usual, I proceeded to immediately upgrade my server.

As is my habit, I ran my backup scripts, made sure everything was current (sudo aptitude update), and then kicked off the upgrade (sudo do-release-upgrade). Normally this is pretty straightforward, but this time:

errors were encountered while processing:
libapache2-mod-perl2
perl
phpmyadmin
perl-modules-5.22
libclass-xsaccessor-perl
libparse-debianchangelog-perl
libmodule-build-perl
nagios3-core
libpath-tiny-perl
apache2
apache2-bin
libperl5.22:amd64
libsnmp30:amd64
libapache2-mod-php7.0
snmp

Upgrade complete

The upgrade has completed but there were errors during the upgrade process.

Oh oh.

It took some cleanup work, but I eventually got everything working again. Most of the problems were self-inflicted and took me down the complex rabbit hole of package installations, removals, dependencies, and configurations.

The first problem was related to some old packages from Nagios 3. I had manually install Nagios 4 and Adagios but apparently hadn’t cleaned up the older version properly. As a result, the uninstall of the nagios3-cgi package was failing due to a non-existent script. I had to comment out the call to that script (in /var/lib/dpkg/info/nagios3-cgi.prerm) and then was able to remove the package (and nagios3-common). Once that was cleaned up, I was able to sudo apt-get upgrade and sudo apt-get dist-upgrade to resume the upgrade process.

After I finished re-applying my changes to affected configuration files, I ran into a few more problems related to the switch from PHP5 to PHP7. Like with Nagios, some old PHP5 stuff was left behind, messing up my Apache configuration. I had to manually remove the PHP5 symlinks in Apache’s mods-enabled folder and create the missing PHP7.0 symlinks. I also had to sudo apt-get install php-mbstring to get the php7.0-mbstring package. PHP7 also broke my PHPSysInfo installation so I had to download the 3.2.5 version from GitHub and install that instead. And finally, PHP7 broke my WordPress site. I tracked the problems down to some broken plugins (one which I fixed manually and another due to missing packages (php-curl and php7.0-curl)).

Whew!

After all of that, for some reason I decided to clean up my packages list and attempted to purge all my “removed” packages and configuration files with this command: dpkg --list |grep "^rc" | cut -d " " -f 3 | xargs sudo dpkg --purge. That was a mistake which messed up a bunch of installed packages that were relying on apparently old configuration files from previously removed packages. I had to re-install MySQL 5.7 (sudo apt-get install mysql-server-5.7 --reinstall) , fix a bunch of Nagios symlinks and restore my configuration files from backup, etc. Yikes, guess I’m a glutton for punishment.

So now, a few days later, everything seems to be running smoothly again. Next up in October? Yakkety Yak, of course!

One Comment

  1. I noticed when logging into my server yesterday I was getting some strange errors:

    -bash: fork: retry: Resource temporarily unavailable
    -bash: fork: retry: No child processes
    -bash: fork: retry: Resource temporarily unavailable
    /usr/bin/lesspipe: 1: /usr/bin/lesspipe: Cannot fork
    -bash: fork: retry: No child processes
    -bash: fork: retry: Resource temporarily unavailable
    -bash: fork: retry: No child processes
    -bash: fork: retry: Resource temporarily unavailable
    -bash: fork: retry: No child processes

    They seem to be related to a lack of memory. A free -m showed that my available memory was only 192 (mb?) which was strange since that didn’t match total (7000) minus used (5000). I rebooted the server and that seems to have fixed it for now.

Leave a Reply

Your email address will not be published. Required fields are marked *