Poller endless loop, new install CentOS4

Post support questions that directly relate to Linux/Unix operating systems.

Moderators: Developers, Moderators

Post Reply
Chus
Posts: 21
Joined: Wed May 30, 2007 7:30 am

Poller endless loop, new install CentOS4

Post by Chus »

Hy all,
Need some help over here. I ve installed cacti-0.8.6(i)j on Centos 4.
I m having the problem that only build in graphs and localhost graphs work.
If I add another host, snmp traffic on a router or a simple ping to another host.
Poller.php runs never ends.

My main problem is that as soon as I add a new graph, the poller enters a loop.
I'm getting al lot of these messages in cacti.log
CMDPHP: Poller[0] DEBUG: SQL Assoc: "selec poller_output.output, poller_output.time, poller_output.local_data_id, poller_item.rrd_path, poller_item.rrd_name, poller_item.rrd_num from (poller_output,poller_item) where (poller_output.local_data_id=poller_item.local_data_id and poller_output.rrd_name=poller_item.rrd_name) LIMIT 10000
And on poller log:
POLLER: Poller[0] DEBUG: About to Spawn a Remote Process [CMD: /usr/bin/php, ARGS: -q /var/www/cacti/cmd.php 0 4]
Waiting on 1/1 pollers.
Waiting on 1/1 pollers.
<a lot of this> ..
This happens nevertheless I execute the poller from crontab or from commandline.

I've been reading FAQ and done some search on the forum.
I've seen that there where other that got problems with the i version so I reinstalled the j version form rpmforge. (Deleted first the old one).
http://forums.cacti.net/about21457.html
But this did not really help.

So I continued searching and got this post.
http://forums.cacti.net/about21355.html
Think this got close to my problem but im not getting how he fixed it.

What I did until now.
I deactivated all Devices. And increased the log level to Debug.
Then I reactivated my ping device. Just to get sure that's the only thing I got in log.
I start the command /usr/bin/php /var/www/cacti/cmd.php 4 4 (4 is my ping test host_id)
It seems to run, command starts and writes some lines to log, and ends again.
Now I try this with poller.php having all devices deactived only host_id 4 activated.
Same again poller.php enters loop and gets killed by timeout.
Now I went to poller cache and grabbed the command string and pasted it to command line. And it works perfectly returning a value.
I checked the rrd database but it doesnt exist. Database hasnt been created.

But if I execute the Data source debug result in command line it is created.

Hope someone can give me a hand on this.

Here are my system data.
PHP
PHP 4.3.11 (cgi) (built: Jul 10 2006 15:19:32)
php.ini memory setting = memory_limit = 128M (Have seen this on some post)
OS
Centos 4 kernel 2.6.9-34.0.2.ELsmp
Perl
This is perl, v5.8.5 built for i386-linux-thread-mult
SNMP
net-snmp-perl-5.1.2-11.EL4.10
php-snmp-4.3.11-2.8
net-snmp-utils-5.1.2-11.EL4.10
net-snmp-libs-5.1.2-11.EL4.10
net-snmp-5.1.2-11.EL4.10
Mysql
mysql-devel-4.1.20-2.RHEL4.1
php-mysql-4.3.11-2.8
mysql-4.1.20-2.RHEL4.1
mysql-server-4.1.20-2.RHEL4.1
RRD tool
rrdtool-1.0.50-3.2.el4.rf

- Just to get it clear.
Poller works fine if I only use the graphs that came with installation or I add a localhost graph like disk space.
User avatar
gandalf
Developer
Posts: 22383
Joined: Thu Dec 02, 2004 2:46 am
Location: Muenster, Germany
Contact:

Post by gandalf »

Did you apply all known patches from main cacti website?
Reinhard
Chus
Posts: 21
Joined: Wed May 30, 2007 7:30 am

Post by Chus »

Thanks a lot Gandalf. I have applied all the patches now, and it seems that now it works.
I still got some error but I will have to debug them and search some more infos on the forums.

Just a question about how works cmd.php.

If I execute /usr/bin/php /var/www/cacti/cmd.php 2 2
I get nothing in return. Nevertheless I trigger the first host or the second.
But if I execute /usr/bin/php /var/www/cacti/cmd.php whitout a host I get message what cmd.php is doing.
CMDPHP: Poller[0] Host[1] SNMP: Device does not require SNMP
CMDPHP: Poller[0] Host[1] No host availability check possible for '127.0.0.1'.
CMDPHP: Poller[0] Host[1] DS[3] CMD: perl /var/www/cacti/scripts/linux_memory.pl MemFree:, output: 732048
CMDPHP: Poller[0] Host[1] DS[4] CMD: perl /var/www/cacti/scripts/linux_memory.pl SwapFree:, output: 744964
CMDPHP: Poller[0] Host[1] DS[5] CMD: perl /var/www/cacti/scripts/loadavg_multi.pl, output: 1min:0.00 5min:0.00 10min:0.00
CMDPHP: Poller[0] Host[1] DS[6] CMD: perl /var/www/cacti/scripts/unix_users.pl , output: 2
CMDPHP: Poller[0] Host[1] DS[7] CMD: perl /var/www/cacti/scripts/unix_processes.pl, output: 81
CMDPHP: Poller[0] Host[2] SNMP: Host responded to SNMP
CMDPHP: Poller[0] Host[2] DS[11] CMD: perl /var/www/cacti/scripts/ping.pl 192.168.1.1, output: 0.375
CMDPHP: Poller[0] Time: 0.1391 s, Theads: N/A, Hosts: 2
Does the cmd.php create rrd files? Or do I have to start poller.php to create the rrd files.
User avatar
gandalf
Developer
Posts: 22383
Joined: Thu Dec 02, 2004 2:46 am
Location: Muenster, Germany
Contact:

Post by gandalf »

In productive mode, always run poller.php. This one selects cmd.php or cactid depending on Settings-Poller
You may use cmd.php to run against a single host only for testing purpose. But pay attention not to accidentally create rrd files as wrong user (e.g. root or someone else). cactiuser will not be able to update those files afterwards
Reinhard
Post Reply

Who is online

Users browsing this forum: No registered users and 7 guests