Cacti (home)ForumsRepositoryDocumentation
Cacti: offical forums and support  

 FAQFAQ   SearchSearch   MemberlistMemberlist    RegisterRegister   ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in    


[solved] Cacti-Poller crashes after server restart

 
Post new topic   Reply to topic    Cacti Forum Index -> Help: Linux/Unix Specific
Author Message
Atkatla



Joined: 14 Apr 2008
Posts: 41

PostPosted: Tue Nov 18, 2008 9:45 am    Post subject: [solved] Cacti-Poller crashes after server restart Reply with quote

Hi,
I had to reboot my server and afterwards, cacti did not begin to fetch data.
A manual start of the Poller as the cactiuser gives the following output
Code:
cactiuser@cacti:/> php /srv/www/htdocs/cacti/poller.php
No log handling enabled - turning on stderr logging
Undefined OBJECT-GROUP (snmpBasicNotificationsGroup): At line 692 in /usr/share/snmp/mibs/v2-mib.my
11/18/2008 03:40:25 PM - POLLER: Poller[0] NOTE: Poller Int: '60', Cron Int: '300', Time Since Last: '24', Max Runtime '298', Poller Runs: '5'
11/18/2008 03:40:25 PM - POLLER: Poller[0] NOTE: Cron is configured to run too often!  The Poller Interval is '60' seconds, with a minimum Cron period of '60' seconds, but only 24 seconds have passed since the poller last ran.

Afterwards, there is no poller.php under "ps" so I assume the process shuts down.

I changed log level to debug and got the following output in cacti.log after a manual poller.php-start:
Code:
11/18/2008 03:37:51 PM - POLLER: Poller[0] NOTE: Cron is configured to run too often! The Poller Interval is '60' seconds, with a minimum Cron period of '60' seconds, but only 170 seconds have passed since the poller last ran.
11/18/2008 03:37:51 PM - POLLER: Poller[0] NOTE: Poller Int: '60', Cron Int: '300', Time Since Last: '170', Max Runtime '298', Poller Runs: '5'
11/18/2008 03:37:51 PM - CMDPHP: Poller[0] DEBUG: SQL Cell: "select count(*) from poller_item where rrd_next_step<=0"
11/18/2008 03:37:51 PM - CMDPHP: Poller[0] DEBUG: SQL Assoc: "SELECT name, file, function FROM plugin_hooks WHERE status = 1 AND hook = 'poller_top'"
11/18/2008 03:37:51 PM - CMDPHP: Poller[0] DEBUG: SQL Assoc: "SELECT name, file, function FROM plugin_hooks WHERE status = 1 AND hook = 'config_form'"
11/18/2008 03:37:51 PM - CMDPHP: Poller[0] DEBUG: SQL Assoc: "SELECT name, file, function FROM plugin_hooks WHERE status = 1 AND hook = 'valid_host_fields'"
11/18/2008 03:37:51 PM - CMDPHP: Poller[0] DEBUG: SQL Assoc: "SELECT name, file, function FROM plugin_hooks WHERE status = 1 AND hook = 'config_settings'"
11/18/2008 03:37:51 PM - CMDPHP: Poller[0] DEBUG: SQL Assoc: "SELECT id FROM plugin_realms WHERE plugin = 'aggregate' AND file = 'aggregate_templates.php,aggregate_templates_items.php,color_templates.php,color_templates_items.php'"
11/18/2008 03:37:51 PM - CMDPHP: Poller[0] DEBUG: SQL Assoc: "SELECT id FROM plugin_realms WHERE plugin = 'rrdclean' AND file = 'rrdcleaner.php,rrdmove.php'"
11/18/2008 03:37:51 PM - CMDPHP: Poller[0] DEBUG: SQL Assoc: "SELECT * FROM plugin_realms"
11/18/2008 03:37:51 PM - CMDPHP: Poller[0] DEBUG: SQL Assoc: "SELECT name, file, function FROM plugin_hooks WHERE status = 1 AND hook = 'config_arrays'"

The crontab:
Code:
SHELL=/bin/sh
PATH=/usr/bin:/usr/sbin:/sbin:/bin:/usr/lib/news/bin
MAILTO=root
#
# check scripts in cron.hourly, cron.daily, cron.weekly, and cron.monthly
#
-*/15 * * * *   root  test -x /usr/lib/cron/run-crons && /usr/lib/cron/run-crons >/dev/null 2>&1
*/5 * * * * cactiuser php /srv/www/htdocs/cacti/poller.php > /dev/null 2>&1

What could be the reason for this error? When I watch top, I can see how every 5 minutes php and spine shortly appear. This indicates that the poller-script crashes. How can I get more info for debug why the poller.php crashes?


Last edited by Atkatla on Wed Nov 19, 2008 5:37 am; edited 1 time in total
Back to top
khufure
Cacti User


Joined: 24 Oct 2007
Posts: 164
Location: San Francisco, CA

PostPosted: Tue Nov 18, 2008 7:57 pm    Post subject: Re: Cacti-Poller crashes after server restart Reply with quote

Atkatla wrote:

What could be the reason for this error? When I watch top, I can see how every 5 minutes php and spine shortly appear. This indicates that the poller-script crashes. How can I get more info for debug why the poller.php crashes?


Find out what's happening in the poller. Instead of directing output to /dev/null put it into a self-overwriting logfile.
Code:
*/5 * * * * cactiuser php /srv/www/htdocs/cacti/poller.php > /dev/null 2>&1


to
Code:
*/5 * * * * cactiuser php /srv/www/htdocs/cacti/poller.php > /srv/www/htdocs/cacti/log/poller.log 2>&1
Back to top
Atkatla



Joined: 14 Apr 2008
Posts: 41

PostPosted: Wed Nov 19, 2008 5:36 am    Post subject: Reply with quote

The last entry of the poller.log said that ther thold.log was not writable. That file didnt exist. I remember that I deleted it because it grew big and I expected that it would be created new automatically.

I created that file manually and now everything works fine again. Thank you.
Back to top
Display posts from previous:   
Post new topic   Reply to topic    Cacti Forum Index -> Help: Linux/Unix Specific All times are GMT - 5 Hours
Page 1 of 1

 



Powered by phpBB © 2001, 2005 phpBB Group