Cacti (home)ForumsRepositoryDocumentation
Cacti: offical forums and support  

 FAQFAQ   SearchSearch   MemberlistMemberlist    RegisterRegister   ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in    


Cacti EZ and mactrack issues
Goto page 1, 2  Next
 
Post new topic   Reply to topic    Cacti Forum Index -> Plugin General
Author Message
cwahlin
Cacti User


Joined: 10 Oct 2003
Posts: 87

PostPosted: Sat Nov 11, 2006 5:22 pm    Post subject: Cacti EZ and mactrack issues Reply with quote

I can't seem to get mactrack in CactiEZ to work. I am getting a bunch of sql errors:

11/11/2006 10:54:01 PM - CMDPHP: Poller[0] ERROR: SQL Exec Failed "UPDATE `mac_track_ip_ranges` SET ips_max=ips_current, ips_max_date=ips_current_date WHERE ips_current > ips_max"
11/11/2006 10:54:01 PM - CMDPHP: Poller[0] ERROR: SQL Row Failed "SELECT * FROM mac_track_processes WHERE device_id = 0"
11/11/2006 10:54:01 PM - CMDPHP: Poller[0] ERROR: SQL Exec Failed "DELETE FROM mac_track_processes WHERE device_id='-1'"
11/11/2006 10:54:01 PM - CMDPHP: Poller[0] ERROR: SQL Cell Failed "SELECT count(*) FROM mac_track_processes WHERE device_id > 0"
11/11/2006 10:54:00 PM - CMDPHP: Poller[0] ERROR: SQL Exec Failed "DELETE FROM mac_track_processes WHERE device_id='3'"
11/11/2006 10:54:00 PM - MACTRACK: Poller[0] ERROR: Site not found in database. Can not continue.
11/11/2006 10:54:00 PM - CMDPHP: Poller[0] ERROR: SQL Exec Failed "INSERT INTO mac_track_processes (device_id, process_id, status, start_date) VALUES ('3', '1635', 'Running', NOW())"
11/11/2006 10:53:59 PM - CMDPHP: Poller[0] ERROR: SQL Exec Failed "INSERT INTO mac_track_processes (device_id, process_id, status, start_date) VALUES ('-1', '0', 'Running', NOW())"
11/11/2006 10:53:59 PM - THOLD: Poller[0] Checking Thresholds
11/11/2006 10:53:54 PM - SYSTEM STATS: Time:232.5697 Method:cactid Processes:1 Threads:1 Hosts:33 HostsPerProcess:33 DataSources:8188 RRDsProcessed:3083
11/11/2006 10:50:50 PM - CMDPHP: Poller[0] ERROR: SQL Cell Failed "SELECT COUNT(*) FROM mac_track_processes WHERE device_id='0'"
11/11/2006 10:50:50 PM - CMDPHP: Poller[0] ERROR: SQL Assoc Failed "SELECT mac_track_processes.process_id, mac_track_devices.description, mac_track_processes.device_id, mac_track_processes.start_date FROM mac_track_devices INNER JOIN mac_track_processes ON (mac_track_devices.device_id = mac_track_processes.device_id) WHERE mac_track_processes.device_id != '0'"

...help?

/Carl
Back to top
rony
Developer/Forum Admin


Joined: 17 Nov 2003
Posts: 5453
Location: Wisconsin, USA

PostPosted: Sun Nov 12, 2006 11:21 am    Post subject: Reply with quote

Moved to Plugin General.

Hopefully someone will see it here that will know how to help you out.
Back to top
brononi



Joined: 29 Aug 2006
Posts: 24

PostPosted: Tue Nov 14, 2006 5:49 am    Post subject: Reply with quote

see following reply

Last edited by brononi on Tue Nov 14, 2006 5:58 am; edited 1 time in total
Back to top
brononi



Joined: 29 Aug 2006
Posts: 24

PostPosted: Tue Nov 14, 2006 5:51 am    Post subject: Reply with quote

I've got the same problem over here.

The thing i've noticed is following:
- Cisco 650x and 29xx works
- Cisco 35xx doesn't work.
Is there maybe a problem with the templates?
Back to top
cwahlin
Cacti User


Joined: 10 Oct 2003
Posts: 87

PostPosted: Sat Nov 18, 2006 11:54 am    Post subject: Reply with quote

I guess it could be. I am trying to poll 6509:s with Sup720. Haven't tried our 35xx yet, but I'll try some different switches and see if I can get any of them to work.

/Carl
Back to top
TheWitness
Developer


Joined: 14 May 2002
Posts: 9723
Location: MI, USA

PostPosted: Sat Nov 18, 2006 1:04 pm    Post subject: Reply with quote

Looks like your problem may be here. I am planning a 2.0 and this and other issues will be addressed.

Quote:
11/11/2006 10:54:00 PM - MACTRACK: Poller[0] ERROR: Site not found in database. Can not continue.


TheWitness
Back to top
cwahlin
Cacti User


Joined: 10 Oct 2003
Posts: 87

PostPosted: Wed Nov 22, 2006 5:47 pm    Post subject: Reply with quote

Atleast I got a lot less sql errors assigning a site

11/22/2006 11:46:03 PM - CMDPHP: Poller[0] ERROR: SQL Cell Failed "SELECT COUNT(*) FROM mac_track_processes WHERE device_id='0'"
11/22/2006 11:46:03 PM - CMDPHP: Poller[0] ERROR: SQL Assoc Failed "SELECT mac_track_processes.process_id, mac_track_devices.description, mac_track_processes.device_id, mac_track_processes.start_date FROM mac_track_devices INNER JOIN mac_track_processes ON (mac_track_devices.device_id = mac_track_processes.device_id) WHERE mac_track_processes.device_id != '0'"

/Carl
Back to top
cigamit
Developer


Joined: 07 Apr 2005
Posts: 946
Location: B/CS Texas

PostPosted: Wed Nov 22, 2006 11:51 pm    Post subject: Reply with quote

Check your cacti database and ensure that you actually have a mac_track_processes table in there.
Back to top
cwahlin
Cacti User


Joined: 10 Oct 2003
Posts: 87

PostPosted: Tue Nov 28, 2006 7:47 am    Post subject: Reply with quote

I have the mac_track_processes table and it is empty. I re-imported the mactrack.sql, but I still have the same problem (and it is still empty):

11/28/2006 01:43:32 PM - CMDPHP: Poller[0] ERROR: SQL Cell Failed "SELECT COUNT(*) FROM mac_track_processes WHERE device_id='0'"
11/28/2006 01:43:32 PM - CMDPHP: Poller[0] ERROR: SQL Assoc Failed "SELECT mac_track_processes.process_id, mac_track_devices.description, mac_track_processes.device_id, mac_track_processes.start_date FROM mac_track_devices INNER JOIN mac_track_processes ON (mac_track_devices.device_id = mac_track_processes.device_id) WHERE mac_track_processes.device_id != '0'"

/Carl
Back to top
TheWitness
Developer


Joined: 14 May 2002
Posts: 9723
Location: MI, USA

PostPosted: Tue Nov 28, 2006 8:11 am    Post subject: Reply with quote

What version of MySQL?
Back to top
cwahlin
Cacti User


Joined: 10 Oct 2003
Posts: 87

PostPosted: Tue Nov 28, 2006 8:15 am    Post subject: Reply with quote

Running mysql 5.0.27-1

Not sure if this causes the problem, or is caused by it? Just tried running the mactrack poller from the command line:

php -q /var/www/html/plugins/mactrack/poller_mactrack.php -f -d
PHP Warning: session_start(): open(/var/lib/php/session/sess_e2pes71mfm3nh3ncgka5i7vjb5, O_RDWR) failed: Permission denied (13) in /var/www/html/include/config.php on line 138
PHP Warning: Unknown: open(/var/lib/php/session/sess_e2pes71mfm3nh3ncgka5i7vjb5, O_RDWR) failed: Permission denied (13) in Unknown on line 0
PHP Warning: Unknown: Failed to write session data (files). Please verify that the current setting of session.save_path is correct (/var/lib/php/session) in Unknown on line 0

/Carl
Back to top
TheWitness
Developer


Joined: 14 May 2002
Posts: 9723
Location: MI, USA

PostPosted: Tue Nov 28, 2006 8:19 am    Post subject: Reply with quote

This looks like a permissions problem. Can you correct that issue first and then update me. Also, please run the following and post:

php -v

TheWitness
Back to top
cwahlin
Cacti User


Joined: 10 Oct 2003
Posts: 87

PostPosted: Tue Nov 28, 2006 8:43 am    Post subject: Reply with quote

[root@cacti ~]# php -v
PHP 5.1.6 (cli) (built: Nov 2 2006 16:46:15)
Copyright (c) 1997-2006 The PHP Group
Zend Engine v2.1.0, Copyright (c) 1998-2006 Zend Technologies
with eAccelerator v0.9.5, Copyright (c) 2004-2006 eAccelerator, by eAccelerator

After fixing the permissions error the poller seems to finnish ok without errors:

[cactiuser@cacti root]$ php -q /var/www/html/plugins/mactrack/poller_mactrack.php -f -d
DEBUG: About to enter MacTrack poller processing
DEBUG: Into Processing. Checking to determine if it's time to run.
DEBUG: Checking if user changed the start time
DEBUG: Checking if user changed the maintenance time
DEBUG: The next run time has been determined to be at '2006-11-28 15:37:20'
DEBUG: The next database maintenance run time has been determined to be at '2006-11-29 1:00:00'
DEBUG: Either a scan has been forced, or it's time to check for macs
DEBUG: CMD: /usr/bin/php -q /var/www/html/plugins/mactrack/mactrack_scanner.php -id=1 -d
DEBUG: CMD: /usr/bin/php -q /var/www/html/plugins/mactrack/mactrack_scanner.php -id=2 -d
DEBUG: A process cycle launch just completed.
DEBUG: Interum IP addresses to MAC addresses association pass complete.
DEBUG: Finished transferring scan results to main table.
DEBUG: Finished updating site table with collection statistics.
11/28/2006 02:38:04 PM - SYSTEM MACTRACK STATS: Time:2.1256 ConcurrentProcesses:7 Devices:2

BUT, I still get sql errors in the cactilog:

11/28/2006 02:38:09 PM - CMDPHP: Poller[0] ERROR: SQL Exec Failed "DELETE FROM mac_track_processes WHERE device_id='1'"
11/28/2006 02:38:04 PM - CMDPHP: Poller[0] ERROR: SQL Exec Failed "DELETE FROM mac_track_processes WHERE device_id='2'"
11/28/2006 02:38:04 PM - SYSTEM MACTRACK STATS: Time:2.1256 ConcurrentProcesses:7 Devices:2
11/28/2006 02:38:04 PM - CMDPHP: Poller[0] ERROR: SQL Exec Failed "UPDATE `mac_track_ip_ranges` SET ips_max=ips_current, ips_max_date=ips_current_date WHERE ips_current > ips_max"
11/28/2006 02:38:04 PM - CMDPHP: Poller[0] ERROR: SQL Row Failed "SELECT * FROM mac_track_processes WHERE device_id = 0"
11/28/2006 02:38:04 PM - CMDPHP: Poller[0] ERROR: SQL Exec Failed "DELETE FROM mac_track_processes WHERE device_id='-1'"
11/28/2006 02:38:04 PM - CMDPHP: Poller[0] ERROR: SQL Cell Failed "SELECT count(*) FROM mac_track_processes WHERE device_id > 0"
11/28/2006 02:38:02 PM - CMDPHP: Poller[0] ERROR: SQL Exec Failed "INSERT INTO mac_track_processes (device_id, process_id, status, start_date) VALUES ('1', '13807', 'Running', NOW())"
11/28/2006 02:38:02 PM - CMDPHP: Poller[0] ERROR: SQL Exec Failed "INSERT INTO mac_track_processes (device_id, process_id, status, start_date) VALUES ('2', '13809', 'Running', NOW())"
11/28/2006 02:38:02 PM - CMDPHP: Poller[0] ERROR: SQL Exec Failed "INSERT INTO mac_track_processes (device_id, process_id, status, start_date) VALUES ('-1', '0', 'Running', NOW())"

Status for my Catalyst 6509 show up as "error" and the only thing I see is the number of IPs. Everything else says 0. Maybe that's because it has a Sup720 which isn't in the device types? (maybe it needs a different scanning function?)

/Carl
Back to top
TheWitness
Developer


Joined: 14 May 2002
Posts: 9723
Location: MI, USA

PostPosted: Tue Nov 28, 2006 8:51 am    Post subject: Reply with quote

Boy Carl, it's been a long time. Maybe Jimmy can add value. I don't remember adding a device id of -1 to the process table. If the add failed, there must be something going on with the table. Maybe you should run the database_upgrade.php file to insure you have the latest structure.

TheWitness
Back to top
cwahlin
Cacti User


Joined: 10 Oct 2003
Posts: 87

PostPosted: Tue Nov 28, 2006 9:06 am    Post subject: Reply with quote

Running database_upgrade introduced a whole new set of sql errors
For every command it tries to invoke I get "SQL Exec Failed "ALTER TABLE".

Probably doesn't help that I'm no sql guru.

I'll wait and see if cigamit has some input. Thanks for your help so far TheWitness!

/Carl
Back to top
Display posts from previous:   
Post new topic   Reply to topic    Cacti Forum Index -> Plugin General All times are GMT - 5 Hours
Goto page 1, 2  Next
Page 1 of 2

 



Powered by phpBB © 2001, 2005 phpBB Group