BGP: Building Reliable Networks with the BGP

BGP: Building Reliable Networks with the BGP

I recently had to learn BGP in order to fully understand what I was doing when migrating from our Linux based Zebra routers (crappy and unstable) to our nice shiny new Juniper routers.

We had a couple of books at work, but by far the best was BGP: Building Reliable Networks with the Border Gateway Protocol. It hasn’t changed much since it was released in 2003, but neither has BGP so that really isn’t an issue, and with the recent BGP issues that keep occuring, a good knowledge of it is pretty important to any network admins out there, especially those like me with their own AS numbers!

svn: Aborting commit: remains in conflict

I got this annoying SVN error today, that I hadn’t come across before. Even after resolving the conflict in the file, highlighted by lots of «««<, I still couldn’t get my commit to work!

idimmu@boosh:~/work/systems/trunk/dns$ svn ci idimmu.net -m “new funky domain”
svn: Commit failed (details follow):
svn: Aborting commit: ‘/home/rus/work/systems/trunk/dns/idimmu.net’ remains in conflict

After some reading it was easy to resolve!

idimmu@boosh:~/work/systems/trunk/dns$ svn resolved idimmu.net

Resolved conflicted state of ‘idimmu.net’

rpmdb: Lock table is out of available locker

I had a crazy weird bug today whilst running Puppet on one of our CentOS boxes where no packages were being installed. A quick investigation with yum yielded the following scenario!

Id I tried to use yum as root or with sudo it gave the following error ..

<br /> [idimmu@server ~]$ sudo yum check-update<br /> rpmdb: Lock table is out of available locker entries<br /> error: db4 error(22) from db->close: Invalid argument<br /> error: cannot open Providename index using db3 - Cannot allocate memory (12)<br /> Repository update is listed more than once in the configuration<br /> Repository base is listed more than once in the configuration<br /> Setting up repositories<br /> https://www.mirrorservice.org/sites/mirror.centos.org/Null/updates/i386/repodata/repomd.xml: [Errno 14] HTTP Error 404: Not Found<br /> Trying other mirror.<br /> Cannot open/read repomd.xml file for repository: update<br /> failure: repodata/repomd.xml from update: [Errno 256] No more mirrors to try.<br /> Error: failure: repodata/repomd.xml from update: [Errno 256] No more mirrors to try.<br />

Saving the RAID

I managed to screw up my home machine when upgrading from Dapper to Hardy somehow, so decided to flatten and reinstall Hardy from scratch.

This is all well and good but I have a RAID 5 array on my machine which stores all my important documents and stuff (I really hate drive failure). Ubuntu didn’t suddenly detect my RAID array and figure everything out, which was not entirely unsurprising but was a little scary.

xend refusing to start

We recently had a few power outages at work, some scheduled, some not, and this played havoc with our xen servers.

One of the problems we had was that xend would not start (and thus xendomains would also not start).

Checking /var/log/xen/xend.log gave us the following snippet:

<br /> inst = XendNode()<br /> File "/usr/lib/python2.5/site-packages/xen/xend/XendNode.py", line 164, in __init__<br /> saved_pifs = self.state_store.load_state('pif')<br /> File "/usr/lib/python2.5/site-packages/xen/xend/XendStateStore.py", line 104, in<br /> load_state<br /> dom = minidom.parse(xml_path)<br /> File "xml/dom/minidom.py", line 1913, in parse<br /> File "xml/dom/expatbuilder.py", line 924, in parse<br /> File "xml/dom/expatbuilder.py", line 211, in parseFile<br /> ExpatError: no element found: line 1, column 0<br /> [2008-03-10 21:37:40 18122] INFO (__init__:1094) Xend exited with status 1.<br />

Changing deb package architecture

We have several PHP applications and libraries incorrectly packaged for i386 rather than all, which means they wont install to our nice new shiny AMD64 servers. Unfortunately we don’t have (or at least we can’t find) the original package sources, so we need to ‘frobble’ the packages and change the arch by hand!

Deb files are just an ar package so we must first extract it! (FYI ar is like tar, but for pirates .. 🙁 )

Turning CPAN modules in to deb with dh perl make

Some of our PERL tools require some CPAN modules that are not part of the standard Ubuntu distribution. It’s obviously possible to install the module using CPAN but I like using deb packages where possible as then you only have one repository to manage. Fortunately with dh-make-perl it is possible to quickly turn any CPAN module in to a debian package!

First make sure dh-make-perl is installed

<br /> apt-get install dh-make-perl<br />

Apache2 with SSL and Tomcat5.5 on Ubuntu

One of the newer features to our site is an access control mechanism to force specific paths to only be delivered over SSL when our customers have particularly sensitive data. We already use Apache2 with mod_jk to talk to the Tomcat5.5 instance running our app so the only part left is to enable SSL!

First make sure mod_ssl is enabled:

<br /> root@reltest-tcj0:/var/log/apache2# a2enmod<br /> Which module would you like to enable?<br /> Your choices are: actions asis auth_anon auth_dbm auth_digest auth_ldap cache cern_meta cgid cgi dav_fs dav deflate disk_cache expires ext_filter file_cache headers imap include info jk ldap mem_cache mime_magic proxy_connect proxy_ftp proxy_http proxy rewrite speling ssl suexec unique_id userdir usertrack vhost_alias<br /> Module name? ssl<br /> This module is already enabled!<br />