MacTrack SQL errors - Ubuntu6.06[Dapper]+Cacti+PluginArch

Support questions about the MAC Track plugin

Moderators: Developers, Moderators

Post Reply
User avatar
SyxPak
Posts: 16
Joined: Fri Mar 24, 2006 7:56 am
Location: Ireland
Contact:

MacTrack SQL errors - Ubuntu6.06[Dapper]+Cacti+PluginArch

Post by SyxPak »

{edit}
About to try this: http://forums.cacti.net/viewtopic.php?t=15198
My eyes aren't working today. Sorry.
{/edit}

Excerpt from my cacti log:

Code: Select all

11/01/2006 02:50:21 PM - CMDPHP: Poller[0] ERROR: SQL Assoc Failed "SELEKT * FROM manage_host_services where id='25'"
11/01/2006 02:52:05 PM - CMDPHP: Poller[0] ERROR: SQL Exec Failed "delet3 from mac_track_processes where start_date < '2006-11-01 14:32:05'"
11/01/2006 02:52:05 PM - CMDPHP: Poller[0] ERROR: SQL Cell Failed "SELEKT count(*) FROM mac_track_processes"
11/01/2006 02:52:05 PM - CMDPHP: Poller[0] ERROR: SQL Exec Failed "TRUNCAT3 TABLE mac_track_processes"
11/01/2006 02:52:05 PM - CMDPHP: Poller[0] ERROR: SQL Assoc Failed "SELEKT device_id FROM mac_track_devices WHERE disabled='' ORDER BY site_id"
11/01/2006 02:52:05 PM - CMDPHP: Poller[0] ERROR: SQL Exec Failed "INSER7 INTO mac_track_processes (device_id, process_id, status, start_date) VALUES ('-1', '0', 'Running', NOW())"
11/01/2006 02:52:05 PM - CMDPHP: Poller[0] NOTE: MACTRACK has no devices to process at this time
11/01/2006 02:52:05 PM - CMDPHP: Poller[0] ERROR: SQL Cell Failed "SELEKT Count(*) FROM mac_track_devices"
11/01/2006 02:52:05 PM - SYSTEM MACTRACK STATS: Time:0.0133 ConcurrentProcesses:7 Devices:
11/01/2006 02:52:44 PM - CMDPHP: Poller[0] ERROR: SQL Exec Failed "delet3 from mac_track_processes where start_date < '2006-11-01 14:32:44'"
11/01/2006 02:53:47 PM - CMDPHP: Poller[0] ERROR: SQL Assoc Failed "seleKT site_id,site_name from mac_track_sites order by site_name"
11/01/2006 02:53:47 PM - CMDPHP: Poller[0] ERROR: SQL Assoc Failed "SELEKT device_id, description, hostname FROM mac_track_devices ORDER BY description"
11/01/2006 02:53:47 PM - CMDPHP: Poller[0] ERROR: SQL Assoc Failed "seleKT scan_date from mac_track_scan_dates order by scan_date desc"
11/01/2006 02:54:00 PM - CMDPHP: Poller[0] ERROR: SQL Row Failed "SELEKT * FROM mac_track_device_types WHERE device_type_id = '-1'"
11/01/2006 02:54:00 PM - CMDPHP: Poller[0] ERROR: SQL Assoc Failed "SELEKT   mac_track_sites.site_id,   mac_track_sites.site_name,   mac_track_sites.total_devices,   mac_track_sites.total_device_errors,   mac_track_sites.total_macs,   mac_track_sites.total_ips,   mac_track_sites.total_oper_ports,   mac_track_sites.total_user_ports   FROM mac_track_sites      ORDER BY mac_track_sites.site_name LIMIT 0,30"
11/01/2006 02:54:00 PM - CMDPHP: Poller[0] ERROR: SQL Cell Failed "SELEKT   COUNT(mac_track_sites.site_id)   FROM mac_track_sites   "
Last edited by SyxPak on Wed Nov 01, 2006 10:44 am, edited 1 time in total.
User avatar
SyxPak
Posts: 16
Joined: Fri Mar 24, 2006 7:56 am
Location: Ireland
Contact:

Post by SyxPak »

This is what ps aux | grep cacti brings up during a poll:
root@tribble:/usr/share/cacti/site/plugins/mactrack # ps aux | grep cacti
www-data 15135 0.0 0.8 2372 1044 ? Ss 15:15 0:00 /bin/sh -c /usr/share/cacti/site/poller.php >/dev/null 2>/var/log/cacti/poller-error.log
www-data 15137 10.2 8.7 22328 11052 ? S 15:15 0:00 /usr/bin/php -q /usr/share/cacti/site/poller.php
www-data 15143 6.0 2.5 14640 3192 ? Sl 15:15 0:00 /usr/sbin/cactid 0 62
dir listing wrote: root@tribble:/usr/share/cacti/site/plugins/mactrack # ls -lha
total 272K
drwxr-xr-x 8 root root 4.0K 2006-10-19 17:08 .
drwxr-xr-x 17 root root 4.0K 2006-10-25 15:35 ..
-rwxr-xr-x 1 root root 6.6K 2006-07-27 12:01 database_upgrade.php
drwxr-xr-x 2 root root 4.0K 2006-10-27 09:52 docs
drwxr-xr-x 2 root root 4.0K 2006-10-19 17:08 html
drwxr-xr-x 2 root root 4.0K 2006-10-19 17:08 images
drwxr-xr-x 2 root root 4.0K 2006-10-19 17:08 include
-rwxr-xr-x 1 root root 44 2006-07-27 12:01 index.php
drwxr-xr-x 2 root root 4.0K 2006-10-19 17:08 lib
-rwxr-xr-x 1 root root 31K 2006-07-27 12:01 mactrack_devices.php
-rwxr-xr-x 1 root root 21K 2006-07-27 12:01 mactrack_device_types.php
-rwxr-xr-x 1 root root 2.4K 2006-07-27 12:01 mactrack_resolver.php
-rwxr-xr-x 1 root root 7.0K 2006-07-27 12:01 mactrack_scanner.php
-rwxr-xr-x 1 root root 20K 2006-07-27 12:01 mactrack_sites.php
-rw-rw---- 1 root www-data 15K 2006-07-27 12:01 mactrack.sql
-rwxr-xr-x 1 root root 17K 2006-07-27 12:01 mactrack_utilities.php
-rwxr-xr-x 1 root root 56K 2006-07-27 12:01 mactrack_view.php
drwxr-xr-x 4 root root 4.0K 2006-10-19 17:08 patched files
-rwxr-xr-x 1 root root 20K 2006-07-27 12:01 poller_mactrack.php
-rwxr-xr-x 1 root root 22K 2006-07-27 12:01 setup.php
I don't have a cacti user or group, apache user:group is www-data:www-data
/usr/share/cacti is owned by root:root, chmod 755 on most things.
Last edited by SyxPak on Wed Nov 01, 2006 10:29 am, edited 1 time in total.
User avatar
SyxPak
Posts: 16
Joined: Fri Mar 24, 2006 7:56 am
Location: Ireland
Contact:

Post by SyxPak »

And now as I try to post my hostinfo details, I keep getting this error:

Code: Select all

Could not insert new word matches

DEBUG MODE

SQL Error : 1271 Illegal mix of collations for operation ' IN '
<snip>

Line : 251
File : functions_search.php
User avatar
SyxPak
Posts: 16
Joined: Fri Mar 24, 2006 7:56 am
Location: Ireland
Contact:

Post by SyxPak »

HostInfo attached below.
Attachments
host.info.output.txt
HostInfo
(1.16 KiB) Downloaded 387 times
User avatar
SyxPak
Posts: 16
Joined: Fri Mar 24, 2006 7:56 am
Location: Ireland
Contact:

Post by SyxPak »

I give up.

Rest of post is attached.
Attachments
rest.of.post.txt
(797 Bytes) Downloaded 316 times
User avatar
TheWitness
Developer
Posts: 17007
Joined: Tue May 14, 2002 5:08 pm
Location: MI, USA
Contact:

Post by TheWitness »

Was the web site giving you problems when you attempted to post? Well, you should not have problems adding a site. Question is how did you install. I never 100% officially released this, I was hired away before I publically released. However, Cigamit (www.cactiusers.org) did a good job packaging it. Yes, I kind of like it too and the vendor who's package I was using previously did not support all of our devices. MacTrack can be customized to work with all...

Depending on how you answer the question of where you got your copy, will dictate my answer. It's usually because you are either running an old version of MySQL (3.23) or you have installed as follows:

mysql -u root -p cacti < mac_track.sql

And for some reason it did not take. Or you had an old version and did not run "php database_upgrade.php".

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?
User avatar
SyxPak
Posts: 16
Joined: Fri Mar 24, 2006 7:56 am
Location: Ireland
Contact:

Post by SyxPak »

I got it from CactiUsers.org, the tgz.

I unzipped it, dumped mactrack folder in /usr/share/cacti/site/plugins/, and I think I chmod 750'd the php files (owned by root:root), as I have done with other plugins.
Shortly after posting this thread, I spotted the other SQL Error thread, where you recommended using the database_upgrade.php script.
I ran that and got the following:
root@tribble:/usr/share/cacti/site/plugins/mactrack # php database_upgrade.php
000000000010001100000000000000011100
Updating Device Types in Devices Table. Please be patient.

Warning: Invalid argument supplied for foreach() in /usr/share/cacti/site/plugins/mactrack/database_upgrade.php on line 71
I got a bunch of SQL errors in cacti.log thereafter, and went off to other tasks while I waited for a reply to this thread.
They're attached below.

It seems that after running database_upgrade.php, things got initialised a bit. Big block of SQL Exec/Assoc/Cell errors/warnings immediately afterwards, then nothing, bar a few more every 2hours (mactrack run interval).
I had 70 tables (3 were mactrack), after running mysql -u root -p cacti < mactrack.sql I now have 77.
I've just created a MacTrack Site, and it saved correctly. I will wait for the next mactrack interval and post my findings...in 5 minutes.

Hostinfo is below:
Cacti Version - 0.8.6h
Plugin Architecture - 1.0
Poller Type - Cactid v0.8.6f
Server Info - Linux 2.6.15-27-686
Web Server - Apache/2.0.55 (Ubuntu) PHP/5.1.2
PHP - 5.1.2
PHP Extensions - xmlwriter, libxml, xml, wddx, tokenizer, sysvshm, sysvsem, sysvmsg, standard, SimpleXML, sockets, soap, SPL, shmop, session, Reflection, posix, mime_magic, mbstring, iconv, hash, gettext, ftp, filepro, exif, dom, dba, date, ctype, calendar, bz2, bcmath, zlib, pcre, openssl, xmlreader, apache2handler, mysql, snmp, mysqli, gd
MySQL - 5.0.22-Debian_0ubuntu6.06.2-log
RRDTool - 1.2.11
SNMP - 5.2.1.2
Plugins
  • Read-only Devices Tab (devices - v0.4)
    Network Discovery (discovery - v0.6)
    Host Info (hostinfo - v0.1)
    Simple Links page (links - v0.3)
    Device Tracking (mactrack - v0.0.1b)
    PHP Network Managing (manage - v0.4)
    Device Monitoring (monitor - v0.7)
    Poller Performance Report (pollperf - v0.1)
    rrdclean (RRD Cleaner - v1.2 (Hack Gilles Boulon))
    Thresholds (thold - v0.3.0)
    Network Tools (tools - v0.2)
    Update Checker (update - v0.3)
    PHP Network Weathermap (weathermap - v0.82)
Attachments
cacti.log_mactrack_sqlerrors.txt
(7.77 KiB) Downloaded 543 times
User avatar
SyxPak
Posts: 16
Joined: Fri Mar 24, 2006 7:56 am
Location: Ireland
Contact:

Post by SyxPak »

Should I get the SVN release?

[I haven't used cvs/svn repos before]
Post Reply

Who is online

Users browsing this forum: No registered users and 0 guests