Month: June 2007

Thad's Tech Tips

Hello, random Googler. This one is for you.

Today's post is about some issues I've been having at work with an old Web server running Fedora Core 2. For various reasons, I have been attempting to update the packages on this old piece of junk to the latest available versions. (That is, the latest available for FC2; I'm not going to try the Herculean task of updating to 7.) For those of you who are not interested in technical details on server administration, this post is not for you; it is for the random Googler who found this page by searching for some of the keywords in the below explanation. Keywords like 4f2a6fd2, 6cdf2cc1, yum, GPG, and zlib.

The reason that I am posting this is that I have spent several days figuring this shit out for myself, with only minimal aid provided by Google searches; there seems to be no information anywhere detailing this set of problems, and I'd like to make life a little easier for the next poor bastard caught in this situation.

Problem #1 is finding a yum repository. The Fedora Legacy Project has shut down. There are still a goodly number of mirrors operational as of this writing, but my copy of yum rejected a number of them based on errors like the following:

Gathering header information file(s) from server(s)
Server: Fedora Core 2 - via Fedora Legacy Project
retrygrab() failed for:
http://[...]/fedora/2/os/i386/headers/header.info
Executing failover method
failover: out of servers to try
Error getting file http://[...]/fedora/2/os/i386/headers/header.info
[Errno 4] IOError: HTTP Error 404: Not Found


A couple of URLs I've found that do have the header.info file are:

http://www.blagblagblag.org/pub/mirrors/fedoralegacy/fedora/$releasever/updates/$basearch/
http://fedoralegacy.mirrors.redwire.net/fedora/$releasever/updates/$basearch/

and the latter, conveniently, is even the top option in the default /etc/yum.conf . So just comment out the Main Fedora Updates section and uncomment the pertinent lines under Fedora Legacy Project.

(Aside gripe: b2evo apparently automatically turns URLs into links, even if they are obviously bullshit URLs. Update 2008-01-17: Switching to WordPress took care of this problem.)

Then comes my next problem:

warning: rpmts_HdrFromFdno: V3 DSA signature: NOKEY, key ID 4f2a6fd2
Error: Could not find the GPG Key necessary to validate pkg /var/cache/yum/updates-released/packages/pango-1.4.1-1.i386.rpm
Error: You may want to run yum clean or remove the file:
/var/cache/yum/updates-released/packages/pango-1.4.1-1.i386.rpm
Error: You may also check that you have the correct GPG keys installed


It turns out that key is actually located on the default install. Just do:

rpm --import /usr/share/doc/fedora-release-2/RPM-GPG-KEY-fedora

You'll probably also want to import http://www.fedoralegacy.org/FEDORA-LEGACY-GPG-KEY.

You'd think that would be the end of my GPG problems. But you'd be wrong.

warning: rpmts_HdrFromFdno: V3 DSA signature: NOKEY, key ID 6cdf2cc1
Error: Could not find the GPG Key necessary to validate pkg /var/cache/yum/crash-hat/packages/zlib-1.2.2.2-0.i386.rpm
Error: You may want to run yum clean or remove the file:
/var/cache/yum/crash-hat/packages/zlib-1.2.2.2-0.i386.rpm
Error: You may also check that you have the correct GPG keys installed


Now this one turned out to be a bit tricky. All my Google searches for "6cdf2cc1" turned up people trying to install a certain open-source anti-virus program (I'm omitting its name because if you're like me, you'll see page after page of results mentioning that program and then attempt a Google search which removes that search term). Very few mentioned zlib, and none told me where I could find the appropriate GPG key.

After some further banging my head against the wall, it occurred to me to ask myself what set zlib apart from all the other packages, since they hadn't given me any errors.

As it turns out, zlib was the only package hanging out in the /var/cache/yum/crash-hat/packages directory. It was, in fact, from a different repository, not the Fedora Legacy repos listed above.

So I Googled crash-hat and the very first match was titled CrashHat YUM Repository. It linked the appropriate GPG-KEY and that was all I needed; at last I could update my server. Now it is merely ancient, not decrepit.

With any luck, this may help fix some of the other issues the server's been having. Perhaps more on those at a later date.

Another Love Letter to Microsoft

Here is what I love about Windows 2000's network configuration.

First of all, if you uninstall a network card -- say, for example, because you are having trouble getting it to work, perhaps trouble that suspiciously coincides with the latest round of Microsoft patches --, and then reinstall that card, you will find that your network settings have defaulted back to DHCP instead of static IP.

So you'll have to re-enter your IP.

If the machine you are currently working on happens to be a Web server that uses 250 different IP's, you will have to re-enter your 250 IP's.

But Thad, you say, that is awesome! How could life possibly get any better?

Well, it may seem difficult, but it does get better.

You can only enter one IP at a time.

And you can't copy and paste.

And no matter how many dozen times you enter the netmask 255.255.252.0, it will always default to 255.255.255.0.

And and every single time you tell it to add a new IP, it pops the new IP window up right on top of the list of existing IP's. So that if it is, just for the sake of argument, 11:30 at goddamnfuckinghellshitcock night and you are entering 250 different addresses, you have to scroll a bar and then drag a window to see the last one you entered. In the absurdly unlikely event that you somehow have trouble keeping your place under those conditions.

Awesome enough for you?

Yes, I am sure you are saying. Yes, that is just incredibly, unspeakably awesome. There is no possible greater threshold for awesomeness.

Well shut up, you're wrong.

Let's say you make a mistake. Let's say you somehow enter the same IP address twice. I know, there is absolutely no way of that happening under the circumstances, but bear with me in this thought experiment.

Let's say you enter an IP twice. It doesn't like it when you do that.

But does it tell you when you enter the redundant IP? No, that would make too much sense. Does it just delete the redundant IP itself seeing as the two are identical? Of course not. That would be stupid. That would require someone at Microsoft to write an entire extra line of code.

But Thad, you may say, surely they must at least tell you which IP is redundant?

My friend, where's the fun in that? Why tell you when they can instead just make you strain your eyes staring at every single IP you've entered?

Oh, and also, there's no way of sorting them.

They don't pay me enough for this shit.

Escape from Crazytown

A thief comes during the night and steals 13 oxen.

Hello!

I have migrated my site to a new server!

Because it turns out that my previous hosting provider is a shining example of what I mentioned in my previous post about how all my friends are currently campaigning for the office of Mayor of Crazytown.

I would like to thank my previous hosting provider for three and a half years of hosting which was relatively free of capriciously removing the site and pretending it was an accident. And even before that, a redirect to the ol' BBS waaaaay back in '01. We had some good times, buddy, and I wish you all the best; take your ice cream cone and run with it.

On another topic, I would like to share some useful information with random people who have found this site with Google!

If you are in the process of migrating your site and don't want to ask for help from your hosting provider because your hosting provider is currently campaigning for the office of Mayor of Crazytown, and if you need to export your MySQL DB (say, for example, because it has all your blog data on it), here is the operative command:

mysqldump -u username -p dbname --single-transaction > foo.sql

That "--single-transaction" flag is key if you're getting the following error:

mysqldump: Got error: 1044: Access denied for user 'username'@'localhost' to database 'dbname' when using LOCK TABLES

Because what that generally means is you have read access for the DB, but you don't have permission to lock it.

Don't say I never gave you anything, random Googler.

(Also, now that I have migrated the site to a server I control, I can set the whole mysqldump thing up as a cron job. Whoo redundancy! Whoo redundancy!)

I hope that you, my loyal readers, as well as random Googlers, will continue to follow my very boring exploits as I continue to chronicle them -- this time on a new server.

Huzzah!