Cacti (home)ForumsDocumentation
Cacti: offical forums and support
It is currently Mon May 29, 2017 8:27 pm

All times are UTC - 5 hours




Post new topic Reply to topic  [ 7 posts ] 
Author Message
 Post subject: Weathermap not updating
PostPosted: Mon Dec 05, 2016 4:44 am 
Offline

Joined: Mon Dec 05, 2016 4:29 am
Posts: 4
Hello all,
I have Cacti 0.8.8a and Weathermap 0.97b.
Weathermap worked well but stop working since 3 days.
I have configured LDAP authentication with cacti and had to do an apt-get install php5-ldap on my server (Debian 7.8).
I think when I did this and apache restarted, weathermap stopped working.
Currently,when I go to Console -> Weathermap and click on a config,the map does not display,but when i click on "see config",I can actually see the config.
My maps still appears on "Weathermap" but are not updated since the date when i did the apt-get.
On the log,every 5 minutes i see this lines :

12/05/2016 01:40:06 PM - WEATHERMAP: Poller[0] [Map 76] Backbone_MPLS-3.conf: Map: /usr/share/cacti/site/plugins/weathermap/configs/Backbone_MPLS-3.conf -> /usr/share/cacti/site/plugins/weathermap/output/60e11ba3efc0160fb718.html & /usr/share/cacti/site/plugins/weathermap/output/60e11ba3efc0160fb718.png
12/05/2016 01:40:07 PM - WEATHERMAP: Poller[0] [Map 76] Backbone_MPLS-3.conf: About to write image file. If this is the last message in your log, increase memory_limit in php.ini [WMPOLL01]

I already increase the memory_limit.

Do you have an idea ?

Thanks


Top
 Profile  
 
 Post subject: Re: Weathermap not updating
PostPosted: Mon Dec 05, 2016 6:11 am 
Offline
Cacti Guru User
User avatar

Joined: Thu Sep 16, 2004 5:53 am
Posts: 5100
Location: United Kingdom
If that is the last weathermap related message in your log, then most likely increase the memory_limit some more. What is it set to?

Also, if I am following correctly, the map doesn't show in the editor. When that happens, have a look for PHP errors in the Apache error log.

_________________
Weathermap 0.98 is out! & QuickTree 0.2. Superlinks is over there now.
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!)


Top
 Profile  
 
 Post subject: Re: Weathermap not updating
PostPosted: Mon Dec 05, 2016 7:07 am 
Offline

Joined: Mon Dec 05, 2016 4:29 am
Posts: 4
The memory limit was 512M, I increase to 1024M.

I look the php errors and this error appears frequently :

Code:
[Fri Dec 02 19:47:48 2016] [error] [client 192.168.70.213] PHP Deprecated:  Function split() is deprecated in /usr/share/cacti/site/plugins/weathermap/editor.php on line 32, referer: http://cacti.zeop.biz/cacti/plugins/weathermap/editor.php?plug=1&mapname=CMTS_SP4.conf


But this error appeared before my problem.
However this error appeared since the problem occured:
Code:
[Fri Dec 02 19:47:49 2016] [error] [client 192.168.70.213] PHP Fatal error:  Call to undefined function imageantialias() in /usr/share/cacti/site/plugins/weathermap/lib/Weathermap.class.php on line 3129, referer: http://cacti.zeop.biz/cacti/plugins/weathermap/editor.php?plug=1&mapname=CMTS_SP4.conf


Are these errors the cause of my problem ?


Top
 Profile  
 
 Post subject: Re: Weathermap not updating
PostPosted: Mon Dec 05, 2016 9:40 am 
Offline
Cacti Guru User
User avatar

Joined: Thu Sep 16, 2004 5:53 am
Posts: 5100
Location: United Kingdom
So when you installed php5-ldap, did it also update php itself?

The split() warnings are resolved in 0.98 (and 0.97c I think).

I just downloaded 0.97b though, and in a fresh copy, line 3129 is commented out. In newer Weathermap versions there is a check to see if the function exists because it doesn't in all PHP versions (another reason I think your PHP version has also changed). Calling a non-existent function would stop it generating maps. The fix is to add a "#" to the beginning of line 3129 in your Weathermap.class.php if you don't update weathermap.

ALSO, and MOST IMPORTANT: your editor is available to the entire world! This is a huge security problem, especially if you don't keep up with updates for Cacti and Weathermap. Your version of Weathermap is affected by CVE-2013-3739 which can allow web users to read files on the server.

_________________
Weathermap 0.98 is out! & QuickTree 0.2. Superlinks is over there now.
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!)


Top
 Profile  
 
 Post subject: Re: Weathermap not updating
PostPosted: Mon Dec 05, 2016 11:27 am 
Offline

Joined: Mon Dec 05, 2016 4:29 am
Posts: 4
I add the # at the beginning of the line 3129 and it worked !! Maps or well updated,I think when apt install php5-ldap, it has upgraded php too.
I think it's the time to update the weathermap plugin so, I'll do it on a VM clone to be sure to not break cacti again....

Thanks for your help !


Top
 Profile  
 
 Post subject: Re: Weathermap not updating
PostPosted: Mon Dec 05, 2016 11:37 am 
Offline
Cacti Guru User
User avatar

Joined: Thu Sep 16, 2004 5:53 am
Posts: 5100
Location: United Kingdom
FIX YOUR APACHE PERMISSIONS!

_________________
Weathermap 0.98 is out! & QuickTree 0.2. Superlinks is over there now.
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!)


Top
 Profile  
 
 Post subject: Re: Weathermap not updating
PostPosted: Tue Dec 13, 2016 7:12 am 
Offline

Joined: Mon Dec 05, 2016 4:29 am
Posts: 4
I have updated the weathermap plugin to the 0.98 version.
I also follow a guide to include the imageantialias function in my php version,and reactivate the function.

I follow these steps : http://www.webdesignblog.asia/web-design/hosting/install-php-gd-on-ubuntu-without-recompiling-php/#sthash.qwGBnSUr.dpbs

Everything is back to normal,thanks !


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 7 posts ] 

All times are UTC - 5 hours


Who is online

Users browsing this forum: No registered users and 4 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  

Protected by Anti-Spam ACP Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group