CMDPHP: Poller[0] ERROR: SQL Assoc Failed
Moderators: Developers, Moderators
CMDPHP: Poller[0] ERROR: SQL Assoc Failed
Hello,
I have upgraded Cacti to 0.8.6i and now when I run the rebuild poller cache script I get the following error in the log:
10/21/2006 10:41:14 AM - 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=41 and data_template_rrd.local_data_id=90"
Does anyone know how to fix this issue ?
Thanks
A.
I have upgraded Cacti to 0.8.6i and now when I run the rebuild poller cache script I get the following error in the log:
10/21/2006 10:41:14 AM - 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=41 and data_template_rrd.local_data_id=90"
Does anyone know how to fix this issue ?
Thanks
A.
- TheWitness
- Developer
- Posts: 17004
- Joined: Tue May 14, 2002 5:08 pm
- Location: MI, USA
- Contact:
Can you verify you MySQL version please?
TheWitness
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?
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?
- TheWitness
- Developer
- Posts: 17004
- Joined: Tue May 14, 2002 5:08 pm
- Location: MI, USA
- Contact:
I suspect a damaged database.
TheWitness
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?
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?
Same problem
We're running mysql-5.0.18-20.4 and having the exact same problem, where all errors are related to a graph id of "In/Out Errors/Discarded Packets" as shown below.
I first dicovered this when I noticed that many of my router graphs were displaying "nan" in the Current, Average, and Maximum fields. I have verified that SNMP is getting the data, but it is apparently not getting in the database or RRD files.
I'm running Cacti 0.8.6h, MySQL 5.0.18-20.4
If it is a database problem, how would I go about correcting it?
UPDATE: After upgrading to cacti 0.8.6i I'm still receiving these messages in the log, and my problematic .rrd files are still not getting updated.
Code: Select all
10/25/2006 11:53:41 AM - 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=In/Out Errors/Discarded Packets and snmp_query_graph_rrd.data_template_id=38 and data_template_rrd.local_data_id=646"
I'm running Cacti 0.8.6h, MySQL 5.0.18-20.4
If it is a database problem, how would I go about correcting it?
UPDATE: After upgrading to cacti 0.8.6i I'm still receiving these messages in the log, and my problematic .rrd files are still not getting updated.
Add me to the list
I'm getting the error as well. Basically due to the portion of the SQL statement "snmp_query_graph_rrd.snmp_query_graph_id= and", the errors are being thrown. I've reinstalled cacti, v0.8.6i, and I'm running MySQL v mysql-4.1.20-1.RHEL4.1. Any solutions yet???
Here's my cacti log:
10/26/2006 11:01:02 AM - 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=49 and data_template_rrd.local_data_id=10"
10/26/2006 11:00:40 AM - SYSTEM STATS: Time:1.1552 Method:cmd.php Processes:1 Threads:N/A Hosts:3 HostsPerProcess:3 DataSources:5 RRDsProcessed:5
10/26/2006 11:00:32 AM - 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=49 and data_template_rrd.local_data_id=10"
10/26/2006 11:00:32 AM - 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=49 and data_template_rrd.local_data_id=10"
10/26/2006 10:59:55 AM - SYSTEM STATS: Time:1.2058 Method:cmd.php Processes:1 Threads:N/A Hosts:3 HostsPerProcess:3 DataSources:5 RRDsProcessed:5
10/26/2006 10:57:19 AM - 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=49 and data_template_rrd.local_data_id=9"
10/26/2006 10:57:19 AM - 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=49 and data_template_rrd.local_data_id=9"
Here's my cacti log:
10/26/2006 11:01:02 AM - 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=49 and data_template_rrd.local_data_id=10"
10/26/2006 11:00:40 AM - SYSTEM STATS: Time:1.1552 Method:cmd.php Processes:1 Threads:N/A Hosts:3 HostsPerProcess:3 DataSources:5 RRDsProcessed:5
10/26/2006 11:00:32 AM - 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=49 and data_template_rrd.local_data_id=10"
10/26/2006 11:00:32 AM - 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=49 and data_template_rrd.local_data_id=10"
10/26/2006 10:59:55 AM - SYSTEM STATS: Time:1.2058 Method:cmd.php Processes:1 Threads:N/A Hosts:3 HostsPerProcess:3 DataSources:5 RRDsProcessed:5
10/26/2006 10:57:19 AM - 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=49 and data_template_rrd.local_data_id=9"
10/26/2006 10:57:19 AM - 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=49 and data_template_rrd.local_data_id=9"
Not a great solution, but the errors are gone.
I've managed to fix my problems but at the cost of loosing my historical data. I'm not very happy about it, but we needed current data. I ended up re-creating every data source that was having problems and deleting the old ones.
I know this won't help anybody else out there. I just didn't have the time to dink with it to determine exactly what the problem was.
I know this won't help anybody else out there. I just didn't have the time to dink with it to determine exactly what the problem was.
I have the same issue and no idea how to solve it. I have several hosts configured and they are working fine but when I tried adding a new one, several days later, I get the error below:
I am running this on a SuSE 9.2 system, mysql 4.0.21, cacti 0.8.6i. Any ideas ?
Note the bolded part, that's why the SQL query fails. Mind you, in cacti I see the host ok, I can add graphs, etc. I just dont see them, the RRD is not created at all. I get that error When I click the "New graphs" link, after I define the device.12/11/2006 09:18:48 AM - CMDPHP: Poller[0] ERROR: SQL Assoc Failed "select graph_local.graph_template_id from (graph_local,host_graph) where graph_local.graph_template_id=host_graph.graph_template_id and graph_local.host_id=host_graph.host_id and graph_local.host_id= group by graph_local.graph_template_id
I am running this on a SuSE 9.2 system, mysql 4.0.21, cacti 0.8.6i. Any ideas ?
I encountered the same problem after I created a custom script and host.
However, I found no tool in either the command line or the GUI where Cacti repairs the inconsistent database. Am I overlooking something?
As expected, "mysqlcheck -u cacti -p cacti" showed that all tables are OK. That was expected as the error is of course in the faulty SQL generated by Cacti. ("where x=" is incorrect SQL, you MUST add a value, like: "where x=3" as sylaan correctly pointed out.gandalf wrote:Again, this looks like a damaged database. Try repairing tables
Reinhard
However, I found no tool in either the command line or the GUI where Cacti repairs the inconsistent database. Am I overlooking something?
Who is online
Users browsing this forum: No registered users and 5 guests