my life

day to day

Archive for the 'HOWTO' Category

SVN Commit Error: Can’t close activity db

Wednesday, December 3rd, 2008

Recently, I moved one of my SVN repositories onto a new server. Everything seemed fine until I tried to commit.

SVN complained:

svn commit . --message ‘….’ svn: Commit failed (details follow): svn: Can’t close activity db: Error string not specified yet

And the server logs show:

[Wed Dec 03 22:53:20 2008] [error] [client 207.7.129.212] Could not create activity /svn/!svn/act/cc8c14b8-904b-4438-872d-e129baae67bb.  [500, #0] [Wed Dec 03 22:53:20 2008] [error] [client 207.7.129.212] could not close dbm files.  [500, #89026] [Wed Dec 03 22:53:20 2008] [error] [client 207.7.129.212] Can’t close activity db: Error string not specified yet  [500, #89026]

Turns out, DAV keeps some cache files around in your SVN ‘dav’ directory. Removing all the ‘activ*’ files solved my problem.

add to del.icio.us    add to technorati favs   email this

HOWTO Install Starling

Monday, November 10th, 2008

I was recently contacted by someone who got stuck setting up Starling and realized that the documentation is relatively sparse on setting up Starling. The process is easy once you know how Starling works on the inside, but not looking in.

To get started, I will assume you have ruby and ruby gems already installed. This will depend on your flavor of distribution, but should not be difficult and come standard on every modern version of Linux I’ve used.

run:

gem install starling

Create the Starling queue directory in /var/spool/starling

Start staring with these minimum set of arguments:

/usr/bin/starling -d -h $HOST -p $PORT \ -P /var/run/starling/starling.pid

Also, if you’ll be running Starling in a PHP environment, make sure your version doesn’t have the EOL bug described in my post: http://osterman.com/wordpress/2008/07/18/starling-protocol-bug-in-stats-response

Also, note that Starling creates a queue file for each key verbatim. So if a key is, ‘namespace/something’, then Starling will fail to do the set if the ‘namespace’ directory does not exist under the /var/spool/starling directory. You can also just not use ‘/’ in your keys.

Also, note that Starling does not automatically purge the queue files after it rotates them. You’ll want to cron a job to run periodically to delete them. We run this nightly to purge files not accessed in 4 days:

find /var/spool/starling/ -type f -atime +4 -delete
by creating a file in /etc/cron.daily/starling with those contents.

All that being said, we’re still very happy with it and process about a million jobs a day.

Please let me know in the comments if your still having problems!

add to del.icio.us    add to technorati favs   email this

Installing CPAN Packages for Debian

Thursday, June 19th, 2008

If you want to install CPAN modules as Debian packages, this HOWTO is for you.

First, install dh-make-perl:

apt-get install dh-make-perl

Then build & install the package. For example, if you wish to install the module Nagios::Plugins::Memcached from CPAN, simply run:

dh-make-perl --install --cpan Nagios::Plugins::Memcached

You’re done.

add to del.icio.us    add to technorati favs   email this

Configuring Mutt for IMAP support

Monday, December 31st, 2007

Configuring Mutt with IMAP is as easy as editing your .muttrc and adding the following lines.

set spoolfile=imap://username:password@host/INBOX set folder=imap://username:password@host/INBOX

You can then change folders inside of Mutt by pressing ‘c’ and then ‘?’ to get a folder list.

add to del.icio.us    add to technorati favs   email this

Unknown table engine ‘InnoDB’

Sunday, December 23rd, 2007

I was getting the error “ERROR 1286 (42000): Unknown table engine ‘InnoDB’” when trying to create/alter tables with the InnoDB engine. You can check for this warning by issuing the create or alter statements and then running

show warnings;
in the same mysql client session.

Check if you have InnoDB support enabled:

mysql> show variables like ‘have_innodb’; +—————+———-+ | Variable_name | Value    | +—————+———-+ | have_innodb   | DISABLED | +—————+———-+

The problem is that InnoDB is not enabled by default in Debian distributions of my.cnf.  To enable it, simply comment the following lines under the [mysqld] section.

#skip-innodb

add to del.icio.us    add to technorati favs   email this

HOWTO Find the Network Printer

Monday, November 26th, 2007

This is the easiest way to find a JetDirect printer on port 9100 on your local network. Useful in those cases you’re on site with a client and need to print something.

nmap --open -p 9100 192.168.240.* -T insane

add to del.icio.us    add to technorati favs   email this

Debian trying to overwrite add-shell with passwd

Saturday, September 8th, 2007

Preparing to replace debianutils 2.8.4 (using …/debianutils_2.23.1_i386.deb) … Unpacking replacement debianutils … dpkg: error processing /var/cache/apt/archives/debianutils_2.23.1_i386.deb (--unpack):  trying to overwrite `/usr/sbin/add-shell’, which is also in package passwd Errors were encountered while processing:  /var/cache/apt/archives/debianutils_2.23.1_i386.deb E: Sub-process /usr/bin/dpkg returned an error code (1)

Simply run

dpkg -r --force all passwd apt-get -f install

add to del.icio.us    add to technorati favs   email this