admin's blog

Apache-2.2.10 + Mod_chroot-0.5 causes startup problems.

Today I tried to update apache-2.2.9-r1 to apache-2.2.10 and was greeted with the following errors in the error_log:

[Sat Jan 10 09:37:30 2009] [notice] mod_chroot: changed root to /var/chroot/apache.
[Sat Jan 10 09:37:30 2009] [alert] (2)No such file or directory: Can't chdir to /var/chroot/apache
[Sat Jan 10 09:37:30 2009] [alert] (2)No such file or directory: Can't chdir to /var/chroot/apache
[Sat Jan 10 09:37:30 2009] [alert] (2)No such file or directory: Can't chdir to /var/chroot/apache
[Sat Jan 10 09:37:30 2009] [alert] (2)No such file or directory: Can't chdir to /var/chroot/apache
[Sat Jan 10 09:37:30 2009] [alert] (2)No such file or directory: Can't chdir to /var/chroot/apache
[Sat Jan 10 09:37:30 2009] [notice] Apache/2.2.10 (Unix) mod_ssl/2.2.10 OpenSSL/0.9.8j mod_chroot/0.5 Apache configured -- resuming normal operations
[Sat Jan 10 09:37:30 2009] [alert] Child 24458 returned a Fatal error... Apache is exiting!

emerge --sync update

Apparently, Gentoo did away completely the `emerge sync` command/arg. I didn't notice this, since I had a cron job that was running the following every night

/usr/bin/emerge sync > /dev/null 2>&1

Obviously, I didn't see the output since it was piped to /dev/null. This use to work and apparently they got rid of it completely. Simple adding the '--sync' fixed the issue. Now I need to get my machines up to date.

What was happening was the `emerge sync` command was running, by running it by hand you can see what's going on.

emerge sync
Calculating dependencies... done!

emerge: there are no ebuilds to satisfy "sync".

gst-python won't compile

gst-python won't compile

I've been having trouble compiling gst-python-0.10.13 over the last few days. Today, I decided to get this figured out. When emerging gst-python, I receive the following error:

vmare-modules- on gentoo-sources-2.6.26-r3 having problems.

After compiling a new kernel for my gentoo vmware server, I ran module-rebuild -X rebuild, since I knew I needed to build vmware-modules against the new kernel tree. Shortly after the emerge, I ran into the following compliation error:

Changing IP on CentOS system

I'm really writing this down for my own benefit. I mainly live in the Gentoo world, so when I hop on a CentOS box, I usually end up cursing for a bit. I needed to change a system to use a static IP vs. DHCP. To view the IP or interface settings, you need to view networking profiles:

cat /etc/sysconfig/networking/profiles/default/ifcfg-eth0

This should look similar to this:

# Advanced Micro Devices [AMD] 79c970 [PCnet32 LANCE]

Originally, there was no IPADDR, GATEWAY or NETMASK and BOOTPROTO was set to dhcp. To change the values edit the following file:

vi /etc/sysconfig/networking/devices/ifcfg-eth0

After changes have been made, restart the interface.

/etc/init.d/network restart

Monitoring S.M.A.R.T devices

During my server disaster earlier mentioned, I decided to monitor the drives a bit more closely. The drives on the system were SMART capable, so I emerge'd sys-apps/smartmontools. Here is the description of that package:

     Available versions:  5.36-r1 5.37 ~5.37-r1 5.38 {minimal static}
     Installed versions:  5.38(10:56:28 10/09/08)(-minimal -static)
     Description:         control and monitor storage systems using the Self-Monitoring, Analysis and Reporting Technology System (S.M.A.R.T.)

Using smartctl you can quickly test and analyze the health of your drives. Also you can enable the daemon to monitor the drives and to alert you of any changes or issues. Simply add the daemon to rc.

rc-update add smartd default

I started seeing some interesting bits in the logs. Here is a sample:

Server Collapse

Wow. Where to begin? Last week I had a crazy sequence of events related to one of my servers. After seeing a series of segfaults and memory errors, I started seeing corrupted files on the disk. This particular server is housed at a dedicated hosting facility. Their first look at the hardware they noticed that the chassis fan was dead. They quickly replaced the fan, and I thought that was a good possible source of the memory errors.

Policyd-weight issues with unclean shutdown

Today, I encountered some weird issues with a postfix/amavis mail server which was causing segfaults and memory paging errors. I was forced to bounce the server, but it wasn't able to shutdown all of it's services. That left me with the only option of calling the dedicated hosting company and requesting a hard shutdown. Shortly there after the server was up, and all services were responding.

Checking the logs, I started noticing the following warnings.

Kiwi Syslog Server for Windows

Today we needed to get some logging in place for a router and switch at a client's office. This is a dreaded Windows only network, so I needed to find some options for a syslog server that would be able to run on Windows 2003 platform. Of course in the Window's world, I'm always amazed by the amount of software that you need to pay for. In my eyes, a simple syslog server is... well, simple. I guess I just don't get it. I was able to find a free one, and one that works fairly well. It's called Kiwi Syslog Daemon. I was impressed on how easy it was to set up and get running. Literally it was a matter of minutes to get installed and to start observing router logs.

Logrotate lockup causing 100% CPU usage

Okay, I've been dealing with this problem FOREVER. On one box, my syslog-ng server, logrotate consumes 100% CPU for several hours, but will eventually finish. For this whole time, I've been thinking it's a bad logrotate script, but I've never been able to isolate it. My recent attempt to isolate the problem, I used strace to see what was going on.

strace -o mytrace -fF /usr/sbin/logrotate -d /etc/logrotate.conf

I immediately saw it looping on /etc/localtime. Here is a partial output of my strace:

Syndicate content