you know you're a geek when; ready, aim fire!

Starting w/the latter first, I had to recompile apache on a server today. No problem, it is running Cpanel which comes w/a nice script that does all the work for you. Well, part way through the process I realized I selected the wrong options. At that point, I took steady aim at my foot and fired a direct hit by hitting Ctrl+C to cancel the script. The problem is that it is a series of nested scripts so the controlling scripts kept running. This left me w/an apache that wouldn't start. After some digging, it turns out the httpd.conf had been written to as a blank file. A restore of the previous version and a recompile turned out to fix it.

Stupid me. This is why I don't own firearms. I should know better than to: recompile something w/out an immediate backup of the config file (to save going to backup to do a restore which takes time); to hit Ctrl+C on a script that you didn't write which may or may not be nested and allow Bad Things to happen if you cancel out of one.

During my troubleshooting, I found that apache was trying to use a userid of 4294967295 when it was starting. This brings me to the knowing you're a geek when part. I recognized this as the upper limit of an unsigned long int. Must be that the apache code defines the userid as an unsigned long int and when there isn't one specified, uses the highest available number (probably safer than using the lowest).

The interesting part is an 'apachectl configtest' showed no problem w/a zero byte httpd.conf file. What's strange is that I've never used an unsigned long int in any of my code, just seen many references to it in programming languages and data type specs for databases.

Leave a Reply

Please log in using one of these methods to post your comment: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s