![]() |
John VanDyk has been innovating with information technology for more than 20 years. Read more... |
Cacti Segfaulting on CentOS5
Submitted by John on Sun, 2010-01-24 21:33
I was getting Cacti set up and was having trouble with PHP. Specifically, it appeared that enabling the Cacti cron job caused a PHP segfault. I looked in /etc/cron.d/cacti to see what was being run:
cat /etc/cron.d/cacti
#*/5 * * * * cacti /usr/bin/php /usr/share/cacti/poller.php > /dev/null 2>&1
Then I ran it from the command line myself:
# php -v
PHP 5.1.6 (cli) (built: Jan 13 2010 17:13:05)
Copyright (c) 1997-2006 The PHP Group
Zend Engine v2.1.0, Copyright (c) 1998-2006 Zend Technologies
# php /usr/share/cacti/poller.php
Segmentation fault
Sure enough, an ugly error was recorded in /var/log/messages:
kernel: php[5250]: segfault at bf29ce64 ip b788cbf3 sp bf29cdc4 error 6 in libc-2.5.so[b7851000+13f000]
It turns out that this is what happens when you bork the permissions on cacti's MySQL table. After issuing a command like the following to MySQL, my segfault went away.
GRANT ALL ON cacti.* TO 'cactiusername'@'localhost' IDENTIFIED BY 'secret';
- Log in to post comments
Comments
Cacti's fault?
Hey John,
Am I right in saying that must be a bug with Cacti not checking db returns then?
Maybe
There is a bug #0000814 that mentions segfaulting and permissions, but I'm seeing this on 0.8.7.e and the bug was supposedly fixed in an earlier version. Yes, I believe the finger points to Cacti but I have not dug in enough to see what's really going wrong.