CMDPHP: Poller[0] ERROR: SQL Assoc Failed

Post support questions that relate to the Windows 2003/2000/XP operating systems.

Moderators: Developers, Moderators

Post Reply
jagbarcelo
Posts: 23
Joined: Mon Nov 21, 2005 4:28 am
Location: Spain

CMDPHP: Poller[0] ERROR: SQL Assoc Failed

Post by jagbarcelo »

From time to time, in bursts (not in every poll), a lot of errors as the following appear in cacti logfile:

02/27/2006 02:35:44 PM - CMDPHP: Poller[0] ERROR: SQL Assoc Failed "select snmp_query_graph_rrd.snmp_field_name, data_template_rrd.id as data_template_rrd_id from (snmp_query_graph_rrd,data_template_rrd) where snmp_query_graph_rrd.data_template_rrd_id=data_template_rrd.local_data_template_rrd_id and snmp_query_graph_rrd.snmp_query_graph_id= and snmp_query_graph_rrd.data_template_id=52 and data_template_rrd.local_data_id=60"

02/27/2006 02:35:44 PM - CMDPHP: Poller[0] ERROR: SQL Assoc Failed "select snmp_query_graph_rrd.snmp_field_name, data_template_rrd.id as data_template_rrd_id from (snmp_query_graph_rrd,data_template_rrd) where snmp_query_graph_rrd.data_template_rrd_id=data_template_rrd.local_data_template_rrd_id and snmp_query_graph_rrd.snmp_query_graph_id= and snmp_query_graph_rrd.data_template_id=52 and data_template_rrd.local_data_id=58"

02/27/2006 02:35:44 PM - CMDPHP: Poller[0] ERROR: SQL Assoc Failed "select snmp_query_graph_rrd.snmp_field_name, data_template_rrd.id as data_template_rrd_id from (snmp_query_graph_rrd,data_template_rrd) where snmp_query_graph_rrd.data_template_rrd_id=data_template_rrd.local_data_template_rrd_id and snmp_query_graph_rrd.snmp_query_graph_id= and snmp_query_graph_rrd.data_template_id=52 and data_template_rrd.local_data_id=57"

02/27/2006 02:35:44 PM - CMDPHP: Poller[0] ERROR: SQL Assoc Failed "select snmp_query_graph_rrd.snmp_field_name, data_template_rrd.id as data_template_rrd_id from (snmp_query_graph_rrd,data_template_rrd) where snmp_query_graph_rrd.data_template_rrd_id=data_template_rrd.local_data_template_rrd_id and snmp_query_graph_rrd.snmp_query_graph_id= and snmp_query_graph_rrd.data_template_id=52 and data_template_rrd.local_data_id=56"

I have marked in red the place of the sql statement error.
I am running:
* cacti-0.8.6h (and all the patches up to 23/feb)
* PHP 5.1.2
* MySQL 5.0.18-n

It does not seem a problem with MySQL. It is more likely to be a program bug in the php code that generates the statement. However the fact that they are not appearing in every poll makes me think it might be something more complex. This is a recent install (4 days running), with a few hosts and datasources (I don't think the database has been corrupted or there are referencial integrity errors hanging around).

Regards.
User avatar
BSOD2600
Cacti Moderator
Posts: 12171
Joined: Sat May 08, 2004 12:44 pm
Location: USA

Post by BSOD2600 »

I recall seeing someone else posting this bug, not I cant find the bug report. Post one at bugs.cacti.net.
User avatar
TheWitness
Developer
Posts: 17007
Joined: Tue May 14, 2002 5:08 pm
Location: MI, USA
Contact:

Post by TheWitness »

Please open a bug in Mantis (http://bugs.cacti.net) and reference this post in the report. Then, in MySQL, use either MySQL Administrator or a text editor and find the sql_mode variable in my.conf and comment it out.

After that is complete, restart MySQL. Report back to the forum is the problems go away.

Thanks,

TheWitness
True understanding begins only when we realize how little we truly understand...

Life is an adventure, let yours begin with Cacti!

Author of dozens of Cacti plugins and customization's. Advocate of LAMP, MariaDB, IBM Spectrum LSF and the world of batch. Creator of IBM Spectrum RTM, author of quite a bit of unpublished work and most of Cacti's bugs.
_________________
Official Cacti Documentation
GitHub Repository with Supported Plugins
Percona Device Packages (no support)
Interesting Device Packages


For those wondering, I'm still here, but lost in the shadows. Yearning for less bugs. Who want's a Cacti 1.3/2.0? Streams anyone?
danyboy
Posts: 3
Joined: Tue Mar 07, 2006 6:26 pm

Post by danyboy »

I've had the same problem using DEFAULT CHARSET set to 'latin2' on MySQL cacti tables...
Please make sure that DEFAULT CHARSET is set to 'latin1' or 'cp1251'.

Gentoo 2006.1
Cacti-0.8.6h
RRDtool 1.2.12
PHP 4.4.0-pl1
MySQL 4.1.14

--
danyboy
Post Reply

Who is online

Users browsing this forum: No registered users and 0 guests