Shlrm.org Blog

Linux, Java, Ruby, and Politics

Fedora 14 and Intel Gigabit Adaptors

| Comments

To be fair, it’s not Fedora 14 that’s at fault. The 2.6.35 kernel has a regression in the e1000e driver for some Ethernet adaptors.

It was quite tricky to figure out, especially right after 14 came out, as I didn’t have an ethernet connection, and when I was able to get the connection up, and I asked on the IRC channel, no one had any insight. I let 14 stew a while, and the rest of the internet came up with similar problems. Turns out that the kernel driver included in 2.6.35 has issues. There’s some patches in the works, but I don’t know if they’ll get pulled down into 2.6.35. The fix is in 2.6.36.

Until then, you can get the latest driver directly from the e1000e’s SourceForge website here. Make, then make install it as root and you’ll be good to go. This driver version worked for me on a Intel Corporation 82566DC Gigabit Network Connection (rev 02).

Attempted Haxx0ring by a Botnet

| Comments

Hooray for Logwatch.

It appears that someone[’s botnet] was trying to hack my little server yesterday. I have a good portion of attempted logins as root from a slew of hosts. 194 separate hosts with multiple attempts from more than a few. This might explain the horrible internet connectivity problems I was having the other day.

Not really sure what I did to piss off some script kiddie. Perhaps I got someone’s attention? I haven’t blagged about anything controversial recently. Not even in politics. I did submit my resume to Monster.com, perhaps someone is determining if they can hire me as a Systems Administrator?

Logwatch entries follow after the break.

Minecraft Server Modification Project

| Comments

MINECRAFT!

Someone has done no small amount of determining what the code within the minecraft_server.jar does and how you can inject hooks into it. I have forked that git repository and am trying to organize it a bit better. Possibly make it truly into just a plugin framework and nothing else.

I’m hoping that this will be useful to others and that it all won’t horribly break when the server is changed on the 31st. Otherwise, all the really awesome administrative abilities will be horribly broken. Another really awesome thing would be if Notch were to have a plugin API ready to go. Perhaps based on the work that the community is doing.

UPS Failure Graphs

| Comments

There was a lightning storm recently and the silly Arc Fault Circuit Interrupters in my house tripped off the power in most all the bedrooms, except the room my desktop was in. And so the UPS tanked, because the batteries are old and lose their charge very quickly. The graphs are logged using Cacti, and using a template/polling logic that I built using the mysql-cacti-templates project.

I really should replace the batteries in this guy (freaking sweet UPS by the way, highly recommended) so he’ll last more than a few minutes.

A friend of mine did a bit more controlled test of his UPS and here’s his blog post with graphs also.

I have zoomed the graph a bit more to get more detail on the last 20 minutes of my servers uptime.

I find it interesting that the UPS temperature actually dropped when the thing was on batteries. I remember reading somewhere that the fan only runs when the inverter is actually active, so I guess that would make sense. I also find it interesting that the input frequency never changed, perhaps the UPS only records that value once every now and then, and doesn’t update it. I would think that with 0 input voltage I wouldn’t have any measurable frequency either.

I wonder if I could/should get those AFCI breakers replaced. They tend to not keep my computers on when there’s a lightning storm, and the only way to turn them back on is to go into the garage and flip it by hand.

A Refreshing New Perspective on Init Systems

| Comments

I used to think that Upstart was the wave of the future regarding new init systems.

Boy, was I wrong. Not that upstart is “bad.” Just that there’s something much better.

This actually makes things better instead of just providing the ability to make things better. It involves less shell, and more configuration. Dependencies are automatic, instead of manually specified. The author of the previously linked post goes into great detail regarding the reasoning behind the decisions made. It’s quite a good, albeit long, post.

I think I will have to get this working on my linux box that I intend to build. Possibly even on my laptop, as the features for enabling and disabling bluetooth would be quite advantageous. Also for the wifi and such. It’d be great if when I fired up the bluetooth, it were to start various things, like trying to connect to my mouse, or enabling the obex ftp thing.

As for a server, it’d be really nice to have if I can ever get my fibre channel setup to work. The Xen VMs won’t start until the Fibre Channel drives are available, and then they’ll all start up. Events could be fired depending on when the UPS was online or on battery.

I’m very impressed with it in concept, I’ll have to see how it goes in practice. Oh, and it’s going to be in Fedora 14. Woot.

Building Ruby 1.9 on Fedora 13

| Comments

Was harder than it should’ve been. I got annoyed.

You need to install openssl-devel, zlib-devel, bison, gcc, make, patch, tar, and maybe gcc-c++ (although I don’t think this one is needed).

Go get the latest ruby 1.9 source, as of this writing 1.9-p378, and extract it somewhere. Then go get the patches on this bug, at the specific comment. You will need to apply at least the openssl-build-fix patch, since fedora uses openssl 1.0 and it’s not yet into ruby 1.9. Then follow your typical ./cofnigure, make, and make install stuff. I installed mine into a prefix of /opt/ruby so that it wouldn’t affect any fedora ruby stuff that it might want. I then added ruby’s path to the end of my user’s PATH variable.

That’ll get you a working ruby 1.9 in Fedora.

OpenVSwitch

| Comments

This is some interesting technology. Apparently it allows me to emulate a switch on my server such that I can get netflow information, and other such managed switch information, from my virtual machines on my xen box. I will have to build and implement this on my test xen box to see how difficult it’ll be to get it to behave.

I also like that it claims it can distribute across multiple hosts (‘claims’ because I haven’t verified it yet.) I wonder how difficult it will be to set up a switch that extends to my router, so I can just emulate my entire network’s switch in OpenVswitch. It’s certainly got some interesting potential.

There’s potential to get better information on the traffic happening in my network thanks to the netflows provided by this. Maybe it will be enough information to figure out why my traffic shaping doesn’t work well, and how I can improve it.

WRT FAIL

| Comments

I had posted previously about setting up a WRT54G-TM running OpenWRT to be the router for my network. I thought it would be the perfect router, low power consumption, low heat, no moving parts, and wifi included. Unfortunately it did not work well at all. My advanced traffic shaping configuration killed the poor thing. 200MHz is apparently insufficient hurtz to handle the largeĀ  number of interrupts for packet processing and marking. I was told it might be a driver issue, but I wasn’t aware of any other drivers that I could have loaded to offload those interrupts. So the system spent > 70% of it’s CPU time in System IRQ handling. When it was under heavy packet load, something the original router setup would’ve handled without batting an eye, it would drop connections and eventually die. It wouldn’t respond to pings, nor would it forward traffic adequately. NAT + Traffic shaping + bittorrents = DEATH. Not to mention that syslogd eventually threw the thing into a kernel panic. Oh, and the b43 driver also panicked the kernel soon after turning on the wifi.

So I’m back to the original setup, with an old (1998) left-over 2GB hard-drive, and a modified Source Mage install. It’s in good shape, with some tmpfs stuff for things that write to the disk in order to hopefully prolong the life of the disk. I took a clonezilla snapshot of it as well, so when the drive dies, I can throw in a new (also old, I have several 2 to 4 GB drives that are in the closet that still work) one, and the router will be back up in a few moments.

Whilst it was unfortunate that the router wasn’t a good fit for my particular use, perhaps I’ll find another use for it. Since there are two Serial ports trivially accessible on the device, perhaps I’ll get a GPS module and set it up in the car as a mobile automatic war-driving toy. I’ve found instructions to hook up an SD card to it as well, that would give it plenty of easy to replace storage.

It was an interesting experiment, and I’m somewhat sad it didn’t work out.

WRT54G-TM Hacking

| Comments

A while ago, I purchased some WRT54G-TM routers from the TMoblie store near by. Apparently they were part of a push by TMobile to further their UMA stuff. People could purchase a router with wifi at the same time as purchasing their phone, if they didn’t already have one. I guess sales didn’t turn out so well, because TMobile was selling them for $20 each and trying to get rid of them all. I bought two.

Turns out these things are really just WRT54GL’s, the Linux one that they sell for like $70 that they have not screwed with so you can hack them and run any of the (not all)Linux wrt distros out there. Except it’s even better, because it’s got 32MB of ram and 8mb of flash, instead of half that like the standard WRT54GL. It requires a bit more voodoo to unlock (and after flashing dd-wrt, you can flash openwrt, or anything else,) but not at all difficult.

With the recent release of BackFire from OpenWRT, which coincided with my old SMGL router’s hard drive failure, I have set up that router on my network. It worked well for a few weeks, but recently has started flaking out and completely disappearing from my network. A gateway that refuses to respond to anything on the network is not particularly useful. So, to the internets I went. I discovered how trivial it would be to hook up one of the serial ports on the thing to my computer. A bit of soldering later, and I have a log of everything that comes out of the console of that box on my server. Hopefully, the next time it flakes out, I’ll have a logged kernel panic that I can submit it in a bug report. I might even be able to figure out the solution and post it along with the bug.

Additionally, as a solution to keep the network alive right now, I have set up a Nagios event handler to tell the UPS the router is attached to, to restart. This successfully power cycles the two gateway devices: ATT’s 2-wire thingy, and my OpenWRT router. So, my network has a limited self-healing ability now, which is, of course, a band-aid. However, until I can figure out what’s wrong with the router, it’s the best option that I’ve got to keep things functional. Especially when I’m not at home, and it dies (which seems to be the only time it dies…)