Recent Stuff

First, I’d like to point out the new Photo Gallery I put up here. I decided to start fresh, but look for more pic­tures (and video…yay!) soon.

Sep­tem­ber has been a more relaxed month in that I am no longer under the big dead­line I was stress­ing out about in August. The web server night­mare and sub­se­quent move to a new server has smoothed out rather well. I’ve had vis­its from fam­ily the last two week­ends. And I’ve been play­ing some music here and there, which is always good. Most impor­tantly, I’ve been doing fun things with the boys and Ali­cia since I haven’t had so much extra work to do.

I have a bunch of cool links to post soon, so check back.

Oh, in case you were won­der­ing, we don’t need no stink­ing badges.

 

Server Update — Part II

The prob­lem turned out to be some­thing other than a hard­ware fail­ure. The good news is I have set up a com­pletely new ded­i­cated server with a com­pletely new com­pany (who will be man­ag­ing updates and secu­rity for me). The bad news is, I lost ALL the data that was on the orig­i­nal server.

I do have local back­ups of web sites I did, but I lost data­bases, and peo­ple using web­mail lost saved email. Clients who were doing their own web sites may have lost their data if they wer­ent back­ing it up locally.

Brief recap of events:
1. Server was hacked at the end of July. I hired SeeksAdmin.com to go in and clean up the mess, patch every­thing, and lock it all down. Every­thing was great until the server some­how got rebooted (I had noth­ing to do with it), and it didn’t come back up. Accord­ing to 1and1, my server provider, the machine was stuck boot­ing up because it couldn’t load the ker­nel. They couldn’t select the pre­vi­ous ker­nel because Seek­sAd­min had locked down lilo, the boot­loader. I know Seek­sAd­min had men­tioned they had prob­lems with the new ker­nel work­ing, but they claimed they rebooted the machine mul­ti­ple times and rolled it back to the older ver­sion. I can’t prove or dis­prove that, but the cir­cum­stances are a bit con­cern­ing.
2. I was 99% sure that my back­ups were being per­formed by 1and1, and that all was OK when it came down to re-imaging the hard drive. Unfor­tu­nately, 1and1 locks out the backup FTP server from being accessed except from your ded­i­cated server. So, I had no way of ver­i­fy­ing that the back­ups were OK since the server wouldn’t boot and I couldn’t log in to look at the back­ups.
3. Seek­sAd­min re-imaged the server for me, and after get­ting it back up, I logged in and FTP’d to the backup server to check things out. Noth­ing was there. I was stunned, and I was very angry.

When all was said and done, I was left won­der­ing what had hap­pened. There is really no one person/company to blame, rather, a bunch of bad things con­spired from dif­fer­ent places to screw me over and cause a large night­mare for all the clients I had hosted on that server. Had 1and1 been doing the back­ups, which they were sup­posed to be doing, all would have been OK. But then, it seems the sys­tem had become unsta­ble since Seek­sAd­min had gone in to do their work, so I wouldn’t have run into the prob­lem if I hadn’t hired them. But then, if I never was hacked in the first place, none of this would have hap­pened in the first place.

The sil­ver lin­ing to all of this is that I had been itch­ing to leave 1and1 for quite some time, as they are the Wal-mart of web host­ing. I was stuck with them because the task of mov­ing all my clients was just too time con­sum­ing to think about. The new com­pany I set­tled with is all about ser­vice, and being sup­port­ive of their clients. They are smaller, per­sonal, and respon­sive. I also got away from hav­ing to use Plesk, and am now hap­pily set­ting up all the sites in WHM and CPanel.

 

Kurt Vonnegut, Dead at 84

Ah well…Tin­gal­ing!

Sorry, I haven’t had time to make any Song Of The Week post­ings. Been run­ning around like a head­less chicken, jug­gling jobs, kids, and flam­ing kit­tens. On Tues­day I gave notice that I’m leav­ing my job with P3I, where I am work­ing for the Air Force, and will soon be start­ing to do full-time con­tract work for a mar­ket­ing com­pany based in Raleigh. Luck­ily, this does not mean I will be moving!

I’ll post more info when I know more about it all, but in the mean time, make sure you check out the Top Ten ‘80s Robots (We Expected to Exist By Now). It’s funny ha-ha.

 

After man­ag­ing to get Tomcat5.5 work­ing with Apache2 using mod_jk, my next ven­ture was to enable SSL using a self-signed cer­tifi­cate in Tom­cat. This proved to be quite a task.

The sys­tem I’m set­ting up is run­ning Red­Hat Enter­prise Linux 4.4. I installed all the offi­cial Red­Hat RPM’s to get Tom­cat and Apache talk­ing together with mod_jk (see Part I of this tuto­r­ial).

After 4 days of bang­ing my head on my key­board, I noticed that when I would run:

#java -version

It spit out this:

Java(TM) 2 Runtime Environment, Standard Edition (build pxi32dev-20061002a (SR3) )
IBM J9 VM (build 2.3, J2RE 1.5.0 IBM J9 2.3 Linux x86-32 j9vmxi3223-20061001 (JIT enabled)
J9VM - 20060915_08260_lHdSMR
JIT - 20060908_1811_r8
GC - 20060906_AA)
JCL - 20061002

This let me know that I am sup­posed to be using IBM’s ver­sion of java, which appar­ently is the default on my Red­Hat sys­tem, not Sun’s ver­sion. I think some­where along the way I down­loaded Sun’s jvm, and I assumed that I was sup­posed to be using it’s key­tool to gen­er­ate an SLL cer­tifi­cate for Tom­cat, but such is not the case. This caused me much con­fu­sion, but here’s how I ended up fix­ing it:

1. Gen­er­ate Key­store file
(NOTE: all of this assumes you already have Apache con­fig­ured with SSL. I used OpenSSL, which I don’t go into here, but there are loads of resources online for you, and it’s rel­a­tively easy to do).

Assum­ing you have the default Red­Hat java rpm already installed, run this:

# /usr/lib/jvm/java-1.5.0-ibm-1.5.0.3/jre/bin/keytool -genkey -alias tomcat -keyalg RSA

NOTE: I used Tomcat’s default pass­word of ‘changeit’ when prompted.

The key­store file gets dropped in the home direc­tory of what­ever user you are logged in as. I was root, so I then moved the key­store file to the tom­cat home direc­tory:

# mv /root/.keystore /etc/tomcat5/
# chown tomcat.tomcat /etc/tomcat5/.keystore

2. Next you have to edit Tomcat’s server.xml file

# nano /etc/tomcat5/server.xml

Uncom­ment the SSL con­nec­tor and set it up like so:


<!-- Define a SSL HTTP/1.1 Connector on port 8443 -->
<connector port="8443" maxHttpHeaderSize="8192"
maxThreads="150" minSpareThreads="25" maxSpareThreads="75"
enableLookups="false" disableUploadTimeout="true"
acceptCount="100" scheme="https" secure="true"
clientAuth="false" algorithm="IbmX509" sslProtocol="SSL"
keystoreFile="/etc/tomcat5/.keystore"
keystorePass="changeit" />

Note that I added algorithm=“IbmX509” and I changed sslProtocol=“TLS” to sslProtocol=“SSL”. This is nec­es­sary to get things work­ing with IBM’s jvm.

3. Restart every­thing

# service tomcat5 stop
# service tomcat5 start
# apachectl restart

If you were fol­low­ing along from my last arti­cle, then browse to:

https://yoursite.com:8443/hello.jsp

If all went well, you should see the hello.jsp page show­ing you the sys­tem time!

 

I just got through set­ting up Tomcat5.5, Apache2, and mod_jk on a Red­Hat Enter­prise AS4.4 machine at work. In the past, I have done this by com­pil­ing each com­po­nent sep­a­rately and fin­gling with con­fig files until it all worked. But I wanted to stick with RedHat-approved RPM’s from the Red­Hat net­work to ease updates and patch man­age­ment, and to allow the orga­ni­za­tion to have sup­port options.

I had a lot of trou­ble find­ing any doc­u­men­ta­tion on how to do this any­where, so I thought I’d throw it out here for any­one in a sim­i­lar sit­u­a­tion in search of help.

The fol­low­ing are my notes, sprin­kled with a lit­tle help I got from a Red­Hat sup­port tech.

First, I had to enable the fol­low­ing chan­nel within the Red­Hat Net­work for this system:

–Red Hat Appli­ca­tion Server v. 2 (AS v. 4 for i386)

If you don’t have a RHEL license for updat­ing your sys­tem, you will need one.

Once those chan­nels were enabled, I installed the fol­low­ing pack­ages using up2date at the com­mand line:


# up2date tomcat5
# up2date tomcat5-webapps
# up2date tomcat5-admin-webapps
# up2date mod_jk-ap20

With the pack­ages installed, I set out to con­fig­ure a vir­tual host to pass requests to Tom­cat as needed by using the mod_jk con­nec­tor. The fol­low­ing steps explain how to do this for a web site called example.com using IP address 123.123.123.123. Sub­sti­tute your domain and IP accordingly.

Step 1. — Add mod_jk to Apache

In /etc/httpd/conf/httpd.conf add this:


LoadModule jk_module modules/mod_jk.so
<ifmodule mod_jk.c>
JkWorkersFile "/etc/httpd/conf/workers.properties"
JkLogFile "/etc/httpd/logs/mod_jk.log"
JkLogLevel info
JkLogStampFormat "[%a %b %d %H:%M:%S %Y]"
</ifmodule>

That loads the mod­ule into Apache, tells apache where the worker is that will han­dle jsp/servlets, and tells Apache where to record log entries for mod_jk.

Step 2. — cre­ate a new file called /etc/httpd/conf/workers.properties and add this to it:


[channel.socket:example.com:8009]
port=8009
host=example.com
[uri:example.com/*.jsp]
worker=ajp13:example.com:8009

Step 3. Cre­ate a vir­tual host in /etc/httpd/conf/httpd.conf like so:


<virtualhost 123.123.123.123:80>
ServerAdmin webmaster@example.com
ServerName www.example.com
DocumentRoot /var/www/html
JkMount /*.jsp ajp13
JkMount /servlet/* ajp13
# Deny direct access to WEB-INF
</virtualhost>

Step 4. Set up Tomcat5 by adding this to /etc/tomcat5/server.xml just before the very last </Engine> tag at the bot­tom of the doc­u­ment:


<host name="example" appBase="/var/www/html" unpackWARs="true" autoDeploy="true">
<context path="" docBase="" debug="0" reloadable="true"/>
<alias>www.example.com</alias>
<valve className="org.apache.catalina.valves.AccessLogValve" directory="logs" prefix="web1_access_log." suffix=".txt" pattern="common" resolveHosts="false"/>
</host>

Still with me? We are almost done.

Step 6. Cre­ate a sam­ple jsp file called /var/www/html/test.jsp and add this to it:


Time: < %= new java.util.Date() %>

Step 7. Start up the ser­vices

# apachectl start
# service tomcat5 start

Step 8. Try it!

Browse to http://www.example.com/test.jsp

If all went well, you should see the system’s cur­rent date and time when you load the web page. Con­grats. Hope it works for you!

 

The Old Switcheroo

On Jan­u­ary 2 I’ll be going back to work at the Air Force Com­bat Cli­ma­tol­ogy Cen­ter, but this time with a new con­trac­tor, P3I. My pre­vi­ous time there ended when the con­tract ran out and there was no money left to rehire me, but the new con­tract started with the new com­pany, and it is good for a few years. They made me an offer I couldn’t refuse, and Ali­cia and I decided we were in need of a lit­tle sta­bil­ity in the work sce­nario right now. My posi­tion will be Web Appli­ca­tions Devel­oper and Designer. That’s a mouthful.

I’m really look­ing for­ward to being back there in a lot of ways. I had a lot of good friends there, and have missed the com­radarie as well as being able to work on some high-end appli­ca­tions and sys­tems. I’ll be able to hit the ground run­ning since I spent a year and a half there already.

How­ever, I’ll def­i­nitely miss the flex­i­bil­ity I’ve had and the fun time I’ve enjoyed with Posi­tion Builders, espe­cially the hacky sack breaks. It was really tough to make this deci­sion, and I feel bad about leav­ing what was an excel­lent job with great people.

So that’s the news.

Fol­low­ing up on the pre­vi­ous post about the Ion ITTUSB turntable, I can’t find one in stock any­where. I went ahead and placed an order with Ama­zon, but they said they wouldn’t have it in stock until Jan­u­ary 27 — Feb­ru­ary 15. If any­one knows of any­where that has one of these things in stock, PLEASE let me know! I can’t wait that long!