MacTrack 2.6 failure,help!

Support questions about the MAC Track plugin

Moderators: Developers, Moderators

Post Reply
rogerxyz
Posts: 3
Joined: Thu Aug 12, 2010 10:39 pm

MacTrack 2.6 failure,help!

Post by rogerxyz »

I had success install cacti 0.8.7e + (PIA 2.6 for 0.8.7e) on ubuntu 10.04 LTS.
Everything works fine but mactrack don't work when adding device.
Error message from cacti log:
08/13/2010 11:53:48 AM - MACTRACK: Poller[0] ERROR: Cacti Device: (0/0): 192.168.99.241, error on save: a:26:{s:9:"device_id";s:1:"0";s:7:"host_id";s:1:"0";s:7:"site_id";s:1:"1";s:8:"hostname";s:14:"192.168.99.241";s:11:"device_name";s:10:"c3650-24-1";s:5:"notes";s:0:"";s:9:"scan_type";s:1:"1";s:12:"snmp_options";s:1:"0";s:15:"snmp_readstring";s:6:"public";s:12:"snmp_version";s:1:"1";s:13:"snmp_username";s:0:"";s:13:"snmp_password";s:0:"";s:18:"snmp_auth_protocol";s:3:"MD5";s:20:"snmp_priv_passphrase";s:0:"";s:18:"snmp_priv_protocol";s:3:"DES";s:12:"snmp_context";s:0:"";s:9:"snmp_port";s:3:"161";s:12:"snmp_timeout";s:3:"500";s:12:"snmp_retries";s:1:"3";s:8:"max_oids";s:3:"100";s:9:"user_name";s:0:"";s:13:"user_password";s:0:"";s:11:"ignorePorts";s:0:"";s:9:"term_type";s:1:"1";s:16:"private_key_path";s:0:"";s:8:"disabled";s:0:"";}
08/13/2010 11:51:47 AM - CMDPHP: Poller[0] ERROR: SQL Assoc Failed!, Error:'1054', SQL:"SELECT mac_track_device_types.description as device_type, mac_track_devices.site_id, mac_track_sites.site_name, mac_track_devices.device_id, mac_track_devices.host_id, mac_track_devices.device_name, mac_track_devices.notes, mac_track_devices.hostname, mac_track_devices.snmp_options, mac_track_devices.snmp_readstring, mac_track_devices.snmp_version, mac_track_devices.snmp_username, mac_track_devices.snmp_password, mac_track_devices.snmp_auth_protocol, mac_track_devices.snmp_priv_passphrase, mac_track_devices.snmp_priv_protocol, mac_track_devices.snmp_context, mac_track_devices.snmp_port, mac_track_devices.snmp_timeout, mac_track_devices.snmp_retries, mac_track_devices.max_oids, mac_track_devices.snmp_status, mac_track_devices.ignorePorts, mac_track_devices.disabled, mac_track_devices.scan_type, mac_track_devices.ips_total, mac_track_devices.ports_total, mac_track_devices.ports_active, mac_track_devices.ports_trunk, mac_track_devices.macs_active, mac_track_devices.last_rundate, mac_track_devices.last_runmessage, mac_track_devices.last_runduration FROM mac_track_sites RIGHT JOIN mac_track_devices ON mac_track_devices.site_id = mac_track_sites.site_id LEFT JOIN mac_track_device_types ON mac_track_devices.device_type_id=mac_track_device_types.device_type_id ORDER BY site_name ASC"
08/13/2010 11:51:42 AM - CMDPHP: Poller[0] ERROR: SQL Assoc Failed!, Error:'1054', SQL:"SELECT mac_track_device_types.description as device_type, mac_track_devices.site_id, mac_track_sites.site_name, mac_track_devices.device_id, mac_track_devices.host_id, mac_track_devices.device_name, mac_track_devices.notes, mac_track_devices.hostname, mac_track_devices.snmp_options, mac_track_devices.snmp_readstring, mac_track_devices.snmp_version, mac_track_devices.snmp_username, mac_track_devices.snmp_password, mac_track_devices.snmp_auth_protocol, mac_track_devices.snmp_priv_passphrase, mac_track_devices.snmp_priv_protocol, mac_track_devices.snmp_context, mac_track_devices.snmp_port, mac_track_devices.snmp_timeout, mac_track_devices.snmp_retries, mac_track_devices.max_oids, mac_track_devices.snmp_status, mac_track_devices.ignorePorts, mac_track_devices.disabled, mac_track_devices.scan_type, mac_track_devices.ips_total, mac_track_devices.ports_total, mac_track_devices.ports_active, mac_track_devices.ports_trunk, mac_track_devices.macs_active, mac_track_devices.last_rundate, mac_track_devices.last_runmessage, mac_track_devices.last_runduration FROM mac_track_sites RIGHT JOIN mac_track_devices ON mac_track_devices.site_id = mac_track_sites.site_id LEFT JOIN mac_track_device_types ON mac_track_devices.device_type_id=mac_track_device_types.device_type_id ORDER BY site_name ASC LIMIT 0,30"

Device not add and display ERROR:Save Failed.
any idea?
thanks!
noname
Cacti Guru User
Posts: 1566
Joined: Thu Aug 05, 2010 2:04 am
Location: Japan

Post by noname »

Have you installed mactrack plugin properly?

Error '1054' represents 'DB_ERROR_NOSUCHFIELD', it appears the table for mactrack doesn't exist.

Try this command via CLI:
% mysql -uUSER -pPASS cacti -e "SHOW TABLES LIKE 'mac_%'"
(or simply "SHOW TABLES")

p.s.) For testing, I've installed mactrack2.6 on Cacti0.8.7d + PIA2.4, seems to be ok.
User avatar
TheWitness
Developer
Posts: 17059
Joined: Tue May 14, 2002 5:08 pm
Location: MI, USA
Contact:

Post by TheWitness »

I think for some reason the host_id field is missing from the table. I'll have to go back and find out why it's not there. In the mean time, please review the upgrade process in the setup.php and find the only line of code that add's that field and add it manually.

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?
rogerxyz
Posts: 3
Joined: Thu Aug 12, 2010 10:39 pm

Post by rogerxyz »

Thanks for reply.
Recheck the host_id field isn't exist!So I think didn't install it correctly.
From command windows run "php database_upgrade.php" and the message display:
This function is depricated. Please goto Plugin Management from the WebUI to Upgrade.

But the WebUI doesn't have any install option,it just have "Uninstall Plugin" and "Disable Plugin" from the name mactrack.
What can I do next step?
Should I add the field manually?
User avatar
TheWitness
Developer
Posts: 17059
Joined: Tue May 14, 2002 5:08 pm
Location: MI, USA
Contact:

Post by TheWitness »

Review the table structure in the install routine and compare to the actual table structure using mysql command line or something similar.

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?
Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest