DegradedArray event

If you ever get one of these, count your lucky stars and get the array fixed. In my case I have lost one of the drives.

This is an automatically generated mail message from mdadm
running on debian
A DegradedArray event had been detected on md device /dev/md0.
Faithfully yours, etc.
P.S. The /proc/mdstat file currently contains the following:
Personalities : [linear] [raid1]
md0 : active raid1 hdc1[1]
78148096 blocks [2/1] [_U]
unused devices:

Debian NO_PUBKEY

If you ever get an error like this.

W: GPG error: http://non-us.debian.org stable/non-US Release: The following signatures couldn’t be verified because the public key is not available: NO_PUBKEY F1D53D8C4F368D5D
W: You may want to run apt-get update to correct these problems

The way I solved it was as follows. As root…

# apt-get install gnupg
# gpg –keyserver wwwkeys.eu.pgp.net –recv-keys F1D53D8C4F368D5D
# gpg –armor –export F1D53D8C4F368D5D | apt-key add –
# gpg –export F1D53D8C4F368D5D >> /etc/apt/trusted.gpg
# gpg –list-keys

Yahoo Slurp

Not sure if anyone else has noticed recently but Slurp has been doing a lot of of Spidering lately. I actually took extreme measures today and added a crawl delay to the site.

WWW::Mechanize Fun

I have been writing a test suite for a website recently and came upon the following error.

Illegal value ‘GBR’ for field ‘country_iso’ at /usr/local/share/perl/5.8.4/WWW/Mechanize.pm line 1232

This seemed strange to me at first but when I thought about it I was using the following code

$mech->select(“country_iso”, ‘GBR’ );

If the value i.e. “GBR” in my case is not a valid select option then obviously WWW::Mechanize or rather HTML::Form will throw an error. It was actually HTML::Form::ListInput that the error came from but this is a package declared in the HTML/Form.pm module.

SSH Connection Reset By Peer

If ever you see the following when using SSH and it all seems inexplicable.
Read from remote host www.somehwhere.com: Connection reset by peer
There may be a quick cure (caveat, your mileage may vary). Some routers, i.e. Linksys WRT54G will close a connecting that does not appear busy. So far I have found that if I add
ServerAliveInterval = 300
ServerAliveCountMax = 300
to my /etc/ssh/ssh_config file then everything is fine.
Basically we are send a message to the server every “ServerAliveInterval” seconds and if the client has not had a response after “ServerAliveCountMax” messages then the connection will disconnect. This makes the connection look active to hardware that thinks it’s doing you a favour by disconnecting idle connections.
see “man ssh_config” for more details.
I have also noticed the following method but have not tried it
echo 300 > /proc/sys/net/ipv4/tcp_keepalive_time

Packard Bell Store and Save

Their 400Gb 3500 model works a treat under Debian stable. It comes up as a scsi device when switched on. To see the device use dmesg and look for something like the following output.
sdc1
sd 13:0:0:0: Attached scsi disk sdc
sd 13:0:0:0: Attached scsi generic sg3 type 0

Pay to display Jobs

I have had a recent spate of people spamming the job site. I knew this would happen eventually. The site has PR6, this means that spammers think if they have a link on the site it will leak enough pagerank to warrant spamming it. This has meant that a lot of spammers have been putting fake job adverts on the site.
I suppose the only way around this is to ask for money since it is really only cost that will stop a spammer, i.e. if it costs more to spam the site than they get back in return then they are not going to do it, I hope 😉

DBD::Pg::dr::imp_data_size

If you are running Apache in a chroot env and you receive something like this.
null: Had to create DBD::Pg::dr::imp_data_size unexpectedly at /usr/local/lib/perl/5.8.4/DBI.pm line 1190
One cure is to make sure you have copied all your PostgreSQL library files into the directory in your chroot environment.

swaks and TLS

A good command for testing if your TLS setup works in exim4 is:
swaks -s insert.host.name.here -tls -q ehlo
It goes something like this.
~$ swaks -s insert.host.name.here -tls -q ehlo
=== Trying insert.host.name.here:25…
=== Connected to insert.host.name.here.
EHLO debian
<- 250-insert.host.name.here Hello somewhere.com [81.107.112.224]
<- 250-SIZE 52428800
<- 250-PIPELINING
<- 250-AUTH PLAIN_TEXT LOGIN
<- 250-STARTTLS
STARTTLS
EHLO debian
<~ 250-insert.host.name.here Hello cpc2-cable.ntl.com [8.0.1.4]
<~ 250-SIZE 52428800
<~ 250-PIPELINING
<~ 250-AUTH PLAIN_TEXT LOGIN
QUIT
<~ 221 insert.host.name.here closing connection