-
Notifications
You must be signed in to change notification settings - Fork 170
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
php error : Call to a member function count() on a non-object in graph.php on line 1176 #343
Comments
Can you try and update to the latest version and retry. Not really sure what version you are running. |
sorry, i forgot to add, i am on master |
sorry, my mistake, i'm a few commit behind .. i will update my gweb and update the issue asap |
@vvuksan so, i can confirm that i am on master, with all php copied again to /ganglia .. the errors are: Thank you!! |
@vvuksan @adriansev did you figure out how to fix the issue with calling count on null? I am facing the same issue now with rrdtool v1.7 and gweb v3.7.4. apache2 error.log: Thanks for your help! |
The best thing to do is run the URL that was being invoked with &debug=5 It should give you the RRDtool command that is being run. Then execute that on the command line. |
@vvuksan Thanks for your prompt reply :) do we need to switch on the debugger in the config somewhere? running the url with &debug=5 still results in internal server error with the same error message about calling count on null at line 1164. |
It looks like you may need to just edit graph.php #343 (comment) and add e.g. error_log($command); then find out what exact command is being executed. |
@vvuksan Thanks for that. I tried to extract the command and run it on cmd line to see the output - but I am not sure if it is expected output as well. Btw, I do see this error message in the cmd line output for the xport tool cmd - I am not sure if that helps, but I also see another error log in apache2 which says Let me know if it doesn't help explain the issue. |
A little more looking into it gives an idea that it is probably because of rrdcached is not found because of which the $xml->data is empty which results into the count failing. any ideas about fixing the rrdcached not found issue? Thanks in advance. |
Do you have this configured in conf.php
? |
@vvuksan Yes it is set to |
Based on the error rrdcached is either not running or there is a mismatch between the socket permissions. You should check the gmetad rrdcached settings and ganglia web settings. |
One of the files - /tmp/rrdcached.sock that changed to root owner because of which gmetad stopped working briefly, but even after changing it back to nobody:nogroup it still complains about the same. All other files have the correct owner. Although, the issue with gmetad was no longer there and we could get the data flushed from rrdcached. |
@vvuksan so when it runs the rrdtool xport command in graph.php any idea what user and group it runs it as? is it www-data? or as ganglia user? It mostly seems like this is a permissions issue because of which it cannot access rrdcached |
@vvuksan Remove the rrdcached_socket from conf.php config and everything works fine are there any tradeoffs to consider in this case? |
Hi! I am trying to export to json a graphic and i get a 500 httpd error and this error message in logs:
PHP Fatal error: Call to a member function count() on a non-object in /var/www/html/ganglia/graph.php on line 1176
Does anyone have any idea about this?
Thank you!!!
The text was updated successfully, but these errors were encountered: