MACTrack - SQL DB Exec Failed Error 1292

Support questions about the MAC Track plugin

Moderators: Developers, Moderators

Post Reply
amigaholic
Posts: 3
Joined: Wed Apr 17, 2013 10:54 am

MACTrack - SQL DB Exec Failed Error 1292

Post by amigaholic »

Hello!

Long-time Cacti user and fan, but I'm just trying out MACTrack for the first time and am having some problems.

I got the plugin installed OK (Cacti 0.8.8a, Spine 0.8.8a, MySQL 5.6, Apache 2.2.22 (Win32), PHP 5.2.17, and MACTrack 2.9.1, running on a Windows 2008 R2 Server (x64)).

I've added in all the routers, switches, and access points from the main Cacti database, and that copied across OK. I've added in all our sites, and set each of our devices to their correct sites.

And now I've added in a couple of device types - one for a C1841 router and one for an Aironet 1240-series access point, both in our Dubai office - and told MACTrack to fetch the ARP Table and MAC Address Table from the devices in Dubai.

The command seemed to run OK, but the system reported 2 device errors in the table, rather than the MAC addresses and IP addresses I would have expected to have seen. So I checked the Cacti System Log and this is what I found:
Cacti Error Log wrote:04/17/2013 04:31:52 PM - CMDPHP: Poller[0] ERROR: A DB Exec Failed!, Error:'1292', SQL:"UPDATE mac_track_temp_ports INNER JOIN mac_track_ips ON (mac_track_temp_ports.mac_address=mac_track_ips.mac_address AND mac_track_temp_ports.site_id=mac_track_ips.site_id) SET mac_track_temp_ports.ip_address=mac_track_ips.ip_address WHERE mac_track_temp_ports.updated=0 AND mac_track_ips.scan_date='''
04/17/2013 04:31:48 PM - CMDPHP: Poller[0] ERROR: A DB Exec Failed!, Error:'1264', SQL:"UPDATE mac_track_devices SET ports_total='1',device_type_id='4',scan_type = '1',vlans_total='-3',ports_active='0',ports_trunk='0',macs_active='0',snmp_version='1',snmp_readstring='***removed***',snmp_port='161',snmp_timeout='500',snmp_retries='3',max_oids='20',snmp_username='',snmp_password='',snmp_auth_protocol='MD5',snmp_priv_passphrase='',snmp_priv_protocol='DES',snmp_context='',snmp_sysName='DUBAP01',snmp_sysLocation='',snmp_sysContact='',snmp_sysObjectID='.1.3.6.1.4.1.9.1.685',snmp_sysDescr='Cisco IOS Software, C1240 Software (C1240-K9W7-M), Version 12.4(21a)JA1, RELEASE SOFTWARE (fc1)..Technical Support: http://www.cisco.com/techsupport..Copyright (c) 1986-2009 by Cisco Systems, Inc...Compiled Wed 16-Sep-09 19:06 by prod_rel_team',snmp_sysUptime='136989683',snmp_status='3',last_runmessage='Data collection completed ok. No active end devices on this device.',last_rundate='',last_runduration='28.0678' WHERE device_id ='28''
04/17/2013 04:31:48 PM - CMDPHP: Poller[0] ERROR: A DB Exec Failed!, Error:'1364', SQL:"INSERT INTO mac_track_interfaces (site_id, device_id, sysUptime, ifIndex, ifType, ifName, ifAlias, linkPort, vlan_id, vlan_name, vlan_trunk_status, ifSpeed, ifHighSpeed, ifDuplex, ifDescr, ifMtu, ifPhysAddress, ifAdminStatus, ifOperStatus, ifLastChange, ifInOctets, ifOutOctets, ifHCInOctets, ifHCOutOctets, ifInNUcastPkts, ifOutNUcastPkts, ifInUcastPkts, ifOutUcastPkts, ifInDiscards, ifInErrors, ifInUnknownProtos, ifOutDiscards, ifOutErrors, int_ifInOctets, int_ifOutOctets, int_ifHCInOctets, int_ifHCOutOctets, int_ifInNUcastPkts, int_ifOutNUcastPkts, int_ifInUcastPkts, int_ifOutUcastPkts, int_ifInDiscards, int_ifInErrors, int_ifInUnknownProtos, int_ifOutDiscards, int_ifOutErrors, int_discards_present, int_errors_present, last_down_time, last_up_time, stateChanges, present) VALUES ('9', '28', '136989683', '1', '71', 'Do0', '', '', '', '', '', '54000000', '54', '1', 'Dot11Radio0', '1500', '00:3A:9A:D5:68:40', '1', '1', '4730', '100785836', '555843523', '100785836', '555843523', '19165', '487082', '934305', '513070', '0', '0', '0', '57195', '159', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '', '', '0', '2013-04-17 16:31:48', '0', '1'),('9', '28', '136989683', '2', '6', 'Fa0', '', '', '', '', '', '100000000', '100', '3', 'FastEthernet0', '1500', 'AC:F2:C5:EA:9D:18', '1', '1', '1061', '667426955', '86681856', '667426955', '86681856', '1912089', '51331', '705147', '675338', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '', '', '0', '2013-04-17 16:31:48', '0', '1'),('9', '28', '136989683', '3', '1', 'Nu0', '', '', '', '', '', '4294967295', '10000', '', 'Null0', '1500', 'NOT USER', '1', '1', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '', '', '0', '2013-04-17 16:31:48', '0', '1'),('9', '28', '136989683', '4', '209', 'BV1', '', '1', '', '', '', '54000000', '54', '', 'BVI1', '1500', 'AC:F2:C5:EA:9D:18', '1', '1', '1140', '38445409', '4914850', '38445409', '4914850', '0', '0', '458775', '50886', '0', '0', '126', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '', '', '0', '2013-04-17 16:31:48', '0', '1'),('9', '28', '136989683', '5', '135', 'Do0.510', '', '', '', '', '', '54000000', '54', '', 'Dot11Radio0.510', '1500', '00:3A:9A:D5:68:40', '1', '1', '4630', '62927314', '565270815', '62927314', '565270815', '', '', '488400', '503346', '', '', '', '', '', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '', '', '0', '2013-04-17 16:31:48', '0', '1'),('9', '28', '136989683', '6', '135', 'Fa0.510', '', '', '', '', '', '100000000', '100', '', 'FastEthernet0.510', '1500', 'AC:F2:C5:EA:9D:18', '1', '1', '1038', '620960619', '61458268', '620960619', '61458268', '', '', '705155', '481552', '', '', '', '', '', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '', '', '0', '2013-04-17 16:31:48', '0', '1') ON DUPLICATE KEY UPDATE sysUptime=VALUES(sysUptime), ifType=VALUES(ifType), ifName=VALUES(ifName), ifAlias=VALUES(ifAlias), linkPort=VALUES(linkPort), vlan_id=VALUES(vlan_id), vlan_name=VALUES(vlan_name), vlan_trunk_status=VALUES(vlan_trunk_status), ifSpeed=VALUES(ifSpeed), ifHighSpeed=VALUES(ifHighSpeed), ifDuplex=VALUES(ifDuplex), ifDescr=VALUES(ifDescr), ifMtu=VALUES(ifMtu), ifPhysAddress=VALUES(ifPhysAddress), ifAdminStatus=VALUES(ifAdminStatus), ifOperStatus=VALUES(ifOperStatus), ifLastChange=VALUES(ifLastChange), ifInOctets=VALUES(ifInOctets), ifOutOctets=VALUES(ifOutOctets), ifHCInOctets=VALUES(ifHCInOctets), ifHCOutOctets=VALUES(ifHCOutOctets), ifInNUcastPkts=VALUES(ifInNUcastPkts), ifOutNUcastPkts=VALUES(ifOutNUcastPkts), ifInUcastPkts=VALUES(ifInUcastPkts), ifOutUcastPkts=VALUES(ifOutUcastPkts), ifInDiscards=VALUES(ifInDiscards), ifInErrors=VALUES(ifInErrors), ifInUnknownProtos=VALUES(ifInUnknownProtos), ifOutDiscards=VALUES(ifOutDiscards), ifOutErrors=VALUES(ifOutErrors), int_ifInOctets=VALUES(int_ifInOctets), int_ifOutOctets=VALUES(int_ifOutOctets), int_ifHCInOctets=VALUES(int_ifHCInOctets), int_ifHCOutOctets=VALUES(int_ifHCOutOctets), int_ifInNUcastPkts=VALUES(int_ifInNUcastPkts), int_ifOutNUcastPkts=VALUES(int_ifOutNUcastPkts), int_ifInUcastPkts=VALUES(int_ifInUcastPkts), int_ifOutUcastPkts=VALUES(int_ifOutUcastPkts), int_ifInDiscards=VALUES(int_ifInDiscards), int_ifInErrors=VALUES(int_ifInErrors), int_ifInUnknownProtos=VALUES(int_ifInUnknownProtos), int_ifOutDiscards=VALUES(int_ifOutDiscards), int_ifOutErrors=VALUES(int_ifOutErrors), int_discards_present=VALUES(int_discards_present), int_errors_present=VALUES(int_errors_present), last_down_time=VALUES(last_down_time), last_up_time=VALUES(last_up_time), stateChanges=VALUES(stateChanges), present='1''
04/17/2013 04:31:34 PM - CMDPHP: Poller[0] ERROR: A DB Exec Failed!, Error:'1406', SQL:"UPDATE mac_track_devices SET ports_total='0',device_type_id='3',scan_type = '3',vlans_total='0',ports_active='0',ports_trunk='0',macs_active='0',snmp_version='1',snmp_readstring='***removed***',snmp_port='161',snmp_timeout='500',snmp_retries='3',max_oids='10',snmp_username='',snmp_password='',snmp_auth_protocol='MD5',snmp_priv_passphrase='',snmp_priv_protocol='DES',snmp_context='',snmp_sysName='DUBRT01',snmp_sysLocation='',snmp_sysContact='',snmp_sysObjectID='.1.3.6.1.4.1.9.1.620',snmp_sysDescr='Cisco IOS Software, 1841 Software (C1841-ADVSECURITYK9-M), Version 15.0(1)M4, RELEASE SOFTWARE (fc1)..Technical Support: http://www.cisco.com/techsupport..Copyright (c) 1986-2010 by Cisco Systems, Inc...Compiled Thu 28-Oct-10 15:44 by prod_rel_team',snmp_sysUptime='201231698',snmp_status='3',last_runmessage='',last_rundate='',last_runduration='14.028' WHERE device_id ='29''
04/17/2013 04:31:34 PM - CMDPHP: Poller[0] ERROR: A DB Exec Failed!, Error:'1292', SQL:"REPLACE INTO mac_track_ips (site_id,device_id,hostname,device_name,port_number,mac_address,ip_address,scan_date) VALUES ('9','29','172.16.5.254','DUBRT01','8','44:E4:D9:91:87:01','172.16.52.254','')'
04/17/2013 04:31:34 PM - CMDPHP: Poller[0] ERROR: A DB Exec Failed!, Error:'1292', SQL:"REPLACE INTO mac_track_ips (site_id,device_id,hostname,device_name,port_number,mac_address,ip_address,scan_date) VALUES ('9','29','172.16.5.254','DUBRT01','8','1C:17:D3:C2:A7:81','172.16.52.13','')'
04/17/2013 04:31:34 PM - CMDPHP: Poller[0] ERROR: A DB Exec Failed!, Error:'1292', SQL:"REPLACE INTO mac_track_ips (site_id,device_id,hostname,device_name,port_number,mac_address,ip_address,scan_date) VALUES ('9','29','172.16.5.254','DUBRT01','8','00:1F:6C:80:51:4D','172.16.52.12','')'
04/17/2013 04:31:34 PM - CMDPHP: Poller[0] ERROR: A DB Exec Failed!, Error:'1292', SQL:"REPLACE INTO mac_track_ips (site_id,device_id,hostname,device_name,port_number,mac_address,ip_address,scan_date) VALUES ('9','29','172.16.5.254','DUBRT01','8','00:1E:F7:C4:C0:B3','172.16.52.10','')'
04/17/2013 04:31:34 PM - CMDPHP: Poller[0] ERROR: A DB Exec Failed!, Error:'1292', SQL:"REPLACE INTO mac_track_ips (site_id,device_id,hostname,device_name,port_number,mac_address,ip_address,scan_date) VALUES ('9','29','172.16.5.254','DUBRT01','8','00:1F:CA:EA:2D:23','172.16.52.8','')'
04/17/2013 04:31:34 PM - CMDPHP: Poller[0] ERROR: A DB Exec Failed!, Error:'1292', SQL:"REPLACE INTO mac_track_ips (site_id,device_id,hostname,device_name,port_number,mac_address,ip_address,scan_date) VALUES ('9','29','172.16.5.254','DUBRT01','8','00:1E:7A:27:0D:D4','172.16.52.6','')'
04/17/2013 04:31:34 PM - CMDPHP: Poller[0] ERROR: A DB Exec Failed!, Error:'1292', SQL:"REPLACE INTO mac_track_ips (site_id,device_id,hostname,device_name,port_number,mac_address,ip_address,scan_date) VALUES ('9','29','172.16.5.254','DUBRT01','7','44:E4:D9:91:87:01','172.16.51.254','')'
04/17/2013 04:31:34 PM - CMDPHP: Poller[0] ERROR: A DB Exec Failed!, Error:'1292', SQL:"REPLACE INTO mac_track_ips (site_id,device_id,hostname,device_name,port_number,mac_address,ip_address,scan_date) VALUES ('9','29','172.16.5.254','DUBRT01','7','AC:F2:C5:EA:9D:18','172.16.51.230','')'
04/17/2013 04:31:34 PM - CMDPHP: Poller[0] ERROR: A DB Exec Failed!, Error:'1292', SQL:"REPLACE INTO mac_track_ips (site_id,device_id,hostname,device_name,port_number,mac_address,ip_address,scan_date) VALUES ('9','29','172.16.5.254','DUBRT01','7','00:50:60:0C:A5:42','172.16.51.225','')'
04/17/2013 04:31:34 PM - CMDPHP: Poller[0] ERROR: A DB Exec Failed!, Error:'1292', SQL:"REPLACE INTO mac_track_ips (site_id,device_id,hostname,device_name,port_number,mac_address,ip_address,scan_date) VALUES ('9','29','172.16.5.254','DUBRT01','7','14:FE:B5:CB:EE:2F','172.16.51.202','')'
04/17/2013 04:31:34 PM - CMDPHP: Poller[0] ERROR: A DB Exec Failed!, Error:'1292', SQL:"REPLACE INTO mac_track_ips (site_id,device_id,hostname,device_name,port_number,mac_address,ip_address,scan_date) VALUES ('9','29','172.16.5.254','DUBRT01','7','14:FE:B5:CB:EE:2F','172.16.51.200','')'
04/17/2013 04:31:34 PM - CMDPHP: Poller[0] ERROR: A DB Exec Failed!, Error:'1292', SQL:"REPLACE INTO mac_track_ips (site_id,device_id,hostname,device_name,port_number,mac_address,ip_address,scan_date) VALUES ('9','29','172.16.5.254','DUBRT01','7','D4:BE:D9:02:2E:4B','172.16.51.39','')'
04/17/2013 04:31:34 PM - CMDPHP: Poller[0] ERROR: A DB Exec Failed!, Error:'1292', SQL:"REPLACE INTO mac_track_ips (site_id,device_id,hostname,device_name,port_number,mac_address,ip_address,scan_date) VALUES ('9','29','172.16.5.254','DUBRT01','7','39:20:20:20:2e:','172.16.51.37','')'
04/17/2013 04:31:34 PM - CMDPHP: Poller[0] ERROR: A DB Exec Failed!, Error:'1292', SQL:"REPLACE INTO mac_track_ips (site_id,device_id,hostname,device_name,port_number,mac_address,ip_address,scan_date) VALUES ('9','29','172.16.5.254','DUBRT01','7','D4:BE:D9:02:22:F3','172.16.51.36','')'
04/17/2013 04:31:34 PM - CMDPHP: Poller[0] ERROR: A DB Exec Failed!, Error:'1292', SQL:"REPLACE INTO mac_track_ips (site_id,device_id,hostname,device_name,port_number,mac_address,ip_address,scan_date) VALUES ('9','29','172.16.5.254','DUBRT01','7','2e:5b:','172.16.51.35','')'
04/17/2013 04:31:34 PM - CMDPHP: Poller[0] ERROR: A DB Exec Failed!, Error:'1292', SQL:"REPLACE INTO mac_track_ips (site_id,device_id,hostname,device_name,port_number,mac_address,ip_address,scan_date) VALUES ('9','29','172.16.5.254','DUBRT01','7','14:FE:B5:CB:EE:2F','172.16.51.10','')'
04/17/2013 04:31:34 PM - CMDPHP: Poller[0] ERROR: A DB Exec Failed!, Error:'1292', SQL:"REPLACE INTO mac_track_ips (site_id,device_id,hostname,device_name,port_number,mac_address,ip_address,scan_date) VALUES ('9','29','172.16.5.254','DUBRT01','7','00:15:99:90:83:08','172.16.51.7','')'
04/17/2013 04:31:34 PM - CMDPHP: Poller[0] ERROR: A DB Exec Failed!, Error:'1292', SQL:"REPLACE INTO mac_track_ips (site_id,device_id,hostname,device_name,port_number,mac_address,ip_address,scan_date) VALUES ('9','29','172.16.5.254','DUBRT01','7','14:FE:B5:CB:EE:2B','172.16.51.5','')'
04/17/2013 04:31:34 PM - CMDPHP: Poller[0] ERROR: A DB Exec Failed!, Error:'1292', SQL:"REPLACE INTO mac_track_ips (site_id,device_id,hostname,device_name,port_number,mac_address,ip_address,scan_date) VALUES ('9','29','172.16.5.254','DUBRT01','7','2c:76:20:20:62:53:','172.16.51.4','')'
04/17/2013 04:31:34 PM - CMDPHP: Poller[0] ERROR: A DB Exec Failed!, Error:'1292', SQL:"REPLACE INTO mac_track_ips (site_id,device_id,hostname,device_name,port_number,mac_address,ip_address,scan_date) VALUES ('9','29','172.16.5.254','DUBRT01','6','44:E4:D9:91:87:01','172.16.5.254','')'
04/17/2013 04:31:34 PM - CMDPHP: Poller[0] ERROR: A DB Exec Failed!, Error:'1292', SQL:"REPLACE INTO mac_track_ips (site_id,device_id,hostname,device_name,port_number,mac_address,ip_address,scan_date) VALUES ('9','29','172.16.5.254','DUBRT01','6','08:1F:F3:3A:53:C0','172.16.5.10','')'
04/17/2013 04:31:34 PM - CMDPHP: Poller[0] ERROR: A DB Exec Failed!, Error:'1292', SQL:"REPLACE INTO mac_track_ips (site_id,device_id,hostname,device_name,port_number,mac_address,ip_address,scan_date) VALUES ('9','29','172.16.5.254','DUBRT01','1','44:E4:D9:91:87:00','94.200.190.30','')'
04/17/2013 04:31:34 PM - CMDPHP: Poller[0] ERROR: A DB Exec Failed!, Error:'1292', SQL:"REPLACE INTO mac_track_ips (site_id,device_id,hostname,device_name,port_number,mac_address,ip_address,scan_date) VALUES ('9','29','172.16.5.254','DUBRT01','1','00:23:33:24:F6:FF','94.200.190.29','')'
Now it looks to me like MACTrack has done its job properly and pulled the information from our equipment - however, it looks like it's had problems inserting that data into a database. I am not particularly au fait with MySQL; I only really know enough about it to get Cacti up and running.

Can anyone help me figure out how to make sense of the errors above and get MACTrack to work?

Kind regards
Graeme
amigaholic
Posts: 3
Joined: Wed Apr 17, 2013 10:54 am

Re: MACTrack - SQL DB Exec Failed Error 1292

Post by amigaholic »

Bad form to reply to onesself I know, but I've just found this post:

http://forums.cacti.net/viewtopic.php?p=225168#p225168

The steps Chris laid out seems to have resolved the problem I had with MACTrack. I'm still checking it out to ensure it's all working properly, but it's looking much, much better already.

Is this something that Cacti could do as part of the plugin installation?
Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest