Archive for October, 2008

Ignore mysql error while executing bulk statements

Sometimes when running MySQL in batch mode, it requires to ignore some mysql errors which pops in between.

As an example, we can consider a scenerio where thousands of inserts required to be done and the statements are saved in a file, suppose in indata.sql. But it may be the case that some records are already there in database which you’re trying to insert. MySQL will show error something like below and exit:

ERROR 1062 (23000) at line 6: Duplicate entry 'blablabla' for key 2

NRPE: Unable to read output

One of my colleage performed speedy installation of NRPE module in a machine but found that the Nagios server is not able to query that machine.

In Nagios screen it shows:
NRPE: Unable to read output.

Checking from the machine itself, NRPE is giving correct version but throwing same error for any other checks:
[root@domU:/usr/local/nagios/libexec] ./check_nrpe -H localhost
NRPE v2.8

[root@domU:/usr/local/nagios/libexec] ./check_nrpe -H localhost -c check_load
NRPE: Unable to read output

After further digging, I’ve found he installed Nagios-plugins using yum which placed plugins files in some different location then desired by NRPE.

FTP Error: Could not write to socket: Broken pipe

By viewing this error while using your ftp server, you may get the impression of some bug/problem in your ftp server. This is exactly what happened in the early morning when I got call that vsftpd server in one of the Amazon EC2 server stopped working. When tyring to transfer a file it’s showing something like this:

Error: Could not write to socket: Broken pipe
Unable to download file xxxx

Get Adobe Flash playerPlugin by wpburn.com wordpress themes