Cacti (home)ForumsDocumentation
Cacti: offical forums and support
It is currently Thu Feb 21, 2019 11:25 pm

All times are UTC - 5 hours




Post new topic Reply to topic  [ 18 posts ]  Go to page 1, 2  Next
Author Message
 Post subject: cannot add graph in weathermap was working fine
PostPosted: Tue Oct 23, 2018 7:23 am 
Offline

Joined: Mon May 29, 2017 4:14 pm
Posts: 34
Hi Howie,

The savior... need help.. all of the sudden I can't add map .. and getting following error:

/var/log/httpd/error_log
[error] [client XXX.XXX.XXX.XXX] PHP Warning: fgets() expects parameter 1 to be resource, boolean given in /var/www/cacti/plugins/weathermap/weathermap-cacti-plugin-mgmt.php on line 861, referer: http://XXX.XXX.XXX.XXX/cacti/plugins/we ... n-mgmt.php


Weathermap version 0.98
PHP Version 5.3.3
PHP OS Linux
Cacti Version 0.8.8h
Cacti OS unix
SNMP Version NET-SNMP version: 5.5
RRDTool Version RRDTool 1.3.x

I had all graphs working don't want to recreate them again.. not sure what happened that caused above error.


Top
 Profile  
 
 Post subject: Re: cannot add graph in weathermap was working fine
PostPosted: Tue Oct 23, 2018 7:39 am 
Offline
Cacti Guru User
User avatar

Joined: Thu Sep 16, 2004 5:53 am
Posts: 5290
Location: United Kingdom
It thinks the file doesn't exist (or at least it couldn't open it).

What are the permissions for the file? Is it readable by the web server user?

_________________
Weathermap 0.98 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!)


Top
 Profile  
 
 Post subject: Re: cannot add graph in weathermap was working fine
PostPosted: Tue Oct 23, 2018 10:31 am 
Offline
Cacti Guru User

Joined: Sun Aug 27, 2017 12:05 am
Posts: 2073
Code should be checking for a false, but a false does normally mean that either the path is invalid or you have no access to that resource.

_________________
Official Cacti Developer

Cacti Resources:
Cacti Website (including releases)
Cacti Issues
Cacti Development Releases
Cacti Development Documentation

My resources:
How to submit Pull Requests
Development Wiki and How To's
Updated NetSNMP Memory template for Cacti 1.x
Cisco SFP template for Cacti 0.8.8


Top
 Profile  
 
 Post subject: Re: cannot add graph in weathermap was working fine
PostPosted: Tue Oct 23, 2018 11:10 am 
Offline
Cacti Guru User
User avatar

Joined: Thu Sep 16, 2004 5:53 am
Posts: 5290
Location: United Kingdom
Yep - the error checking could definitely be better (I thought it used is_readable() in the calling function actually), and so could the error message, but the cause seems to be either permissions (or possibly selinux).

If it's just for this one map, most likely permissions.

_________________
Weathermap 0.98 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!)


Top
 Profile  
 
 Post subject: Re: cannot add graph in weathermap was working fine
PostPosted: Tue Oct 23, 2018 2:20 pm 
Offline

Joined: Mon May 29, 2017 4:14 pm
Posts: 34
Thanks guys for response...
I have cacti cacti owning there directory
with chmod 777 ( i know it's not preferred) but that's the only way i can get my cacti to work...
Also I have added apache user to cacti group...
uid=48(apache) gid=48(apache) groups=48(apache),1000(cacti)

so that i don't need to change ownership...

It was working fine.. and current maps are update and working fine.. it's just when I try to add that's where it run into the issue...


Top
 Profile  
 
 Post subject: Re: cannot add graph in weathermap was working fine
PostPosted: Tue Oct 23, 2018 2:29 pm 
Offline

Joined: Mon May 29, 2017 4:14 pm
Posts: 34
JUst to clarify... when I click or ADD that's where I get hour glass it doesn't take me to list of maps at all...
and when I do tail -f error.log it crazy filling logs that eventually cacti died ..
then I need to remove error.log and restart httpd service to bring service back on...

Please check attached file...


Howie wrote:
Yep - the error checking could definitely be better (I thought it used is_readable() in the calling function actually), and so could the error message, but the cause seems to be either permissions (or possibly selinux).

If it's just for this one map, most likely permissions.


Attachments:
weathermap-add-map-issue-log-file.png
weathermap-add-map-issue-log-file.png [ 266.86 KiB | Viewed 241 times ]
weathermap-add-map-issue-screenshoot.png
weathermap-add-map-issue-screenshoot.png [ 99.33 KiB | Viewed 241 times ]
Top
 Profile  
 
 Post subject: Re: cannot add graph in weathermap was working fine
PostPosted: Tue Oct 23, 2018 3:25 pm 
Offline

Joined: Mon May 29, 2017 4:14 pm
Posts: 34
Issue resolved...
Thanks Guys...

I found ownership were changed for files in /configs folder... Not sure the reason...

I am running into another issue with weathermap ,, when other user (other than admin) access weathermap they can see map without any issue,,, but when they mouse over to see graph it doesn't load...
what I am missing now,,

THanks.


Top
 Profile  
 
 Post subject: Re: cannot add graph in weathermap was working fine
PostPosted: Tue Oct 23, 2018 4:26 pm 
Offline
Cacti Guru User
User avatar

Joined: Thu Sep 16, 2004 5:53 am
Posts: 5290
Location: United Kingdom
They need to have permission in Cacti to see the graphs too. Do they?

_________________
Weathermap 0.98 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!)


Top
 Profile  
 
 Post subject: Re: cannot add graph in weathermap was working fine
PostPosted: Tue Oct 23, 2018 4:27 pm 
Offline
Cacti Guru User
User avatar

Joined: Thu Sep 16, 2004 5:53 am
Posts: 5290
Location: United Kingdom
Are you saying you have a 300MB error log of just this message over and over?

Code:
[error] [client XXX.XXX.XXX.XXX] PHP Warning: fgets() expects parameter 1 to be resource, boolean given in /var/www/cacti/plugins/weathermap/weathermap-cacti-plugin-mgmt.php on line 861, referer: http://XXX.XXX.XXX.XXX/cacti/plugins/we ... n-mgmt.php

_________________
Weathermap 0.98 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!)


Top
 Profile  
 
 Post subject: Re: cannot add graph in weathermap was working fine
PostPosted: Tue Oct 23, 2018 4:29 pm 
Offline
Cacti Guru User
User avatar

Joined: Thu Sep 16, 2004 5:53 am
Posts: 5290
Location: United Kingdom
Also, it seems like you have found a bug if non-admin users can see the maps in the list above, since they are all accessible by admin only! :-)

_________________
Weathermap 0.98 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!)


Top
 Profile  
 
 Post subject: Re: cannot add graph in weathermap was working fine
PostPosted: Wed Oct 24, 2018 3:29 am 
Offline
Cacti Guru User

Joined: Sun Aug 27, 2017 12:05 am
Posts: 2073
Unless he was the admin?

_________________
Official Cacti Developer

Cacti Resources:
Cacti Website (including releases)
Cacti Issues
Cacti Development Releases
Cacti Development Documentation

My resources:
How to submit Pull Requests
Development Wiki and How To's
Updated NetSNMP Memory template for Cacti 1.x
Cisco SFP template for Cacti 0.8.8


Top
 Profile  
 
 Post subject: Re: cannot add graph in weathermap was working fine
PostPosted: Wed Oct 24, 2018 11:03 am 
Offline

Joined: Mon May 29, 2017 4:14 pm
Posts: 34
That got resolve after I fixed owndership on file under /configs .



Howie wrote:
Are you saying you have a 300MB error log of just this message over and over?

Code:
[error] [client XXX.XXX.XXX.XXX] PHP Warning: fgets() expects parameter 1 to be resource, boolean given in /var/www/cacti/plugins/weathermap/weathermap-cacti-plugin-mgmt.php on line 861, referer: http://XXX.XXX.XXX.XXX/cacti/plugins/we ... n-mgmt.php


Top
 Profile  
 
 Post subject: Re: cannot add graph in weathermap was working fine
PostPosted: Wed Oct 24, 2018 1:58 pm 
Offline

Joined: Mon May 29, 2017 4:14 pm
Posts: 34
Hi Howie,,,

I have allowed user to view map..
they can see map.. but mouse over to see graph doesn't load..

Not sure what I am missing,, Please check attached file


Attachments:
Weathermap-forotheruser-load.png
Weathermap-forotheruser-load.png [ 537.42 KiB | Viewed 223 times ]
Weathermap-forotheruser-permission.png
Weathermap-forotheruser-permission.png [ 10.07 KiB | Viewed 223 times ]
Top
 Profile  
 
 Post subject: Re: cannot add graph in weathermap was working fine
PostPosted: Wed Oct 24, 2018 3:19 pm 
Offline
Cacti Guru User
User avatar

Joined: Thu Sep 16, 2004 5:53 am
Posts: 5290
Location: United Kingdom
Does the user have permission in Cacti to view those graphs?

That is, if they clicked on the Graphs tab, can they see the same graphs?

All weathermap does is put an <IMG> tag in a box, with the Cacti graph URL in it.

_________________
Weathermap 0.98 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!)


Top
 Profile  
 
 Post subject: Re: cannot add graph in weathermap was working fine
PostPosted: Wed Oct 24, 2018 4:41 pm 
Offline

Joined: Mon May 29, 2017 4:14 pm
Posts: 34
Thanks Howie you the man,,
I deleted and recreate user.. and issue got fixed.. I made sure that user has graph access...

I have one graph that is 187% and I am getting following in my logs also warning sign on that map:

WEATHERMAP: Poller[0] WARNING: [Map 10] DMVPN110.conf: NewColourFromPercent: Clipped 182.798538264% to 100% for item DMVPN110-rrr3-4 [WMWARN33]

I have right bandwidth but would I need to add color for 101 - 999KEYPOS DEFAULT 1 1 Traffic Load
KEYTEXTCOLOR 0 0 0
KEYOUTLINECOLOR 0 0 0
KEYBGCOLOR 255 255 255
BGCOLOR 255 255 255
TITLECOLOR 0 0 0
TIMECOLOR 0 0 0
SCALE DEFAULT 0 0 192 192 192
SCALE DEFAULT 0 1 102 102 102
SCALE DEFAULT 1 10 140 0 255
SCALE DEFAULT 10 25 32 32 255
SCALE DEFAULT 25 40 0 192 255
SCALE DEFAULT 40 55 0 240 0
SCALE DEFAULT 55 70 240 240 0
SCALE DEFAULT 70 85 255 192 0
SCALE DEFAULT 85 100 255 0 0
SCALE DEFAULT 101 999 240 255 192


I did that but still same warning and logs


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 18 posts ]  Go to page 1, 2  Next

All times are UTC - 5 hours


Who is online

Users browsing this forum: No registered users and 2 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