NeDi Community

NeDi Software Specific => Database => Topic started by: runats on November 13, 2013, 03:09:20 PM

Title: SQL syntax error during discovery - NeDiO8
Post by: runats on November 13, 2013, 03:09:20 PM
Hi,

I've been using NeDiO8 for a while now, and I have recently scheduled the following nedi run: /var/nedi/nedi.pl -vpN -A 'device regexp "^(F|H)|BET"'.

What I intend to do is to run nedi only for a subset of the existing devices in NeDi database. Everything is fine when it comes to connecting to the devices that already exist in the database. But when NeDi tries to connect to a newly discovered device (an AP in this particular case) I get the following error:

EVNT:CL=nedn EL=1 TGT=AP-xxxx MSG=No response from IP x.x.x.x using -A device regexp "^(F|H)|BET"
DBD::mysql::db do failed: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '"","nedn","")' at line 1 at /var/nedi/inc/libdb-msq.pm line 1127.
DBD::mysql::db do failed: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '"","nedn","")' at line 1 at /var/nedi/inc/libdb-msq.pm line 1127.

On the other hand, if I try to add that device manually I get the following:

ERR :No response from remote host "x.x.x.x"
EVNT:CL=nedn EL=1 TGT=x.x.x.x MSG=No response from IP x.x.x.x using -a x.x.x.x
DISC:ToDo/Done-Time                        0/0-13s
===============================================================================
Nothing discovered, nothing written...
END :Took 0 minutes


It's normal that NeDi cannot connect to the AP, as the proper credentials are not configured in NeDi, but I guess that syntax error shouldn't be there... Could you please help me figure out what's wrong?


Thanks for your help,

Natalia
Title: Re: SQL syntax error during discovery - NeDiO8
Post by: rickli on November 13, 2013, 08:29:30 PM
You're correct I didn't escape the '' properly. It's fixed in oh9. But are you sure that AP has SNMP enabled?
Title: Re: SQL syntax error during discovery - NeDiO8
Post by: runats on November 14, 2013, 08:40:17 AM
Could you please explain how to correct this in my system? I'd love to upgrade to oh9 but unfortunately I don't have the time right now...

Regarding the AP, I don't really know, as I don't manage this network directly (yet). NeDi is my main tool for getting to know this network, and with this error the discovery stops.

Thanks for your help,

Natalia
Title: Re: SQL syntax error during discovery - NeDiO8
Post by: rickli on November 16, 2013, 09:04:26 PM
Comment line 159 in libsnmp.pm...