Welcome, Guest. Please login or register.

Author Topic: DBD::mysql::db do failed at line 1 at ./inc/libdb.pm line 1902  (Read 1758 times)

tristanbob

  • Full Member
  • ***
  • Posts: 159
    • View Profile
DBD::mysql::db do failed at line 1 at ./inc/libdb.pm line 1902
« on: January 13, 2015, 01:29:58 AM »
tristanrhodes@nedi:/opt/nedi$ ./nedi.pl -vpr

****** TRUNCATED OUTPUT *******

FWDC:000ffee62808 on Gi1/20     Vl999   1G-FD
FWDC:10604b70c201 on Gi1/26     Vl999   1G-FD
FWDC:d4ca6ddaeb5f on Gi2/32     Vl999   1G-FD
FWDC:00152cfa9f80 on Po51       Vl      2G--
FWDC:0 bridge forwarding entries found

Write Nodes ------------------------------------------------------------------
EVNT:MOD=F/1 L=100 CL=secn TGT=d-9-gw1 MSG=Node b0faeb8885ec appeared on Po3 Vl100
EVNT:MOD=F/1 L=100 CL=secn TGT=d-9-gw1 MSG=Node 7cad748993c0 appeared on Po3 Vl900
EVNT:MOD=F/1 L=100 CL=secn TGT=d-9-gw1 MSG=Node 7cad748986ff appeared on Po2 Vl900
EVNT:MOD=F/1 L=100 CL=secn TGT=d-9-gw1 MSG=Node 7cad74898480 appeared on Po5 Vl900
EVNT:MOD=F/1 L=100 CL=secn TGT=d-9-gw1 MSG=Node 4403a7a31d0e appeared on Gi1/21 Vl100
EVNT:MOD=F/1 L=100 CL=secn TGT=d-9-gw1 MSG=Node 34dbfd48f6c1 appeared on Po52 Vl900
EVNT:MOD=F/1 L=100 CL=secn TGT=d-9-gw1 MSG=Node b0faeb888ca0 appeared on Po4 Vl100
EVNT:MOD=F/1 L=100 CL=secn TGT=d-9-gw1 MSG=Node 4c4e35c733e8 appeared on Po1 Vl100
EVNT:MOD=F/1 L=100 CL=secn TGT=d-9-gw1 MSG=Node 7cad748993ff appeared on Po3 Vl900
EVNT:MOD=F/1 L=100 CL=secn TGT=d-9-gw1 MSG=Node 4c4e35c733a7 appeared on Po2 Vl900
EVNT:MOD=F/1 L=100 CL=secn TGT=d-9-gw1 MSG=Node 7cad74899340 appeared on Po4 Vl900
EVNT:MOD=F/1 L=100 CL=secn TGT=d-9-gw1 MSG=Node b0faeb888d41 appeared on Po4 Vl100
EVNT:MOD=F/1 L=100 CL=secn TGT=d-9-gw1 MSG=Node 7cad748986c0 appeared on Po2 Vl900
EVNT:MOD=F/1 L=100 CL=secn TGT=d-9-gw1 MSG=Node 7cad7418966d appeared on Po5 Vl900
EVNT:MOD=F/1 L=100 CL=secn TGT=d-9-gw1 MSG=Node 7cad748984bf appeared on Po5 Vl900
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 'ifchanges=2,metric='HHH',noduser='' WHERE mac='00152cfa9f80'' at line 1 at ./inc/libdb.pm line 1902.
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 'ifchanges=2,metric='HHH',noduser='' WHERE mac='00152cfa9f80'' at line 1 at ./inc/libdb.pm line 1902.
tristanrhodes@nedi:/opt/nedi$

Not sure what happened, but it might be related to us manually importing node information from an older version of Nedi.  This is the format we used (we left out a field called "metric" because it didn't match between versions):

INSERT INTO `nodes` (`mac`, `oui`, `firstseen`, `lastseen`, `device`, `ifname`, `vlanid`, `ifupdate`, `ifchanges`) VALUES
('000000000001', 'XEROX CORPORATION', 1389906901, 1392938101, 'te-dc-dellblade-sw1', 'Po1', 10, 1392938101, 1),
Please visit "Other"->"Invoices" on your NeDi installation to make an annual contribution and support Nedi!

rickli

  • Administrator
  • Hero Member
  • *****
  • Posts: 2780
    • View Profile
    • NeDi
Re: DBD::mysql::db do failed at line 1 at ./inc/libdb.pm line 1902
« Reply #1 on: January 13, 2015, 03:57:17 PM »
Is this with 1.4? If so, add -vdd (verbose, debug database) and check the exact query. I suspect an erratic quote...
Please consider Other-Invoices on your NeDi installation for an annual contribution, tx!
-Remo

tristanbob

  • Full Member
  • ***
  • Posts: 159
    • View Profile
Re: DBD::mysql::db do failed at line 1 at ./inc/libdb.pm line 1902
« Reply #2 on: January 13, 2015, 07:47:02 PM »
Yes, this was on Nedi 1.4.   

The good news is it only happened on the first discover.  I can't get it to repeat, but if it does I will gather the debug info you requested.

Cheers,

Tristan
Please visit "Other"->"Invoices" on your NeDi installation to make an annual contribution and support Nedi!