Linux

Request Tracker 3.6.5 broken after updating Cent OS

Can’t locate object method “seek” via package “File::Temp” at /usr/lib/perl5/site_perl/5.8.8/MIME/Parser.pm line 816.

The underlying problem is perl was updated and overwrote the “correct” version of File::Temp that you probably installed when setting up RT and forgot about. To fix this issue


cpan install File::Temp
/etc/init.d/httpd restart

MAKE SURE TO RESTART APACHE! I didn’t, and it cost me probably 2 hours of screwing around with it.

I’m posting this because
http://www.nabble.com/RT-3.6.5-and-Sendmail-error-and-looks-like-perl-error-td15989015.html
Didn’t really mention what the final working solution was.

28

Whew, it’s been a busy year. Back in 2005 I wrote a list of things I’d like to do eventually that I’d be able to do if I had the time and resources that winning the lotto would provide. I’ve made a positive step towards realizing a couple of those.

Family

The big change this year was the addition of Ian. We didn’t get off too well in the beginning, but we’re doing pretty good now. He’s just now to the point where he’s taking his first steps. He’s a smart kid, very inquisitive, but stubborn. Within a few years he’ll be learning how to read and write- I’m guessing it won’t be long until I’m teaching him how to program. He’s got an eye for any type of electronics, but goes nutty for my blackberry or laptop. Yeah, he’s a geek in training.

Jackie’s been doing fairly well, all things considered. She’s been staying home with Ian rather than going back to work, and it’s driving her a little stir crazy. To help ease the cabin fever, she got a laptop for christmas- Ian wasn’t letting her stay in the office, so now she has a way to keep in contact with people from the living room.

Weddings

This was the year of the wedding… Brad and Erin, Jordan and Beth, Matt and Carrie, William and Charleen, Jackie’s friend Joslyn, Jackie’s sister Lori, and Paul and Kristen. I only made it to 4 of the weddings, but I was standing up in two of them. The ones we went to were all in Grand Rapids, so we had the joy of driving back and forth 155 miles each way, with the added bonus of dropping Ian off somewhere along the way

Work

Work started off pretty rough. I have a habit of reflecting the attitudes of those around me, and my supervisor at the beginning of the year was pretty negative. That coupled with Ian’s birth and all the associated expenses turned me into a pretty miserable person. Fortunately the supervisor left and was replaced with a cautious optimist. Things got better- so much so that I just passed the 1 year mark at my current place and still find it interesting and entertaining.

Technologies

I’ve played with many new technologies this year- Jboss, Netscaler and CentOS being the three foremost. I’ve dug back into ruby with a couple of new projects, as well as LDAP and a plethora of new utilities. I even picked up a bit of python. This trend doesn’t look like it’s gonna let up, so the job should be exciting and interesting for some time to come.

Projects

This year saw me move away from music and go back towards software (although I have been playing harmonica in the car at stoplights on the way to work). I joined the Luma team as head cheerleader and started the QT4 branch. After becoming frustrated with the python, qt3->qt4 transition and the codebase in general, I started an unofficial sister project, Ruma. I still sit in the Luma channel and help when I can, but I’m gonna sit back and wait until we’re ready for QT4- hopefully we’ll scrap the entire codebase and start fresh.

Right now I have two other developers “working” for me on Ruma, Lars and Hiro. They’ve put a lot of effort into bringing this bad boy to life, and I’m thankful I’ve had their help. For those of you not aware, Luma and Ruma are LDAP administration tools. As a System Administrator, I use LDAP a lot, so having specialized tools can be helpful.

Another project I started this year was competing in National Novel Writing Month. I finished the rough draft for my first book, Sinblade, a week early. It’s only 150 pages or so, but not a bad start all things considered. Jackie’s (sorta) working on revising it, and once she’s done I’ll open it up for others to start giving me feedback. I’m excited and nervous about it. If it takes off and people like it, I have 6 or so more books that I’m interested in writing.

The money situation is still pretty tight, but it’s getting better. Hopefully next year will be as much of an improvement over this year as this was over last year.

LDAP+ Sudo +TLS fix

For those of you who can’t get those three to work together, make sure you specify both TLS_CACERT tls_cacertfile- I didn’t and it caused me grief.

Epson Perfection v350 on Ubuntu Feisty Fawn

Ok, I’ve done it twice now, I think I’ve figured it out.
Get the source files from Epson’s linux website; I don’t recall the url but these are the files you need (or newer, no idea what the future holds):

iscan-2.3.0-1.c2.i386.rpm
iscan-plugin-gt-f700-2.0.0-0.c2.i386.rpm

Use alien to convert them to debs (normally bad, but acceptable this time around).

Install both newly created deb packages with dpkg:
dpkg -i iscan_2.3.0-2_i386.deb iscan-plugin-gt-f700_2.0.0-1_i386.deb
Install sane, sane-utils:

apt-get install sane sane-utils

Edit /etc/sane.d/dll.conf, replacing epson with epkowa (yes, I’m serious).

add the following to /etc/udev/rules.d/45-libsane.rules:

# Epson Perfection v350
SYSFS{idVendor}=="04b8", SYSFS{idProduct}=="012f", MODE="664", GROUP="scanner"

And I think that’s about it. Make sure you’re in the scanner group, and run:

scanimage -L

That should simply list your scanner- if it doesn’t let me know- I might have missed something. From this point on you should be able to access the scanner with either sane or iscan.

The one downside to this driver is it doesn’t do the full 48000 PSI, only 24000- this means a scan of a guitar pick is *only* 16 inches across, rather than 32 inches :) Unfortuantely it’s not the preferred resolution for negatives.

Unicron

So I got the new hardware parts, so I figured I might as well document the process. I’ve decided on the name Unicron because it’s the biggest PC I’ve ever owned. I’ve been waiting over a year to really rebuild my servers- since I ran out of ide connectors in Pablo, I knew something had to change.

The new case is MASSIVE- it’s sitting next to jackie’s machine and is a good 6″ longer and 3″ higher. processor went in easy, as did the ram. motherboard went in fine, and the harddrive rails (with rubber footies to prevent vibration noise ) made it a painless job of inserting drives and wiring them up.

The first problem I noticed right away- the Ars Technica review said it came with a power supply, but apparently I didn’t buy it from the same vendor, and hence ran into roadblock #1. I also noticed that, rather carelessly, I didn’t verify there was an onboard video card. Having only PCIe and PCI slots, none of my AGP cards would fit. After a bit of digging, I found an old 8mb Trident card from the late 90’s and popped it in. it won’t run a gui installer, but I don’t need it :)

The next real problem was that Ubuntu 6.10 doesn’t recognize sata hardware raid- it’s seeing all 4 drives individually. This is probably going to be the showstopper. I’m pretty sure that once installed, it’ll handle them fine, but it leads me to a chicken and egg scenario. I have a couple of possibilities:

1) I need to figure out which Linux raid driver this chipset uses and load it into the kernel, then re-detect the drives. This seems like the most obvious fix, but the real question is “why didn’t it already do this?” My fear is there is no Linux driver for the hardware raid.

2) throw an IDE drive in, install to it, then run the installer from the fully loaded Ubuntu install rather than the trimmed down install disk. the one flaw with this plan is there is only one IDE chain, meaning the cdrom and IDE HD have to play nicely during the install. So far they haven’t- booting of the install CD gives me errors about hdb not being ready, and then booted every so slowly to the first set of prompts. I had to head to work before I even got to the partitioning section.

I’ll hopefully get a chance to try more this weekend. Updates to follow.

UPDATE: the board is an ASUS M2N-E, so if you know how to get raid5 working in ubuntu, let me know.

UPDATE 20070331: you ever notice how when you look at something for months and it never changes, you forget the details? I noticed (after getting a full night’s sleep) that there WAS a wait to set up software raid in Ubuntu’s installer, I was just blind. So after talking to shaldannon and the trilug guys, I decided to go with the following partition scheme:

200meg (md0), raid 1 (sda1, sdb1)
1gig (md1), raid 1 (sda2, sdb2)
1.5Tb (md2), raid 5 (sda3, sdb3, sdc2, sdc2)
1gig (md3), raid 1 (sdc1, sdd1)

Once that was done, the installation was a breeze. Ubuntu is now installed and I’m slowly but surely re-implementing everything.

Useful Utility: diff

Diff is a handy little command used to compare two text files- useful if trying to determine what’s changed in different versions of files, used by subversion to show what files have been changed, and can even create patch files for updating sourcecode. So what are some of the more useful flags?

* -i lets us ignore any capitalization changes
* -b lets us ignore any spacing changes
* -B ignore blank lines
* -w just ignore all white spaces
* -q just say if the files are different
* -y side by side comparison
* -r recursively compare directories
* -d find a smaller set of changes
* -u unified format

I often use the unified format(-u) simply because I find the +/- more intuitive than >/< . The whitespace and capitalization ignoring is great if you change the indentation of a file or fix a comment's capitalization, but don't want to make a big deal of it. Another great use is comparing directories- for example, before upgrading apache, make a backup copy of /etc/apache, run the upgrade, then run diff -rq /etc/apache.bak /etc/apache to see a list of files that were modified. Once you get that list, you can use diff to compare the two versions on a more granular level. Not a great example, but I have been in situations were I needed to compare two directories to see what had changed.

So what are some of the more unique uses? You can use the -s flag to confirm two files are the same or exclude files from a recursive compare with -x pattern. You can also use stdin for one of the comparisons with cat foo|grep badstuff | diff - bar or cat foo|grep badstuff | diff bar -. You can even create a patch file with diff -Naur file.old file.new >file.patch.

If you have any other uses for diff, leave them in the comments below.

Useful Utility: route

Route is one of these hate-inspiring, jaw droppingly obtuse programs that you always get the syntax wrong on. The purpose is simple enough- show and/or change the routing table. The most common uses are:

  1. route - shows the current entries
  2. route add - adds a new entry
  3. route del - removes an entry
  4. route flush- removes all entries

Checking out your Routes
The simplest use of route is to simply run route at the command line:

morgajel@p-nut ~ $ /sbin/route
Kernel IP routing table
Destination     Gateway         Genmask         Flags Metric Ref    Use Iface
192.168.0.0     *               255.255.255.0   U     0      0        0 eth0
loopback        *               255.0.0.0       U     0      0        0 lo
default         192.168.0.1     0.0.0.0         UG    0      0        0 eth0

You’ll see 3 routes total in this example (which is very simple)- The first route points all 192.168.0.x traffic to the network card(eth0), the second points all loopback traffic (127.x.x.x) back to the local device (lo), and anything that doesn’t fit into either of those categories goes to the network card (eth0). You may wonder why that first route is in there if the default would just catch it anyways- you see, this allows multiple network cards to point traffic to different gateways or routers on the same network.
Take the next example:

morgajel@p-nut ~ $ /sbin/route
Kernel IP routing table
Destination     Gateway         Genmask         Flags Metric Ref    Use Iface
10.100.0.0     10.100.0.1              255.255.0.0   U     0      0        0 eth1
192.168.7.0     192.168.7.1               255.255.0.0   U     0      0        0 eth0
loopback        *               255.0.0.0       U     0      0        0 lo
default         192.168.0.1     0.0.0.0         UG    0      0        0 eth0

all of your normal traffic would proceed to 192.168.0.1, but any traffic to 192.168.7.x would go to a different gateway(192.168.7.1) and all traffic to 10.100.x.x would go to a secondary network card(eth1) and be sent to yet another gateway (10.100.0.0). This would be useful if you were using a load balancing device like a Netscalar or F5, or if you had an internal network and a secondary DMZ’d network or something.

Adding and Removing Routes
if you’re manually setting up routes for a static IP, you’ll generally do something like

route add default gw 192.168.0.1

or remove it with

route del default
route del -net 192.168.0.0 netmask 255.255.0.0 eth1

Deleting routes is always the pain- the default route you can simply remove like the first example, but anything else needs the netmask specified and the -net flag used. If you want to see some more examples of routes, try

route -C

This will show you… uh, I guess the dynamic routes that have been recently used and cached. If you’re unsure about how to remove or add a route, you can run “route add” or “route del” without any addition parameters to see more options- I think the most I’ve used is something like

route add -net 10.100.32.0 netmask 255.255.248.0 gw 10.100.32.1 eth0

Final Thoughts
One thing that I learned while writing this is that there is an additional parameter called “reject” which you can append to the end of an add line to basically form a crude firewall to that route ( note- it’s not really a firewall, but it will reject packets). And of course, to get rid of any line you’ve added, you can change an add to a del and it’ll probably remove it (you may need to remove some add-specific parameters like reinstate or mss).

The manpage is pretty straightforward and has some decent examples- Looking at it, I’m not sure why I’ve had such problems with route in the past. Overall it seems pretty simple as long as you get the del syntax correct. Overall I think writing this helped me more than it’ll probably help you.

New OS: Kubuntu 6.10

Ok, trying out Kubuntu on my new work laptop and I’m liking it quite a bit- the only problems I’ve had so far are with Hibernate (which I think is self- inflicted) and wireless stuff. I’ve figured out the wireless stuff and wanted to mention it for the people out there having the same troubles as I did. First up, a little info on my setup:

Model: IBM T42 (note, not the T42p, which is awesome, the crappier model)
OS: Kubuntu 6.10
Wireless NIC: Intel Corporation PRO/Wireless LAN 2100 3B Mini PCI Adapter (rev 04)
Wireless Driver: ipw2100 1.3

Wireless

There are a lot of choices for network setup, and since I use WPA2 with PSK, I’m going to document that.

in /etc/network/interfaces:
auto eth1
iface eth1 inet dhcp
wpa-conf /etc/wpa_supplicant/wpa_supplicant.conf.local

in /etc/wpa_supplicant/wpa_supplicant.conf.local
ctrl_interface=/var/run/wpa_supplicant
ctrl_interface_group=0
eapol_version=1
ap_scan=1
fast_reauth=1
#For WPA-PSK network
network={
ssid="myssid"
key_mgmt=WPA-PSK
proto=WPA2
pairwise=TKIP
group=TKIP
psk="my big secure passphrase"
}

/etc/modprobe.d/ipw2100.modprobe
options ipw2100 disable=0

and that was it- I spent time tinkering with all sorts of things, but I think this was all there was. If I get brave and re-do it next weekend, I’ll make sure to fully document the process.

Hibernate

While trying to get wireless working, I noticed that hibernation stopped working- I’m not sure what I did, but I’m pretty sure it’s my fault- it WAS working originally.

UPDATE
DOH, it helps if the swap partition is mounted so hibernation has someplace to store the data! it’s all working good now.

Useful Utility: tee

I have two requirements for a program being on this list: the first one is it has to be a utility- something scriptable or usable on the command line. The second is it also needs to have multiple arcane flags that I can write about, or just be so unknown that it’ll bring it to the attention of people that have never heard of it. Tee falls into the “never heard of it” group. It may only have two flags, but it’s useful nonetheless.

Tee splits a STDIN stream in two, sending one stream out output to a file, and the other to STDOUT. The data is identical; this just allows you to take a snapshot of what the data is like at a certain point a long piped command. For example, lets suppose you had a nice pretty command like this:

ls -lrt |awk '{print $6" "$7" "$8" "$3"  "$9}'|grep morgajel|tail -n 3

This provides you with the date, owner and filename of the 3 newest files in the current directory. Suppose you wanted a list for all the users as well as just morgajel’s latest three

ls -lrt |awk '{print $6" "$7" "$8" "$3"  "$9}'|tee all.txt|grep morgajel|tail -n 3

By adding the “tee all.txt” a copy of the stream at that point is diverted into a text file. you can view that later. The example is a bit fake, but you’ll eventually run into something needing this functionality. When you do, you can use tee. The only two real flags of interest are -a which appends data to the file rather than recreating it, and -i to ignore interrupts, but that could be really bad if you need to ctrl-c out of something…

either way, enjoy.

Ruby on Rails

So I’ve had this on again, off again thing with ruby for a while now. Since I first started playing with ruby it got pretty big with rails, and I completely missed that boat. Well, now I’m playing with rails and it’s fairly interesting once you get it up and running. I picked up the O’Reilly book Ruby On Rails and have been walking through it’s Photo project. I’ve went so far as to even throw it in a subversion repository in case I pooch something.

One thing I really like so far is the Scaffolding system- once you create an object model (say, a Photo) and have it generate the table to store it in, it can auto-generate the web interface to allow you to create/edit/delete entries without having to muck with it. The coolest part is if you make any DB changes, the interface is automatically updated. That was something I’ve always hated- updating interface code to reflect DB changes.
At DP I wrote a minor system to do something like that in ASP, but it was still pretty crappy (and dangerous). Dendrite had created a system at SPX called Skel which was hideous (his words), but did sorta the same thing. The main project I worked on there (before it was cancelled) was a replacement for Skel that was very similar to this, but for perl. Now I really wish I woulda kept up with ruby because had I known of rails, I could have essentially ported it to perl and saved a lot of time.

I’m hoping that the rest of rails is as cool as this scaffolding code. It’s taking me a while (5 hours broken up) to wrap my head around it, but it’s finally starting to make sense. I’m looking forward to finding out more about it.

Next »