Archive for the 'Troubleshooting' Category

Enable or fix logging for HAProxy load balancer

After configuration of HAProxy to balance web traffic, I’ve noticed that HAProxy is not generating any logs in my server. Due to its load balancer role, logging is vital to diagnose any issue that might come in future.

In its default config, HAProxy send logs to a syslog facility: local0, via a socket connection. By default, your syslog configuration probably doesn’t accept socket connections, and even doesn’t have a local0 facility, so you have no HAProxy log. If you want it, configure syslog to accept TCP connections by adding -r to syslogd parameters.

Quickly fix perl Undefined subroutine &LWP::Debug::trace issue

I installed required modules in one Fedora 8 and one CentOS 5.2 boxes to interact with Amazon SQS and S3 services and build a perl script. When trying to start perl script, following error encountered:

Undefined subroutine &LWP::Debug::trace called at /usr/lib/perl5/site_perl/5.8.8/LWP/UserAgent/Determined.pm line 21.

Force Re-installation of LWP::UserAgent::Determined module does not avail anything.

Then after some research, I came to know that the perl libwww-perl version 5.822 is culprit here. And the strange thing is that the updated version (5.822) causes problems while downgraded version (5.821) works fine. This bug is already reported here.

To quickly fix the error, download and install 5.821 version:

ftp error 500 OOPS: vsf_sysutil_recv_peek while connecting to vsftpd

Recently, after configuring the vsftpd server running in CentOS 5 in several small ec2 instances as per the earlier post , I was not able to connect to vsftpd in one server from my ftp client. It throws the error:

500 OOPS: vsf_sysutil_recv_peek

The solution for this problem is to load capability module:

$ modprobe capability

You may also like to read:
* 5 steps to secure your Linux Server
* Ensuring secure access to production Linux Servers
* Bash script to backup essential log files in Linux
* Quickly change your ssh port from defualt 22 to something higher
* SSH port forwarding from remote to local machine
* Save root or user history to check later
* Install and configure denyhost to prevent brute force attacks