[solved] Error when Querying data or viewing graphs

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

Moderators: Developers, Moderators

Post Reply
jadus
Posts: 10
Joined: Fri Aug 08, 2008 12:39 pm

[solved] Error when Querying data or viewing graphs

Post by jadus »

I'm getting an unusual error after migrating my Cacti install to a new server.
I used PHPmyadmin to export the database, and then used the Windows Installer to install Cacti on the new server (Windows Server 2003). I re-imported the database and copied over the RRA's and plugins.

It appears like Cacti is working properly, in that graphs display and correct values are being shown, including for my Weathermap.

However, when trying to add new data sources, or even new graphs using the "SNMP - Interface Statistics" under "Associated Data Queries", I get many errors in the log. These error occur when I either view a graph, or click "reload data query":

Code: Select all

01/22/2009 11:29:09 AM - CMDPHP: Poller[0] ERROR: SQL Assoc Failed!, Error:'1146', SQL:"select snmp_index from host_snmp_cache where host_id=6 and snmp_query_id=1 group by snmp_index"
01/22/2009 11:29:09 AM - CMDPHP: Poller[0] ERROR: SQL Assoc Failed!, Error:'1146', SQL:"select snmp_index from host_snmp_cache where host_id=6 and snmp_query_id=1"
01/22/2009 11:29:09 AM - CMDPHP: Poller[0] ERROR: SQL Assoc Failed!, Error:'1146', SQL:"select snmp_index from host_snmp_cache where host_id=6 and snmp_query_id=9 group by snmp_index" 
When I debug the data source of the existing "SNMP - Interface statistics" there are no errors and everything looks fine, however the "reload Data query" still returns no results and adds those errors to the log.

I have made sure file permissions are correct. I have tried running the repair_database.php file, and rebuilding the poller cache.

Any suggestions?
User avatar
BSOD2600
Cacti Moderator
Posts: 12171
Joined: Sat May 08, 2004 12:44 pm
Location: USA

Post by BSOD2600 »

The technical support page show everything is ok? sounds like the database might need repair.
jadus
Posts: 10
Joined: Fri Aug 08, 2008 12:39 pm

Post by jadus »

The technical support page lists all the tables in the database as "OK", and nothing else seems out of the ordinary.

I had already run the repair_database.php file.
User avatar
BSOD2600
Cacti Moderator
Posts: 12171
Joined: Sat May 08, 2004 12:44 pm
Location: USA

Post by BSOD2600 »

Try clearing the poller/snmp caches, since thats what its complaining about.
jadus
Posts: 10
Joined: Fri Aug 08, 2008 12:39 pm

Post by jadus »

What is supposed to happen if the rebuild of the cache works correctly?

When I view the Poller cache within Cacti, there's 129 items, and the SNMP cache is empty.

After running "php rebuild_poller_cache.php", and then viewing the poller cache in Cacti again, there's still the same 129 items.

Perhaps it's not clearing properly?
jadus
Posts: 10
Joined: Fri Aug 08, 2008 12:39 pm

Post by jadus »

I think I figured it out. When I had copied the database to the new server, somehow the host_snmp_cache table didn't get copied.

I added it in from the cacti.sql file and now everything seems to be working.
Post Reply

Who is online

Users browsing this forum: No registered users and 3 guests