[SOLVED]:SQL Assoc Failed! Error:1017

Post general support questions here that do not specifically fall into the Linux or Windows categories.

Moderators: Developers, Moderators

jotac
Posts: 22
Joined: Thu Jun 10, 2010 9:42 pm

[SOLVED]:SQL Assoc Failed! Error:1017

Post by jotac »

Hello community,

I have a problem: after months of running the plug-in weathermap stopped showing traffic. Soon found that cacti is not collecting the data. SNMP is working correctly. Ask for help, because I will be charged next week to present the graph of traffic over the last 30 days!

Following parts of debugging 5 minutes:

Code: Select all

06/11/2010 08:34:14 AM - CMDPHP: Poller[0] ERROR: SQL Assoc Failed!, Error:'1017', SQL:"SELECT local_data_id, rrd_name FROM poller_output"
06/11/2010 08:34:15 AM - CMDPHP: Poller[0] ERROR: SQL Assoc Failed!, Error:'1017', SQL:"select  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"
06/11/2010 08:34:16 AM - CMDPHP: Poller[0] ERROR: A DB Exec Failed!, Error:'1017', SQL:"insert into poller_output (local_data_id, rrd_name, time, output) values (59, 'traffic_out', '2010-06-11 08:34:15', '90720')'
06/11/2010 08:34:16 AM - CMDPHP: Poller[0] ERROR: A DB Exec Failed!, Error:'1017', SQL:"insert into poller_output (local_data_id, rrd_name, time, output) values (59, 'traffic_in', '2010-06-11 08:34:15', '577114')'
06/11/2010 08:34:16 AM - CMDPHP: Poller[0] ERROR: SQL Assoc Failed!, Error:'1017', SQL:"select  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)  "
06/11/2010 08:34:16 AM - SYSTEM STATS: Time:1.6092 Method:cmd.php Processes:1 Threads:N/A Hosts:70 HostsPerProcess:70 DataSources:4 RRDsProcessed:0
06/11/2010 08:34:16 AM - SYSTEM THOLD STATS: Time:0.0057 Tholds:0 Hosts:0
06/11/2010 08:34:16 AM - WEATHERMAP
: Poller[0] Weathermap 0.95b starting - Normal logging mode. Turn on DEBUG in Cacti for more information
06/11/2010 08:34:16 AM - WEATHERMAP: Poller[0] [Map 3] simple.conf: Map: /var/www/cacti/plugins/weathermap/configs/simple.conf -> /var/www/cacti/plugins/weathermap/output/f89071fc16045372786e.html & /var/www/cacti/plugins/weathermap/output/f89071fc16045372786e.png
06/11/2010 08:34:16 AM - WEATHERMAP: Poller[0] [Map 3] simple.conf: ReadData: LINK xx-Roteador-IGX, target: /var/www/cacti/rra/ra_-_xx_traffic_in_96.rrd on config line 181 had no valid data, according to WeatherMapDataSource_rrd
06/11/2010 08:34:16 AM - WEATHERMAP: Poller[0] [Map 3] simple.conf: ReadData: LINK RANBAND-Roteador-IGX, target: /var/www/cacti/rra/ra_-_xxx_traffic_in_37.rrd on config line 189 had no valid data, according to WeatherMapDataSource_rrd
06/11/2010 08:34:16 AM - WEATHERMAP: Poller[0] [Map 3] simple.conf: ReadData: LINK RAACLARAS-Roteador-IGX, target: /var/www/cacti/rra/ra_-_xxxx_traffic_in_13.rrd on config line 196 had no valid data, according to WeatherMapDataSource_rrd
[...]
06/11/2010 08:34:18 AM - WEATHERMAP: Poller[0] [Map 2] map2.conf: Weathermap 0.95b run complete - 2 maps were run in 2 seconds
06/11/2010 08:35:03 AM - POLLER: Poller[0] NOTE: Poller Int: '60', Cron Int: '300', Time Since Last: '300', Max Runtime '298', Poller Runs: '5'
06/11/2010 08:35:03 AM - CMDPHP: Poller[0] ERROR: SQL Assoc Failed!, Error:'1017', SQL:"SELECT local_data_id, rrd_name FROM poller_output"
06/11/2010 08:35:03 AM - CMDPHP: Poller[0] ERROR: SQL Assoc Failed!, Error:'1017', SQL:"select  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"
06/11/2010 08:35:03 AM - CMDPHP: Poller[0] Host[20] NOTICE: HOST EVENT: Host Returned from DOWN State: 
06/11/2010 08:35:03 AM - CMDPHP: Poller[0] Host[20] DS[58] SNMP: v2: 172.20.0.161, dsname: traffic_out, oid: .1.3.6.1.2.1.2.2.1.16.1, output: 611088
[...]
Cacti Version - 0.8.7d
Plugin Architecture - 2.4
Poller Type - CMD.php
Server Info - Linux 2.6.18-6-686
Web Server - Apache/2.2.9 (Debian) PHP/5.2.6-1+lenny2 with Suhosin-Patch
PHP - 5.2.6-1+lenny2
PHP Extensions - zip, xmlwriter, libxml, xml, wddx, tokenizer, sysvshm, sysvsem, sysvmsg, session, SimpleXML, sockets, soap, SPL, shmop, standard, Reflection, posix, mime_magic, mbstring, json, iconv, hash, gettext, ftp, filter, exif, dom, dba, date, ctype, calendar, bz2, bcmath, zlib, pcre, openssl, xmlreader, apache2handler, gd, mcrypt, mysql, mysqli, PDO, pdo_mysql, snmp
MySQL - 5.0.51a-24
RRDTool - 1.3.1
SNMP - 5.4.1
Plugins
  • Thresholds (thold - v0.4.1)
    Device Monitoring (monitor - v0.8.2)
    Host Info (hostinfo - v0.2)
    PHP Network Weathermap (weathermap - v0.95b)
    Global Plugin Settings (settings - v0.5)
jotace
Last edited by jotac on Sun Jun 27, 2010 5:28 pm, edited 3 times in total.
User avatar
Howie
Cacti Guru User
Posts: 5508
Joined: Thu Sep 16, 2004 5:53 am
Location: United Kingdom
Contact:

Post by Howie »

Error 1017 is file not found from Mysql. Could be a corrupted file, too.

Check the Technical Support page in Cacti for bad tables.
Weathermap 0.98a is out! & QuickTree 1.0. Superlinks is over there now (and built-in to Cacti 1.x).
Some Other Cacti tweaks, including strip-graphs, icons and snmp/netflow stuff.
(Let me know if you have UK DevOps or Network Ops opportunities, too!)
jotac
Posts: 22
Joined: Thu Jun 10, 2010 9:42 pm

Post by jotac »

Page Technical Support? Outside the Forum?
Is it possible to recreate the database without changing any other setting?
User avatar
Howie
Cacti Guru User
Posts: 5508
Joined: Thu Sep 16, 2004 5:53 am
Location: United Kingdom
Contact:

Post by Howie »

jotac wrote:Page Technical Support? Outside the Forum?
Is it possible to recreate the database without changing any other setting?
In your Cacti. Down the bottom of the Console menu is a Utilities section. The first link in there. It will tell you which tables (if any) are damaged.
Weathermap 0.98a is out! & QuickTree 1.0. Superlinks is over there now (and built-in to Cacti 1.x).
Some Other Cacti tweaks, including strip-graphs, icons and snmp/netflow stuff.
(Let me know if you have UK DevOps or Network Ops opportunities, too!)
jotac
Posts: 22
Joined: Thu Jun 10, 2010 9:42 pm

Post by jotac »

hi,

Is there any time that does not work with Cacit, I will work with network inventory. But still giving a force for friends. I did what you said and in all lines CHECK STATUS is okay!
jotac
Posts: 22
Joined: Thu Jun 10, 2010 9:42 pm

Post by jotac »

I auditioned 'Turn on graph debug mode' and return 'RRDTool Says: OK, but the chart appears with NAN.
User avatar
gandalf
Developer
Posts: 22383
Joined: Thu Dec 02, 2004 2:46 am
Location: Muenster, Germany
Contact:

Post by gandalf »

Please copy the rrd code found on debug to a shell script, e.g. cacti-test.sh. Then run sh cacti-test.sh > /dev/null. Do you get any error message?
R.
jotac
Posts: 22
Joined: Thu Jun 10, 2010 9:42 pm

Post by jotac »

May be debug code in my initial post? Just to understand, create a file starting with # / bin / sh and pasted the debug captured below .. is it?

Result:

Code: Select all

cacti2:/var/www/cacti# sh cacti_debug.sh > /dev/null
cacti_debug.sh: line 2: 06/10/2010: Arquivo ou diretório não encontrado
cacti_debug.sh: line 3: 06/10/2010: Arquivo ou diretório não encontrado
cacti_debug.sh: line 5: 06/10/2010: Arquivo ou diretório não encontrado
cacti_debug.sh: line 5: /var/www/cacti/plugins/weathermap/output/f89071fc16045372786e.png: Permissão negada
cacti_debug.sh: line 6: unexpected EOF while looking for matching `''
cacti_debug.sh: line 40: syntax error: unexpected end of file
User avatar
gandalf
Developer
Posts: 22383
Joined: Thu Dec 02, 2004 2:46 am
Location: Muenster, Germany
Contact:

Post by gandalf »

No.
Please goto Graph Management. Select that Graph. Switch to DEBUG. Then, an "rrdtool graph" statement shows up.
R.
jotac
Posts: 22
Joined: Thu Jun 10, 2010 9:42 pm

Post by jotac »

The declaration of "rrdtool graph" appears only when I choose graphics individually, right? So I can only use the debug mode individual graphics. It is this information displayed?
User avatar
gandalf
Developer
Posts: 22383
Joined: Thu Dec 02, 2004 2:46 am
Location: Muenster, Germany
Contact:

Post by gandalf »

yes
jotac
Posts: 22
Joined: Thu Jun 10, 2010 9:42 pm

Post by jotac »

It took me a little nod was playing in Brazil!

I checked every file xxx.rrd captured after debugging average 5 minutes: total of 28 files and all data were invalid, but in test mode debug graphic appears RRDTool Command: ... RRD Tool Says: OK.
jotac
Posts: 22
Joined: Thu Jun 10, 2010 9:42 pm

Post by jotac »

I do not know why, but the table is corrupted POLLER_OUTPUT. I tried with REPAIR TABLE, but not solved the problem. Anyone have any ideas? Still unsolved problem: error 1017!
Attachments
repair_tabela.png
repair_tabela.png (2.58 KiB) Viewed 21077 times
jotac
Posts: 22
Joined: Thu Jun 10, 2010 9:42 pm

RESOLVIDO

Post by jotac »

RESOLVED. After finding that there was no solution because UPGRADE, REPAIR no avail since the table was corrupted and the log reported that he could not find the file ... then my problems are over! It is clear that no solution to the period without collecting data. Select the table and it then TRUNCADE REBUILD_POLLER_CACHE.php!
jotac
Posts: 22
Joined: Thu Jun 10, 2010 9:42 pm

Post by jotac »

To close the topic: is the partition where the database had more space and had no way of storing the data, then the table poller_output corrupted!
Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest