Ramblings from MostlyChris

Tech stuff and a bit more

Browsing Posts published in October, 2009

If you would like to verify that the key and the certificate match you need to compare the modulus in both of the key file and the certificate file. You can check for differences in the modulus rather easily by sending the output of the comparison command to 'uniq'. If anything shows up, the numbers don't match and that means that the key and certificate do not match.

The command:

$ (openssl x509 -noout -modulus -in server.pem | openssl md5 ;\
openssl rsa -noout -modulus -in server.key | openssl md5) | uniq

My colleague, Kale, pointed out this nice whois server that presents data in a nice and easy to read format. Just run this:

whois -h whois.cymru.com " -v 72.32.231.8"

You will get a nice output like this (although it doesn't fit on my screen in this example):

AS      | IP               | BGP Prefix          | CC | Registry | Allocated  | AS Name
33070   | 72.32.231.8      | 72.32.0.0/16        | US | arin     | 2005-02-25 | RMH-14 – Rackspace.com, Ltd.

This is probably one of a million different ways to fix a Plesk upgrade failure. Here are the specifics…

During an upgrade, it is very important that the hostname match the IP address in /etc/hosts because the updater will use that information to make connections, etc.

While I was doing a recent upgrade I made a typo in the hostname and all went boom. I was following along with my upgrade instructions here: http://blog.mostlychris.com/2009/04/upgrading-plesk-without-using-the-updater/

Since everything was showing as installed, I could not run up2date again after correcting the /etc/hosts typo. Here are the steps I followed to resurrect the mess I created.

1. Get the package from the site (what you put in the sources during the upgrade).
2. Force install the package.

rpm -i –force <package>

3. Since the install removes the Plesk version file, you need to restore it. You can do this by cat'ing the version file you made in the backups from the first failed upgrade.

cat version_backup > /usr/local/psa/version

4. Run the rpm install again.

rpm -i –force <package>

You may need to play around with this a bit to get it to cooperate (ie; running the rpm install a few times). Make sure the version file exists and make sure you have fixed any errors that were caused in the original upgrade before attempting this fix.