Xymon CGI Scripts not working

15.05.2011

I recently installed Xymon again on a few private servers. The server demon was running on a server where I had not installed Apache myself. So it took a little while to figure out that suExec does not go well with Xymon.

If your Xymon cgi scripts are not working and you see this in your Apache error_log “Premature end of script headers: svcstatus.sh” then your Apache might be configured it “SuexecUserGroup” (http://httpd.apache.org/docs/current/mod/mod_suexec.html). The lazy way to Xymon cgi scripts working is to remove suExec from your Apache config. Will only work if nothing else in the same web server scope does not depend on suExec.

The not-so-lazy way of solving this is of course to figure out which suExec config settigns work with Xymon.  This would help in situations where you are in control of Apache and/or where you need suExec for something else inside same scope (virtual hosts).

Xymon http://www.xymon.org/


OpenSolaris Hosting at Hetzner

24.09.2009

I just noticed this. I dont if its old news or not, but it is pretty cool. The german hosting provider Hetzner now provides an OpenSolaris resue system. So now you have reasonable option for supporting a remote OpenSolaris system without having to re-install from scratch if you run into problems with your root zpool.

Hetzner OpenSolaris Wiki (in german)
Hetzner Company


Linux: getting Virtualbox Guest Additions to work with CentOS 5

16.08.2009

I installed CentOS 5 as a guest OS in Virtualbox 3.0.4 running on a Windows Vista host.

Its probably me, but I couldnt get the guest additions for Virtualbox 3.0.4 installed for CentOS within 5 minutes. After a lot of googling and reading about DKMS for Linux, I decided to cheat and try a simple hack.

Suposedly the correct way to install the guest additions is to have a package named “dkms” installed. Unfortunately this package does not come with the Cent OS 5 distribution DVD (or at least, I couldnt find it). As I didnt want to install other dependency packages (yum-priorities) nor change my RPM repository settings, I went for the quick and dirty hack:

# ln -s /usr/src/kernels/2.6.18-128.4.1.el5-i686 /usr/src/linux
# sh /media/VBOXADDITIONS_3.0.4_50677/VBoxLinuxAdditions-x86.run

Reboot, and voila. You now have better graphics, mouse and copy&paste support.


Linux: Network alias and default gateway on CentOS

14.08.2009

To add another IP number to an existing network interface you only need to create an additional file with the additional IP configuration in the /etc/sysconfig/network-scripts directory. As you are creating an additional interface “on top” an existing one there should already be one configuration file named ifcfg-XXXX, where XXXX is the device name, ie. eth0.

To configure a new IP number on top of the eth0 network device, create your new file ifcfg-eth0:1 like this:

# Advanced Micro Devices [AMD] 79c970 [PCnet32 LANCE]
DEVICE=eth0:1
BOOTPROTO=static
BROADCAST=192.168.0.255
IPADDR=192.168.0.29
NETMASK=255.255.255.0
NETWORK=192.168.0.0
ONBOOT=yes

To change or add your default gateway, you can edit the file /etc/sysconfig/network:

NETWORKING=yes
NETWORKING_IPV6=no
HOSTNAME=centos
GATEWAY=192.168.0.1

To apply the changes:

# /etc/init.d/network restart


Linux: Network alias and default gateway on OpenSUSE

08.08.2009

To add another IP address to an existing network interface, you only need to specify it in the /etc/sysconfig/network/ifcfg-eth0 like this:


STARTMODE='auto'
BOOTPROTO='static'
BROADCAST=192.168.0.255
ETHTOOL_OPTIONS=''
IPADDR=192.168.0.26/24
IPADDR_A=192.168.0.27/24
LABEL_A=1
MTU=''
NAME='79c970 [PCnet32 LANCE]'
NETMASK=''
NETWORK=''
REMOTE_IPADDR=''
USERCONTROL='no'

This will plumb and configure the eth0:1 with the IP number of 192.168.0.27. The suffix _A can be almost anything you like, and you can configure further network interfaces using additional suffixes. The “LABEL_” directive is important to set, otherwise your interface will not be configured. The value of the “LABEL_” directive will become the interface instance. In this example the :1 in eth0:1, but you can choose whatever number you want, in case it need to be something else in your world.

If you want to set or change your default gateway too, you can just change it in the file /etc/sysconfig/network/routes like this:

default 192.168.0.1 - -

After both changes can apply them by rerunning the RC script:

/etc/init.d/network restart

Actually pretty simple and straight forward, but if you are used to virtual interfaces on Solaris then this will save you 20 min of looking through /etc to discover how its done with OpenSUSE.


It lives, for now…

23.07.2009

I managed to breathe some life into my age old PC. It is an AMD 2600+ with 512 MB of RAM, a 80 GB drive and a Plextor CD writer. Its pretty noisy but will have to do as a test machine for various things I want to try out until I find suitable replacement.

After installing Solaris 10 5/09 on it, I found out that the on-board network interface was not recognised. On sun.com there a HCL database of many of the components being supported or reported to work with Solaris. However I did not know how to figure out which vendor or model to look for, and I could not be bothered to install another OS on it just for finding out the type/model of the network interface. I was about the throw machine back under the desk when I realised I had an OpenSolaris 2009.06 LiveCD laying on the same desk. The LiveCD has a Device Utility program on the desktop which tells you the vendor and often model name of all yor hardware components; my network interface was a SiS 900. Back to the HCL page, download driver archive sfe-2.6.0a.tar, unpack archive, quickly glance into the README.txt and off we go. The process very smooth and only took a few minutes. Thanks to Masayuki Murayama for still maintaning these drivers.

These were the commands I used:

# gunzip -cd sfe-2.6.0a.tar.gz | tar xf -
# cd sfe-2.6.0a
# /usr/ccs/bin/make install
# ./adddrv.sh
# /usr/ccs/bin/make uninstall
# modload obj/sfe
# modinfo | grep sfe
234 f9ea9000 be8c 227 1 sfe (sis900/dp83815 driver 2.6.0)
# devfsadm -i sfe
# ifconfig sfe0 plumb
# ifconfig -a
lo0: flags=2001000849 mtu 8232 index 1
inet 127.0.0.1 netmask ff000000
sfe0: flags=1000842 mtu 1500 index 2
inet 0.0.0.0 netmask 0
ether 0:b:6a:17:b4:bf

After booting I noticed that ZFS was complaining about a file being read correctly, so I thought it was a good idea to have all blocks mirrored even though its on the same drive. Better than nothing, and it might prolong the life of this machine a bit.
The error message went away after doing this, followed by a ZFS scrub.


# zfs set copies=2 rpool
# zpool scrub rpool

Hopefully the machine will live long enough for the replacement to arrive…


Follow

Get every new post delivered to your Inbox.