Category Archives: Centos

Cacti not filling certain RRDTool db’s on FreeBSD


We reinstalled one of our nameservers with BSD 10.

Ive syced the RRA files over from RRDTool using the follwing command:
rsync -avz /usr/local/share/cacti/rra/
rsync -avz /local/directory

it kept on running on a high load if it ran the poller.php and cmd.php from cacti on it.

I coulda dig into it and maby? solve it, but we are running into like 400+ hosts and alotta dataqueries, so i knew spine is a cleaner and better way to poll hosts, so why not give it a try…

Ive gone to Console > Settings > Poller tab > And put it on Spine instead of cmd.php
It did not work instant, i had to edit the settings file /usr/local/etc/spine.conf and put in the MySQL database details

After this it filled 3/4 of the RRD database, but a few hosts kept showing there down, so i didnt get what was going on. After a while i discovered a chmod on the spine binairy was wrong.

So after a quick:
chmod a+s spine

On the binairy file it was sorted, and the 4 hosts that where showing there down where “up” and recovering again. Very wierd… still dont know why a few hosts needed this. These werent hosts that had any special plugins… lol

Hope this will help u on your quest to polled hosts,
gr gr Thomas

WordPress drama – wp-login.php

We experiece alot of occasions lately that ppl are trying to crack a wordpress “admin”  login. to post spam or something on a wordpress blog. Change the standard username / password if u wanna be safe and dont wanna have a hosting company complain at u. We have been experiencing a higher load then useual on our shared servers lately.

If someone wont respond then we take action and use one of the following samples:

Create a .htaccess file or edit it, and put in the following:

<Files wp-login.php>
AuthUserFile /home/vhosts/
AuthName “Private access”
AuthType Basic
require valid-user

Generate a .passwd file on the desired location:
htpasswd -c /home/vhosts/ username

I know, i havent done anything like that yet, i dont care till i will be spammed till a load of 10, and then ill see if i use this or use any of the following options on the WordPress FAQ

gr gr Thomas ;)

Xenserver stuck VM / VDI is not available / Master switch

Xenserver stuck VM / VDI is not available / Master switch


Please only execute these commands if ur comfy with ssh and xenserver, if u dont know what ur doing u can get urself in alot of trouble by killing the wrong vm’s etc. Dont blame me if u seriously break something :).

Stuck VM:

  1. Try it first the normal way if a powerstate is stuck…
    xe vm-reset-powerstate force=true vm= “windows2″
    If this does not work, try the the next method.
  2. List the domains on the server and grep the UUID of the hung vm. U can find this info under the general tab in xencenter or under # xe vm-list on the host where its running.
    list_domains | grep 84e7e227-63b3-c518-4904-5d8b9cba7091
    The number it finds under the uuid is the domain of the hung vm.

    cd /opt/xensource/debug/xenops destroy_domain -domid 27

VDI is not available:
If u have an犀利士
y snapshots, remove those.. it will confuse u.. there might be a way to do it without removing them, but i do that most of the times.. or i just convert them to a new vm.

On the xenserver where the vm was last active and running:
xe vdi-list | grep -B1 [vmname] | grep uuid
Use that uuid to paste in the following command:
xe vdi-forget uuid=4dfb5f8c-0df7-4b4a-b5b0-c484c2f7247a
This will make your vm loose from the disk, and u need to reattach it.
Do a rescan on your storage repository, and click the vm u just deattached the disk of and reattach it.

Xenserver master change/switch:
First disable the High availibilty on the pool of servers:
xe pool-ha-disable
Check what server is the poolmaster(99% its the server in the top):
xe host-list
Copy the UUID from the new master host, paste/execute the next command with the new uuid (just a example):
xe pool-designate-new-master host-uuid=116ceeb1-c923-40ec-8ac6-243c89512908
Your xencenter will disconnect for a abit till its fully back again, and no servers are in mainance, activate HA again:
xe pool-ha-enable

Grgr Thomas!

Xenserver Tools stuck on installation 6.1 Windows

The driver that causes it and is making the installer freeze:
Citrix Xen Windows x64 PV Drivers
Its not visible from Software in configuration screen.

Remove everything from Citrix from your server, reboot and execute the following in cmd with administration rights:
wmic product where name=’Citrix Xen Windows x64 PV Drivers’ call uninstall

Reboot and reinstall the tools again.

gr gr Thomas

ProFTPd create a directory with another user.

Make sure the server type is standalone
ServerType Standalone

Next load the module in the proftpd.conf

<IfModule mod_cap.c>
CapabilitiesEngine on
CapabilitiesSet +CAP_CHOWN
Set the directory permissions for the right user/homedir, make sure this path is the same as the DefaultRoot
<Directory /var/www>
UserOwner apache
GroupOwner apache
Umask 002 003
It could be that the user needs rights to the apache group.
adduser ftpusername
usermod -g apache ftpusername
This solved it for me atleast…
Gr gr