spine ERROR: SQL Failed! Error:'1264'

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

Moderators: Developers, Moderators

Post Reply
malik
Posts: 11
Joined: Fri Oct 21, 2005 7:40 am

spine ERROR: SQL Failed! Error:'1264'

Post by malik »

just upgraded from debian etch to lenny and cacti upgrades from 0.8.6i to 0.8.7a, and cacti-spine appears to be default poller. All my already existing routers works ok, but now i added 2 new cisco routers, and poller shows for them:

Code: Select all

$ php /usr/share/cacti/site/poller.php --force -d
03/18/2009 09:48:13 AM - SPINE: Poller[0] ERROR: SQL Failed! Error:'1264', Message:'Out of range value adjusted for column 'availability' at row 1', SQL Fragment:'UPDATE host SET status='3', status_event_count='0', status_fail_date='0000-00-00 00:00:00', status_rec_date='0000-00-00 00:00:00', status_last_error='', min_time='9.909150', max_time='9.909150', cur_time='9.909150', avg_time='9.909150', total_polls='1', failed_polls='0', availability='100.0000' WHERE id='56''
I do following changes (just to identify problem) and error has gone:

Code: Select all

--- a/poller.c 2009-01-21 18:49:53.000000000 +0200
+++ b/poller.c      2009-03-18 09:51:04.000000000 +0200
@@ -413,7 +413,7 @@
                                        host->avg_time,
                                        host->total_polls,
                                        host->failed_polls,
-                                       host->availability,
+                                       host->availability-1,
                                        host->id);
What is the correct fix for that?
mcutting
Cacti Guru User
Posts: 1884
Joined: Mon Oct 16, 2006 5:57 am
Location: United Kingdom
Contact:

Post by mcutting »

The problem with packages is that they don't always work properly (as I found out myself). I had a similar issue, and compiled SPINE 0.8.7c from source, which resolved the issue.
Cacti Version 0.8.8b
Cacti OS Ubuntu LTS
RRDTool Version RRDTool 1.4.7
Poller Information
Type SPINE 0.8.8b
malik
Posts: 11
Joined: Fri Oct 21, 2005 7:40 am

Post by malik »

I forgot to mention that i did all this with cacti-spine-0.8.7c.
And i do not notice any changes in `host` table from cacti-0.8.7b -> 0.8.7c (looked at install/_8_7b_to_0_8_7c.php and install/0_8_7c_to_0_8_7d.php)
Last edited by malik on Wed Mar 18, 2009 6:34 am, edited 3 times in total.
mcutting
Cacti Guru User
Posts: 1884
Joined: Mon Oct 16, 2006 5:57 am
Location: United Kingdom
Contact:

Post by mcutting »

malik wrote:I forgot to mention that i did all this with cacti-spine-0.8.7c
Ok, but was this from a package, or from source ?
Cacti Version 0.8.8b
Cacti OS Ubuntu LTS
RRDTool Version RRDTool 1.4.7
Poller Information
Type SPINE 0.8.8b
malik
Posts: 11
Joined: Fri Oct 21, 2005 7:40 am

Post by malik »

mcutting wrote:Ok, but was this from a package, or from source ?
I built deb package myself from sources downloaded today from cacti site (cacti-spine-0.8.7c.tar.gz).
User avatar
TheWitness
Developer
Posts: 17007
Joined: Tue May 14, 2002 5:08 pm
Location: MI, USA
Contact:

Post by 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?
malik
Posts: 11
Joined: Fri Oct 21, 2005 7:40 am

Post by malik »

TheWitness wrote:Try this version.

Code: Select all

spine-0.8.7d-pre# ./configure 
configure: error: cannot run /bin/sh config/config.sub
spine-0.8.7d-pre# /bin/sh config/config.sub
link: missing operand after `/usr/share/libtool/config.sub'
Try`link --help' for more information.
User avatar
TheWitness
Developer
Posts: 17007
Joined: Tue May 14, 2002 5:08 pm
Location: MI, USA
Contact:

Post by TheWitness »

Did you run the bootstrap script? You may also ahve to run the following "libtoolize --force" to make it work. Sorry about that. I posted from a Windows machine that does not play well in the Linux/UNIX space.

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?
malik
Posts: 11
Joined: Fri Oct 21, 2005 7:40 am

Post by malik »

Code: Select all

# ./bootstrap 
.....
source='sql.c' object='sql.o' libtool=no \
        DEPDIR=.deps depmode=none /bin/sh ./config/depcomp \
        gcc -DHAVE_CONFIG_H -I. -I./config     -I/usr/include/net-snmp -I/usr/include/net-snmp/.. -I/usr/include/mysql -g -O2 -c sql.c
: command not foundine 2: 
: command not foundine 5: 
: command not foundine 10: 
: command not foundine 15: 
: command not foundine 20: 
: command not foundine 25: 
: command not foundine 27: 
'/config/depcomp: line 64: syntax error near unexpected token `in
'/config/depcomp: line 64: `case "$depmode" in
make: *** [sql.o] Error 2
I attached bootstrap output and config.log
Attachments
bootstrap_output.txt
(10.37 KiB) Downloaded 85 times
config_log.txt
(53.59 KiB) Downloaded 96 times
User avatar
TheWitness
Developer
Posts: 17007
Joined: Tue May 14, 2002 5:08 pm
Location: MI, USA
Contact:

Post by TheWitness »

Fing dos2unix. I hate windows

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?
mcutting
Cacti Guru User
Posts: 1884
Joined: Mon Oct 16, 2006 5:57 am
Location: United Kingdom
Contact:

Post by mcutting »

TheWitness wrote:Fing dos2unix. I hate windows

TheWitness
HAHAHA !! :):)

Same error for me under Ubuntu

http://forums.cacti.net/viewtopic.php?t ... c&start=15
Cacti Version 0.8.8b
Cacti OS Ubuntu LTS
RRDTool Version RRDTool 1.4.7
Poller Information
Type SPINE 0.8.8b
mcutting
Cacti Guru User
Posts: 1884
Joined: Mon Oct 16, 2006 5:57 am
Location: United Kingdom
Contact:

Post by mcutting »

TheWitness wrote:Fing dos2unix. I hate windows

TheWitness
I got this to compile - see http://forums.cacti.net/viewtopic.php?t ... c&start=15
Cacti Version 0.8.8b
Cacti OS Ubuntu LTS
RRDTool Version RRDTool 1.4.7
Poller Information
Type SPINE 0.8.8b
malik
Posts: 11
Joined: Fri Oct 21, 2005 7:40 am

Post by malik »

mcutting wrote:I got this to compile - see http://forums.cacti.net/viewtopic.php?t ... c&start=15
Thanks. It was compiled this way.
However after changing poller to this compiled one, I still have errors for routers which has a 100% availability.

Code: Select all

$ php /usr/share/cacti/site/poller.php --force -d
03/19/2009 10:17:39 PM - SPINE: Poller[0] ERROR: SQL Failed! Error:'1264', Message:'Out of range value adjusted for column 'availability' at row 1', SQL Fragment:'UPDATE host SET status='3', status_event_count='0', status_fail_date='0000-00-00 00:00:00', status_rec_date='0000-00-00 00:00:00', status_last_error='', min_time='0.000000', max_time='150.377990', cur_time='9.478090', avg_time='11.225872', total_polls='446', failed_polls='0', availability='100.0000' WHERE id='56''
03/19/2009 10:17:39 PM - SPINE: Poller[0] ERROR: SQL Failed! Error:'1264', Message:'Out of range value adjusted for column 'availability' at row 1', SQL Fragment:'UPDATE host SET status='3', status_event_count='0', status_fail_date='0000-00-00 00:00:00', status_rec_date='0000-00-00 00:00:00', status_last_error='', min_time='0.000000', max_time='72.366950', cur_time='12.585880', avg_time='13.383637', total_polls='446', failed_polls='0', availability='100.0000' WHERE id='57''
03/19/2009 10:17:39 PM - SPINE: Poller[0] ERROR: SQL Failed! Error:'1264', Message:'Out of range value adjusted for column 'availability' at row 1', SQL Fragment:'UPDATE host SET status='3', status_event_count='0', status_fail_date='0000-00-00 00:00:00', status_rec_date='0000-00-00 00:00:00', status_last_error='', min_time='6.397960', max_time='160.847900', cur_time='6.660940', avg_time='8.771532', total_polls='440', failed_polls='0', availability='100.0000' WHERE id='58''
OK u:0.01 s:0.00 r:1.34
OK u:0.01 s:0.00 r:1.34
...
OK u:0.01 s:0.02 r:1.37
03/19/2009 10:17:40 PM - SYSTEM STATS: Time:1.5266 Method:spine Processes:1 Threads:1 Hosts:9 HostsPerProcess:9 DataSources:247 RRDsProcessed:152
User avatar
TheWitness
Developer
Posts: 17007
Joined: Tue May 14, 2002 5:08 pm
Location: MI, USA
Contact:

Post by TheWitness »

That is a Cacti error and does not affect system performance. You likely missed something in a prior upgrade. Post the following:

Code: Select all

mysql cacti
> describe host;
> quit;

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?
malik
Posts: 11
Joined: Fri Oct 21, 2005 7:40 am

Post by malik »

I has `availability` as decimal(7,5), after changing it to decimal(8,5) as in latest cacti.sql everything works ok.
Thanks.
Post Reply

Who is online

Users browsing this forum: No registered users and 3 guests