Router Configs stopped working with error SQL Row Failed!

General discussion about Plugins for Cacti

Moderators: Moderators, Developers

Post Reply
Author
Message
User avatar
mmartens
Cacti User
Posts: 110
Joined: Tue May 24, 2005 6:23 pm

Router Configs stopped working with error SQL Row Failed!

#1 Post by mmartens » Fri Jan 24, 2014 10:25 am

Hi,

First the backup with the Router Configs plugin performed good then it suddenly stopped.
I get the following error in the log:
CMDPHP: Poller[0] ERROR: SQL Row Failed!, Error:'1064', SQL:"SELECT * FROM plugin_routerconfigs_backups WHERE id = "

Any idea?
Thanks in advance

User avatar
mmartens
Cacti User
Posts: 110
Joined: Tue May 24, 2005 6:23 pm

Re: Router Configs stopped working with error SQL Row Failed

#2 Post by mmartens » Fri Jan 31, 2014 2:09 am

Does anyone have any idea?

Thanks in advance.

expo
Posts: 15
Joined: Mon Feb 06, 2012 10:08 pm

Re: Router Configs stopped working with error SQL Row Failed

#3 Post by expo » Mon Feb 17, 2014 5:25 am

I am also having an almost similar problem with router configs. this started when my machine restarted. the tftp server and the one written in cacti had a different path. when I changed the path of the tftp server to the right one, I received an error message

CMDPHP: Poller[0] ERROR: A DB Exec Failed!, Error:'1064', SQL:"INSERT INTO plugin_routerconfigs_backups (device, btime, directory, filename, config, lastchange, username)

I am using
Cacti Version 0.8.7i
Cacti OS win32
SNMP Version NET-SNMP version: 5.6.1.1
RRDTool Version RRDTool 1.4.x
PHP Version 5.3.8
PHP OS WINNT

I've been working on this for 2 days now and still cannot make it work

expo
Posts: 15
Joined: Mon Feb 06, 2012 10:08 pm

Re: Router Configs stopped working with error SQL Row Failed

#4 Post by expo » Tue Feb 18, 2014 8:10 pm

i've read from a different forum that importing the sql file found in the routerconfigs folder will solve the issue. sorry for the question but how will you import the sql file? where do you import it? thank you.

expo
Posts: 15
Joined: Mon Feb 06, 2012 10:08 pm

Re: Router Configs stopped working with error SQL Row Failed

#5 Post by expo » Tue Feb 18, 2014 8:51 pm

I found this link http://forums.cacti.net/viewtopic.php?f=14&t=36543 where you need to import the sql file. you also need to make changes in the sql. i have tried it today and will see tom if nightly backup has been done.

User avatar
mmartens
Cacti User
Posts: 110
Joined: Tue May 24, 2005 6:23 pm

Re: Router Configs stopped working with error SQL Row Failed

#6 Post by mmartens » Wed Feb 19, 2014 4:09 am

Ok thanks for the feedback.
Please let us know if it worked so we/I can use it as well?

expo
Posts: 15
Joined: Mon Feb 06, 2012 10:08 pm

Re: Router Configs stopped working with error SQL Row Failed

#7 Post by expo » Wed Feb 19, 2014 7:37 pm

i regret to inform you that auto backup is unsuccessful. what happens now, the backup file is missing from the path i have specified to be saved. you can view the config using the view config link. same error is still seen at the cacti log file.

User avatar
phalek
Cacti Guru User
Posts: 2739
Joined: Thu Jan 31, 2008 6:39 am
Location: Kressbronn, Germany
Contact:

Re: Router Configs stopped working with error SQL Row Failed

#8 Post by phalek » Thu Feb 20, 2014 2:25 am

expo wrote:I am also having an almost similar problem with router configs. this started when my machine restarted. the tftp server and the one written in cacti had a different path. when I changed the path of the tftp server to the right one, I received an error message

CMDPHP: Poller[0] ERROR: A DB Exec Failed!, Error:'1064', SQL:"INSERT INTO plugin_routerconfigs_backups (device, btime, directory, filename, config, lastchange, username)
...
You should get the complete SQL statement, go into a mysql cli and execute it. You will get a better error message then just "1064".

This may have multiple issues, but could simply be that the "id" column reached it's max, or it's trying to add a duplicate entry/id ...

Post the errror message you get here for further analysis.
Greetings,
Phalek
---
Need more help ? Read the Cacti documentation or my new Cacti 1.x Book
Need on-site support ? Look here Cacti Workshop
Need professional Cacti support ? Look here CereusService
---
Plugins : CereusTransporter | CereusReporting | nmidWebService | nmidSmokeping | nmidWeb2 |

Code: Select all

CereusServer Master:  SYSTEM STATS: Time:2.5621 Method:spine Processes:1 Threads:16 Hosts:446 HostsPerProcess:446 DataSources:14683 RRDsProcessed:7573
CereusServer Agent:   SYSTEM STATS: Time:27.4840 Method:spine Processes:1 Threads:8 Hosts:16 HostsPerProcess:16 DataSources:114576 RRDsProcessed:48061

User avatar
phalek
Cacti Guru User
Posts: 2739
Joined: Thu Jan 31, 2008 6:39 am
Location: Kressbronn, Germany
Contact:

Re: Router Configs stopped working with error SQL Row Failed

#9 Post by phalek » Thu Feb 20, 2014 2:28 am

mmartens wrote:Hi,

First the backup with the Router Configs plugin performed good then it suddenly stopped.
I get the following error in the log:
CMDPHP: Poller[0] ERROR: SQL Row Failed!, Error:'1064', SQL:"SELECT * FROM plugin_routerconfigs_backups WHERE id = "

Any idea?
Thanks in advance
Did it have any other error messages regarding SQL statements ? As noted before, it may be that the id column just got maxed out.
Greetings,
Phalek
---
Need more help ? Read the Cacti documentation or my new Cacti 1.x Book
Need on-site support ? Look here Cacti Workshop
Need professional Cacti support ? Look here CereusService
---
Plugins : CereusTransporter | CereusReporting | nmidWebService | nmidSmokeping | nmidWeb2 |

Code: Select all

CereusServer Master:  SYSTEM STATS: Time:2.5621 Method:spine Processes:1 Threads:16 Hosts:446 HostsPerProcess:446 DataSources:14683 RRDsProcessed:7573
CereusServer Agent:   SYSTEM STATS: Time:27.4840 Method:spine Processes:1 Threads:8 Hosts:16 HostsPerProcess:16 DataSources:114576 RRDsProcessed:48061

expo
Posts: 15
Joined: Mon Feb 06, 2012 10:08 pm

Re: Router Configs stopped working with error SQL Row Failed

#10 Post by expo » Thu Feb 20, 2014 5:32 am

thank you for your reply. i did go into mysql 5.5 cli.
what i did is :
mysql> use cacti

mysql> SELECT * FROM plugin_routerconfigs_devicetypes WHERE id = 0;

after that i received an error:
ERROR 1146 (42S02): Table 'cacti.plugin_routerconfigs_devicetypes' doesn't exist

then i checked the database by typing:

mysql> show tables;

then i saw that there is no "plugin_routerconfigs_devicetypes" table. i can only see

plugin_routerconfigs_accounts
plugin_routerconfigs_backups
plugin_routerconfigs_devices

then i opened the routerconfigs.sql and found that there is a command creating a plugin_routerconfigs_devicetypes which is:

CREATE TABLE plugin_routerconfigs_devicetypes (
id int(12) NOT NULL auto_increment,
`name` varchar(128) NOT NULL,
username varchar(64) NOT NULL default 'sername:',
`password` varchar(128) NOT NULL default 'assword:',
copytftp varchar(64) NOT NULL default 'copy tftp run',
version varchar(64) NOT NULL default 'show version',
confirm varchar(64) NOT NULL default '',
forceconfirm int(1) NOT NULL,
PRIMARY KEY (id)
) TYPE=MyISAM;

I noticed from the other created tables that their ending is "ENGINE=MyISAM;"
i changed the TYPE=MyISAM to ENGINE=MyISAM; and i paste the command in mysql:

mysql> CREATE TABLE plugin_routerconfigs_devicetypes (
-> id int(12) NOT NULL auto_increment,
-> `name` varchar(128) NOT NULL,
-> username varchar(64) NOT NULL default 'sername:',
-> `password` varchar(128) NOT NULL default 'assword:',
-> copytftp varchar(64) NOT NULL default 'copy tftp run',
-> version varchar(64) NOT NULL default 'show version',
-> confirm varchar(64) NOT NULL default '',
-> forceconfirm int(1) NOT NULL,
-> PRIMARY KEY (id)
-> ) ENGINE=MyISAM;

then the table was created. i tested to do a manual backup and a file appeared on my specified path. no errors in cacti log file.
however, there are no backups saved in cacti web interface. it is always 0. sorry if this is too detailed. i did this for others like me who do not know anything on sql. hope this makes it more easier. will give feedback if auto backup will work tom.

expo
Posts: 15
Joined: Mon Feb 06, 2012 10:08 pm

Re: Router Configs stopped working with error SQL Row Failed

#11 Post by expo » Thu Feb 20, 2014 9:52 pm

hi, i want to inform you that the cacti interface for router configs is still the same. there is still no backup that can be viewed in the backup page. however, there is a file in the specified path where backups should be placed. it did auto backup. i only tested with 1 router. i will add several routers more and will test if this will work. on the other hand, may i know what error should occur when the id has maxed out and how to solve it? i am thinking of placing more than 30 devices and i might encounter this error. thank you in advance and i will advise tom. if auto backup will occur on several devices.

expo
Posts: 15
Joined: Mon Feb 06, 2012 10:08 pm

Re: Router Configs stopped working with error SQL Row Failed

#12 Post by expo » Sat Feb 22, 2014 7:52 am

i regret to inform you that when i added 9 more devices, the auto backup is not working and is not saving any config in the specified path. the backup link in the cacti interface is now incrementing when i do manual backup. you can also view the config when you click on the backup. there is no longer error message in he cacti log file. any suggestion i can do to make this work? thank you

Post Reply