I host this webserver on a Linode server. When I first set it up, the latest available Ubuntu choice was 10.04 LTS, so that's what I picked and it has been running great ever since. I've had a very few outages (one from a construction crew cutting a major data pipe, one from a severe power outage at the hosting center and one from hardware failure) but they have been brief and the Linode team was very good about keeping me informed of progress.
Ubuntu 10.0.4 has also been great with its updates. I run "sudo apt-get update" and "sudo apt-get upgrade --show-upgraded" regularly and have never had a single problem. To say I've been happy is an understatement.
I noticed something in a Google post about 10.04 reaching end of life in April of next year. Actually, that didn't apply to the server version (see Ubuntu Releases), so I actually have until April of 2015, but that did start me thinking. As they say, busy people take care of important things early and that definitely applies to me.
Linode has excellent documentation for this sort of thing. Actually, they have excellent documentation for everything you might want to do on your Linode, but the How to Upgrade to Ubuntu 12.04 (Precise) was my first stop as I contemplated this upgrade. I noted their warning about hastiness:
Yeah? Well, we're at 12 point oh four. Maybe I should wait.. naaw, let's do it!
Oops. I was under the quite mistaken impression that I was doing that when I ran updates. Nope. I was still running 2.6. Linode had already made kernel updates up to 3.5 and all I had to do was select that and reboot, but I hadn't done that. Lesson learned: watch this stuff just a little bit more closely!
I had already done the other updates/upgrades, so I switched to their latest 3.5 kernel and rebooted. That came up fine, as I expected it would. Following the instructions in their document, I prepared for (which included stopping my mailserver and webserver) and ran the "sudo do-release-upgrade -d", which warned me that it could take many hours and that I could hose things horribly if I answered questions incorrectly.
Actually it didn't take all that long and the questions seemed to be about keeping or overwriting configuration files. Of course I chose to keep my files and I will insist that I absolutely made no mistakes there.. and yet it seems that I may have.
Silly me. After reboot I checked that my mailserver still ran but I didn't think to look at Apache. Why? I don't know..
About an hour later I went to look something up on my site and found that it was not running. What the heck? I tried starting it. Nope, so I checked the logs. There I found line after line of this:
[Sun Oct 02 11:10:13 2011] [notice] SIGUSR1 received. Doing graceful restart apache2: apr_sockaddr_info_get() failed for pcunix apache2: Could not reliably determine the server's fully qualified domain name, using 127.0.0.1 for ServerName [Sun Oct 02 11:10:13 2011] [notice] Apache/2.2.14 (Ubuntu) mod_perl/2.0.4 Perl/v5.10.1 configured -- resuming normal operations [Sun Oct 02 11:19:49 2011] [notice] SIGUSR1 received. Doing graceful restart
At the suggestion of Linode support, I checked my /etc/apache2/envvars and noticed that it was missing some important settings: APACHE_LOG_DIR, APACHE_LOCK_DIR and APACHE_RUN_DIR. Sheesh! I added them:
# cat /etc/apache2/envvars export APACHE_RUN_USER=www-data export APACHE_RUN_GROUP=www-data export APACHE_RUN_DIR=/var/run/apache2 export APACHE_LOCK_DIR=/var/lock/apache2 export APACHE_PID_FILE=/var/run/apache2.pid export APACHE_LOG_DIR=/var/log/apache2
And was then able to start Apache. The question is, did I fat finger an answer during the upgrade or is this an upgrade flaw? If the latter, I would expect more people to have this issue as they upgrade over the next year or so. Whatever: if you ran into this and were helped by my mentioning it, that's why I do this stuff, isn't it?
Got something to add? Send me email.
More Articles by Anthony Lawrence © 2012-10-25 Anthony Lawrence
The danger of computers becoming like humans is not as great as the danger of humans becoming like computers. (Konrad Zuse)