Cacti (home)ForumsDocumentation
Cacti: offical forums and support
It is currently Sun Feb 18, 2018 7:04 pm

All times are UTC - 5 hours




Post new topic Reply to topic  [ 16 posts ]  Go to page 1, 2  Next
Author Message
 Post subject: CMDPHP: Poller[0] ERROR: SQL Assoc Failed
PostPosted: Sat Oct 21, 2006 3:45 am 
Offline

Joined: Tue May 02, 2006 1:03 am
Posts: 3
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.


Top
 Profile  
 
 Post subject:
PostPosted: Sat Oct 21, 2006 2:00 pm 
Offline
Developer
User avatar

Joined: Tue May 14, 2002 5:08 pm
Posts: 14865
Location: MI, USA
Can you verify you MySQL version please?

TheWitness

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

Life is an adventure, let yours begin with Cacti!

Author of MacTrack, Boost, CLog, SpikeKill, Platform RTM, DSStats, maintainer of Spine, lot's of unpublished work and most of Cacti's bugs.
_________________
Official Cacti Documentation
Gandalfs Official Debugging Help
Central Plugin Repository
Central Templates Repository


Top
 Profile  
 
 Post subject:
PostPosted: Sun Oct 22, 2006 1:06 am 
Offline

Joined: Tue May 02, 2006 1:03 am
Posts: 3
TheWitness wrote:
Can you verify you MySQL version please?

TheWitness


# rpm -q mysql
mysql-4.1.20-1.RHEL4.1

Thanks
A.


Top
 Profile  
 
 Post subject:
PostPosted: Sun Oct 22, 2006 7:03 pm 
Offline
Developer
User avatar

Joined: Tue May 14, 2002 5:08 pm
Posts: 14865
Location: MI, USA
I suspect a damaged database.

TheWitness

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

Life is an adventure, let yours begin with Cacti!

Author of MacTrack, Boost, CLog, SpikeKill, Platform RTM, DSStats, maintainer of Spine, lot's of unpublished work and most of Cacti's bugs.
_________________
Official Cacti Documentation
Gandalfs Official Debugging Help
Central Plugin Repository
Central Templates Repository


Top
 Profile  
 
 Post subject:
PostPosted: Wed Oct 25, 2006 4:48 am 
Offline

Joined: Thu Sep 28, 2006 4:36 pm
Posts: 5
Location: Marseille (France)
TheWitness wrote:
I suspect a damaged database.

TheWitness
I have MySQL 5 and there is the same problem with an remote host.

I can't join it (
Quote:
SNMP Error
) but on locale machine there isn't problem.


Top
 Profile  
 
 Post subject: Same problem
PostPosted: Wed Oct 25, 2006 11:11 am 
Offline
User avatar

Joined: Wed Oct 25, 2006 11:05 am
Posts: 3
Location: Houston, TX
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.

Code:
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 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.


Top
 Profile  
 
 Post subject: Add me to the list
PostPosted: Thu Oct 26, 2006 10:39 am 
Offline

Joined: Thu Oct 26, 2006 10:34 am
Posts: 4
Location: Columbia, MD
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"


Top
 Profile  
 
 Post subject: Not a great solution, but the errors are gone.
PostPosted: Fri Nov 03, 2006 10:40 am 
Offline
User avatar

Joined: Wed Oct 25, 2006 11:05 am
Posts: 3
Location: Houston, TX
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.


Top
 Profile  
 
 Post subject:
PostPosted: Wed Nov 22, 2006 1:12 pm 
Offline

Joined: Thu Oct 26, 2006 10:34 am
Posts: 4
Location: Columbia, MD
I solved my issue by following three steps:

1) don't use CACTID; use CMD.PHP
2) Turn on full degugging for POLLER
3) Setup log rotation to delete the POLLER event log every week so it doesn't get too big.

This fixed all my issues.


Top
 Profile  
 
 Post subject:
PostPosted: Wed Nov 22, 2006 4:50 pm 
Offline
Developer
User avatar

Joined: Thu Dec 02, 2004 2:46 am
Posts: 22461
Location: Muenster, Germany
Please check my "NaN Debugging" HosTo linked in my signature and feel free to comment or extend
Reinhard

_________________
Official Cacti Documentation
Official Debugging Help
Central Plugin Repository
Central Templates Repository


Top
 Profile  
 
 Post subject:
PostPosted: Mon Dec 11, 2006 10:26 am 
Offline

Joined: Thu Dec 07, 2006 10:42 am
Posts: 2
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:

Quote:
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


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.

I am running this on a SuSE 9.2 system, mysql 4.0.21, cacti 0.8.6i. Any ideas ?


Top
 Profile  
 
 Post subject:
PostPosted: Wed Dec 13, 2006 3:29 am 
Offline

Joined: Thu Dec 07, 2006 10:42 am
Posts: 2
Anyone ?


Top
 Profile  
 
 Post subject:
PostPosted: Wed Dec 13, 2006 2:12 pm 
Offline
Developer
User avatar

Joined: Thu Dec 02, 2004 2:46 am
Posts: 22461
Location: Muenster, Germany
Again, this looks like a damaged database. Try repairing tables
Reinhard

_________________
Official Cacti Documentation
Official Debugging Help
Central Plugin Repository
Central Templates Repository


Top
 Profile  
 
 Post subject:
PostPosted: Mon Jul 23, 2007 10:34 am 
Offline

Joined: Mon Jul 23, 2007 10:27 am
Posts: 3
I encountered the same problem after I created a custom script and host.

gandalf wrote:
Again, this looks like a damaged database. Try repairing tables
Reinhard


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.

However, I found no tool in either the command line or the GUI where Cacti repairs the inconsistent database. Am I overlooking something?


Top
 Profile  
 
 Post subject:
PostPosted: Mon Jul 23, 2007 11:02 am 
Offline
Developer
User avatar

Joined: Thu Dec 02, 2004 2:46 am
Posts: 22461
Location: Muenster, Germany
Of course the SQL is wrong! But the data that should show up after the equal sign should be read from the DB!
Please open a new thread and post your current debug info
Reinhard

_________________
Official Cacti Documentation
Official Debugging Help
Central Plugin Repository
Central Templates Repository


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 16 posts ]  Go to page 1, 2  Next

All times are UTC - 5 hours


Who is online

Users browsing this forum: No registered users and 2 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  

Protected by Anti-Spam ACP Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group