They started right when I installed Weathermap 0.97a on a Cacti 0.8.7g install. Any help is appreciated. I've created 1 weathermap and it works fine. There are also no other Weathermap warnings in the log. Just these errors constantly (the only errors in the log).
09/06/2010 12:15:07 PM - CMDPHP: Poller[0] ERROR: SQL Assoc Failed!, Error:'1064', SQL:"select weathermap_maps.* from weathermap_auth,weathermap_maps where weathermap_maps.id=weathermap_auth.mapid and active='on' and (userid=3 or userid=0) and weathermap_maps.id="
NOT solved with Boris's 3rd patch in this thread: http://forums.cacti.net/about39518.html
I was also getting the offset errors in php-errors and I was moving this server so the patch was timely and works perfectly.
Update: I thought it was the same thing but I spoke too fast. Still getting the error in the Cacti log, but no longer in php-errors.
Thanks all!
Error every 30 seconds
Moderators: Developers, Moderators
- Howie
- Cacti Guru User
- Posts: 5508
- Joined: Thu Sep 16, 2004 5:53 am
- Location: United Kingdom
- Contact:
Re: Error every 30 seconds
Is it not every 30 seconds, but every time you look at a particular page?
The error message is for syntax error, because there's no ID on the end of that query. The query would be used to find the maps that you should be able to see. So I think it's every time you look at either a particular map, or at the map overview screen. Could you confirm which please? (e.g. tail -f log/cacti.log while browsing)
The error message is for syntax error, because there's no ID on the end of that query. The query would be used to find the maps that you should be able to see. So I think it's every time you look at either a particular map, or at the map overview screen. Could you confirm which please? (e.g. tail -f log/cacti.log while browsing)
Weathermap 0.98a is out! & QuickTree 1.0. Superlinks is over there now (and built-in to Cacti 1.x).
Some Other Cacti tweaks, including strip-graphs, icons and snmp/netflow stuff.
(Let me know if you have UK DevOps or Network Ops opportunities, too!)
Some Other Cacti tweaks, including strip-graphs, icons and snmp/netflow stuff.
(Let me know if you have UK DevOps or Network Ops opportunities, too!)
-
- Posts: 4
- Joined: Wed Jul 20, 2011 1:42 pm
- Location: Brazil
Re: Error every 30 seconds
Edit weathermap-cacti-plugin.php insert [ ."" ]
to fix:
change all the lines above - db_fetch_assoc
if ($ id> = 1)
{
to
if ($ id> 0)
{
follow all lines cited by morten.damm
db_fetch_assoc("select weathermap_maps.* from weathermap_auth,weathermap_maps where weathermap_maps.id=weathermap_aut
h.mapid and active='on' and (userid=".$userid." or userid=0) and weathermap_maps id=".$id."");
good luck.
to fix:
change all the lines above - db_fetch_assoc
if ($ id> = 1)
{
to
if ($ id> 0)
{
follow all lines cited by morten.damm
db_fetch_assoc("select weathermap_maps.* from weathermap_auth,weathermap_maps where weathermap_maps.id=weathermap_aut
h.mapid and active='on' and (userid=".$userid." or userid=0) and weathermap_maps id=".$id."");
good luck.
Last edited by MOTTAMOURA on Wed May 06, 2015 8:03 am, edited 1 time in total.
MOTTAMOURA
-
- Posts: 10
- Joined: Thu Apr 15, 2010 12:52 am
Re: Error every 30 seconds
Hi
I have edited the weathermap-cacti-plugin.php and changed the following
db_fetch_assoc("select weathermap_maps.* from weathermap_auth,weathermap_maps where weathermap_maps.id=weathermap_aut
h.mapid and active='on' and (userid=".$userid." or userid=0) and weathermap_maps id=".$id;
changed to (3 replacements)
db_fetch_assoc("select weathermap_maps.* from weathermap_auth,weathermap_maps where weathermap_maps.id=weathermap_aut
h.mapid and active='on' and (userid=".$userid." or userid=0) and weathermap_maps id=".$id."");
db_fetch_assoc("select weathermap_maps.* from weathermap_auth,weathermap_maps where weathermap_maps.id=weathermap_aut
h.mapid and active='on' and (userid=".$userid." or userid=0) and weathermap_maps.id=".$mapid);
changed to (1 replacement)
db_fetch_assoc("select weathermap_maps.* from weathermap_auth,weathermap_maps where weathermap_maps.id=weathermap_aut
h.mapid and active='on' and (userid=".$userid." or userid=0) and weathermap_maps.id=".$mapid."");
Still I see the following error from time to time in Cacti log
CMDPHP: Poller[0] ERROR: SQL Assoc Failed!, Error:'1064', SQL:"select weathermap_maps.* from weathermap_auth,weathermap_maps where weathermap_maps.id=weathermap_auth.mapid and active='on' and (userid=4 or userid=0) and weathermap_maps.id="
WM version is 0.97a
Can anybody help on this?
Thanks
I have edited the weathermap-cacti-plugin.php and changed the following
db_fetch_assoc("select weathermap_maps.* from weathermap_auth,weathermap_maps where weathermap_maps.id=weathermap_aut
h.mapid and active='on' and (userid=".$userid." or userid=0) and weathermap_maps id=".$id;
changed to (3 replacements)
db_fetch_assoc("select weathermap_maps.* from weathermap_auth,weathermap_maps where weathermap_maps.id=weathermap_aut
h.mapid and active='on' and (userid=".$userid." or userid=0) and weathermap_maps id=".$id."");
db_fetch_assoc("select weathermap_maps.* from weathermap_auth,weathermap_maps where weathermap_maps.id=weathermap_aut
h.mapid and active='on' and (userid=".$userid." or userid=0) and weathermap_maps.id=".$mapid);
changed to (1 replacement)
db_fetch_assoc("select weathermap_maps.* from weathermap_auth,weathermap_maps where weathermap_maps.id=weathermap_aut
h.mapid and active='on' and (userid=".$userid." or userid=0) and weathermap_maps.id=".$mapid."");
Still I see the following error from time to time in Cacti log
CMDPHP: Poller[0] ERROR: SQL Assoc Failed!, Error:'1064', SQL:"select weathermap_maps.* from weathermap_auth,weathermap_maps where weathermap_maps.id=weathermap_auth.mapid and active='on' and (userid=4 or userid=0) and weathermap_maps.id="
WM version is 0.97a
Can anybody help on this?
Thanks
- Howie
- Cacti Guru User
- Posts: 5508
- Joined: Thu Sep 16, 2004 5:53 am
- Location: United Kingdom
- Contact:
Re: Error every 30 seconds
weathermap_maps.id is an integer. Why would it need quotes?
So in some situation, URLs are being generated without an ID on I guess. Let's figure out why.
Could you grep your Apache access_log for something like:
grep weathermap-cacti access_log | grep id=
for requests at the same time as you get errors?
(I'm assuming this is on a unix-like system)
So in some situation, URLs are being generated without an ID on I guess. Let's figure out why.
Could you grep your Apache access_log for something like:
grep weathermap-cacti access_log | grep id=
for requests at the same time as you get errors?
(I'm assuming this is on a unix-like system)
Weathermap 0.98a is out! & QuickTree 1.0. Superlinks is over there now (and built-in to Cacti 1.x).
Some Other Cacti tweaks, including strip-graphs, icons and snmp/netflow stuff.
(Let me know if you have UK DevOps or Network Ops opportunities, too!)
Some Other Cacti tweaks, including strip-graphs, icons and snmp/netflow stuff.
(Let me know if you have UK DevOps or Network Ops opportunities, too!)
-
- Posts: 10
- Joined: Thu Apr 15, 2010 12:52 am
Re: Error every 30 seconds
php update seems to have solved the problem
Updated php-5.3.3-3.el6.x86_64
Update 5.3.3-3.el6_1.3.x86_64
The original 0.97a weathermap-cacti-plugin.php is restored and no errors appear in the log.
Updated php-5.3.3-3.el6.x86_64
Update 5.3.3-3.el6_1.3.x86_64
The original 0.97a weathermap-cacti-plugin.php is restored and no errors appear in the log.
Who is online
Users browsing this forum: No registered users and 4 guests