Upgrade Shenanigans – 16.04 LTS
For a few months, every time I log into my droplets I get a banner advising me to upgrade to the new ubuntu 16.04LTS. I had hesitated as I worried that there would be repercussions.
My first attempt, on a very simple droplet with an nginx webserver with a simple Ghost blog installed. It was a flipping disaster. nodes.js failed, the install broke the nginx, and after 4 hours of messing with it, I punted and restored the snapshot I took.
Before the second attempt, I created a new droplet and built a fresh Ghost instantiation, and installed it from scratch. This time, I learned the proper install and setup. How to configure nginx properly, how to setup and install the Ghost package, and the big change in linux, the systemd.
The second upgrade attempt, worked first time.
But a Ghost install is pretty simple compared to a WordPress install. That uses a full LAMP stack, with a bunch more goodies than the ghost.
I started out the usual, I created a snapshot. I figured that it should be easy. One of the steps in the do-release-upgrade process creates a second instantiation of the sshd, listening on port 1022, so that if you get disconnected, you can get control back of the machine.
So, I opened that port on my firewall. (more on this later)
The install went well, with some weirdness about mysql. But after it was done, I was locked out of the machine. I couldn’t connect via http (port 80), and I couldn’t connect via ssh (port 22). zero, zip, nada
Forced power off, and restored the snapshot. The only thing I could think of was that the mysql failure went bonkers.
However, the truth is a bit embarrassing. When I originally set the droplet up, I never setup the firewall. So, when I opened the 1022 port, and “enabled” the firewall, I inadvertently shut me out of the system.
Second attempt, flew through, and worked well.
Painful, but lesson learnt.