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    


SQL ERRORS
Goto page 1, 2  Next
 
Post new topic   Reply to topic    Cacti Forum Index -> Plugin: (MAC Track)
Author Message
tbaror



Joined: 05 Jun 2006
Posts: 49

PostPosted: Tue Jul 03, 2007 7:49 am    Post subject: SQL ERRORS Reply with quote

Hello,

i have just done new fresh install of MACTRACK, when i am trying to add device or site i am getting sql errors as follows below.

please advice.
Thanks in advanced.

********************sql error******************

07/03/2007 04:40:13 PM - CMDPHP: Poller[0] ERROR: SQL Cell Failed "SELECT COUNT(mac_track_devices.device_id) FROM mac_track_sites RIGHT JOIN mac_track_devices ON mac_track_devices.site_id = mac_track_sites.site_id WHERE ((mac_track_devices.hostname like '%%%%' OR mac_track_devices.device_name like '%%%%' OR mac_track_devices.notes like '%%%%'))"
07/03/2007 04:40:13 PM - CMDPHP: Poller[0] ERROR: SQL Assoc Failed "SELECT mac_track_devices.site_id, mac_track_sites.site_name, mac_track_devices.device_id, mac_track_devices.device_name, mac_track_devices.notes, mac_track_devices.hostname, mac_track_devices.snmp_readstring, mac_track_devices.snmp_readstrings, mac_track_devices.snmp_version, mac_track_devices.snmp_port, mac_track_devices.snmp_timeout, mac_track_devices.snmp_retries, 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 WHERE ((mac_track_devices.hostname like '%%%%' OR mac_track_devices.device_name like '%%%%' OR mac_track_devices.notes like '%%%%')) ORDER BY site_name ASC LIMIT 0,30"
Back to top
streaker69
Cacti Pro User


Joined: 27 Mar 2006
Posts: 647
Location: Psychic Amish Network Administrator

PostPosted: Tue Jul 03, 2007 8:52 am    Post subject: Reply with quote

Did you import the mactrack sql file?
Back to top
tbaror



Joined: 05 Jun 2006
Posts: 49

PostPosted: Tue Jul 03, 2007 10:55 am    Post subject: SQL ERRORS Reply with quote

yes i did import it to cacti db
Back to top
TheWitness
Developer


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

PostPosted: Tue Jul 03, 2007 11:39 am    Post subject: Reply with quote

What version of MacTrack? Are you sure you have those tables?

TheWitness
Back to top
streaker69
Cacti Pro User


Joined: 27 Mar 2006
Posts: 647
Location: Psychic Amish Network Administrator

PostPosted: Tue Jul 03, 2007 6:03 pm    Post subject: Re: SQL ERRORS Reply with quote

tbaror wrote:
yes i did import it to cacti db


If you don't have it, install phpMyAdmin and verify that all the tables are created.
Back to top
tbaror



Joined: 05 Jun 2006
Posts: 49

PostPosted: Wed Jul 04, 2007 2:12 am    Post subject: sql errors Reply with quote

Hi,

i am using MySql gui tools quey browser, under cacti browser the tables seems to exist.
thanks



dbtables.JPG
 Description:
 Filesize:  20.89 KB
 Viewed:  2443 Time(s)

dbtables.JPG


Back to top
TheWitness
Developer


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

PostPosted: Wed Jul 04, 2007 3:28 am    Post subject: Reply with quote

Please answer the other component of my question. Also, did you run the database_upgrade.php script?

TheWitness
Back to top
tbaror



Joined: 05 Jun 2006
Posts: 49

PostPosted: Thu Jul 05, 2007 2:21 am    Post subject: SQL ERRORS Reply with quote

HI,

You right i didnt run database_upgrade.php, now its runing.
another question do i need to replace the files under patch folder?

Thanks
Back to top
TheWitness
Developer


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

PostPosted: Thu Jul 05, 2007 12:15 pm    Post subject: Reply with quote

Depends on your Plugin Architecture version.

TheWitness
Back to top
apperrault
Cacti User


Joined: 16 Feb 2007
Posts: 359
Location: Emeryville, CA

PostPosted: Thu Jul 05, 2007 12:23 pm    Post subject: Reply with quote

Witness,
I am having some problems with the MacTrack version in the SVN. I have imported the SQL script, i have run the
Code:
php database_upgrade.php
and i get errors when i run that.

When i click on the MacTrack tab in my Cacti Instance, i get the following:

Code:

Fatal error: Cannot redeclare get_dns_from_ip() (previously declared in E:\cacti\plugins\settings\include\functions.php:154) in E:\cacti\plugins\mactrack\lib\mactrack_functions.php on line 1176


This is also the same error i get when i try and run database_upgrade.php.

What should i do? Should i delete all MacTrack tables from my MySQL DB and try again?

let me know

app
Back to top
TheWitness
Developer


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

PostPosted: Thu Jul 05, 2007 12:54 pm    Post subject: Reply with quote

Edit lib/config.php and edit out the settings plugin. I will let Jimmy Conner know.

TheWitness
Back to top
apperrault
Cacti User


Joined: 16 Feb 2007
Posts: 359
Location: Emeryville, CA

PostPosted: Thu Jul 05, 2007 12:57 pm    Post subject: Reply with quote

I did that, and what do you know, it worked.

I wonder if that was also causing my Uptime plugin to not run automatically.

We will have to see.

thanks much

app
Back to top
apperrault
Cacti User


Joined: 16 Feb 2007
Posts: 359
Location: Emeryville, CA

PostPosted: Thu Jul 05, 2007 1:15 pm    Post subject: Reply with quote

Well, that fixed the problem i was having with MacTrack, but not with Uptime. I will try and uninstall that plugin and re-install it.

One other question, one earlier versions of MacTrack, you had a list of some of the common Device Types, but now it appears that is gone, and I have to create them all manually. Do you have that old list. For the most part, i used those as templates for other, similar items.

If you have that available, it would be great.

Thanks much

app
Back to top
TheWitness
Developer


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

PostPosted: Thu Jul 05, 2007 1:29 pm    Post subject: Reply with quote

More than likely, I will patch MacTrack.

TheWitness
Back to top
TheWitness
Developer


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

PostPosted: Thu Jul 05, 2007 2:28 pm    Post subject: Reply with quote

If you sync your MacTrack SVN, you should be all set now adding the settings plugin back in.
Back to top
Display posts from previous:   
Post new topic   Reply to topic    Cacti Forum Index -> Plugin: (MAC Track) All times are GMT - 5 Hours
Goto page 1, 2  Next
Page 1 of 2

 



Powered by phpBB © 2001, 2005 phpBB Group