I have flashed a custom compiled OpenWrt SNAPSHOT image to my HomeHub 5A a couple hours ago and configured it from scartch knowing everything was working correctly but now I can't seem to open Graphs area under Stats in LuCI. It is showing the following error:
Failed to execute template dispatcher target for entry '/admin/statistics/graph'.
The called action terminated with an exception:
/usr/lib/lua/luci/template.lua:74: Failed to load template 'admin_statistics/index'.
Error while parsing template '/usr/lib/lua/luci/view/admin_statistics/index.htm':
Permission denied
stack traceback:
[C]: in function 'error'
/usr/lib/lua/luci/template.lua:74: in function '__init__'
/usr/lib/lua/luci/util.lua:65: in function 'Template'
/usr/lib/lua/luci/template.lua:27: in function 'render'
/usr/lib/lua/luci/dispatcher.lua:852: in function </usr/lib/lua/luci/dispatcher.lua:851>
I also did try to set up 0755 permission on the said template but the error is still persistent.
Done that but still the same error. Funny thing is the stats are being collected as usual and even I can change the settings and stats show up in the directory but Graphs are not being shown. I also tried to delete the index.html file and even after deleting the file the error still shows permission denied. Any clues?
Well /tmp/rrdimg does mot exist. I think it will be created when the graphs do appear, maybe? I created it anyway and the permission is 0755 but still no Graphs screen for me.
Well I would say no to that becasue everything was working and then after a few minutes it was not.
Well I was using LuCI so didnt need to write the /etc/config/luci_staistics by myself. But anyway I backed up the original config file and put one dummy file with basic config and one plugin and still the same error.
The collectd itself is working fine. But the problem is with Graphs only.
Edit: Since I am using ExtRoot it should be easy to firstboot the entire thing and see if it starts working with default config and if it does start working then I'll look for any errors in my config.
Some that points to some directory permission thing, I think.
You have modified the directories in use, so start looking for problem there.
Note that the data directory needs to be world-readable as the graph renderer in LuCI runs as the user "nobody". Actually the whole path leading to it needs to be. So I assume that /stats and /stats/collectd have 644 or more relaxed permissions.
Yes I do have 128mb of Flash but I use a 512 gb Hard drive with the router so I prefer ExtRoot.
I also suspected that but I gave them relaxed permissions, even 0777, but it didnt work. After that I just unplogged my external drive, rebooted the router and went back to check and everything started working so I think something was wrong with the ExtRoot maybe. But then I created another ExtRoot so I am doing okay now. I am going to keep this open for a couple of days to see how things work out and if something goes wrong again, I may return to this later.
Well the error happened again, I checked the permissions, they were default. never touched anything at all. I suspect something may be going on somewhere inside Luci Statistics.
Anyway, I unplugged ExtRoot again, rebooted without ExtRoot, copied everything from /rom, /usr, /proc to ExtRoot and when I rebooted it's working again, dont know for how long but we'll see.
I dont think the problem is within the config. I am using the same config as before, no changes except the directory is now /stats for collectd. rrd shows graphs from /tmp as usual and everything is working.
Well... just about everything else has been ruled out.... the graph code uses hostname and time..... to operate.... TZ mean't to suggest some erroneous clock skew.....
Only things that fit with your symptoms..... well... the cache code could too...... if if uses time...... you can disable the cache.... but I dunno how that would effect statistics specifically.....
One way to find out I suppose..... Glad to hear it's working.... Fingers crossed it stays that way....
I reckon next time set it up.... then do the extroot copy configuration.
I dont understand why timezone may have a problem with translating a webpage. I mean the error clearly indicates that it cant show a certain page becasue of the template and it says Permission denied error but in fact the permission seems okay from SSH.
So it is possible the permissions get screwed somehow for LuCI and it cant access the template for that reason and says "Permission denied". Maybe a bug somewhere? I am using a Snapshot build after all. Or maybe the Flash can be causing issues with the filesystem but it seems unlikely becasue no other problems have popped out yet.
Edit 3: Found the source of the issue. If I install luci-app-vpn-policy-routing then the graphs screen throws permission denied error and wont show any graphs. I am not sure why it is doing it but maybe something gets broken if you are using ExtRoot and install a LuCI based package into ExtRoot. It could be a bug but I am not sure.
Had exact same issue and via GUI uninstalled "luci-app-statistics" (without dependencies checked) then reboot, installed it again and rebooted. Seems to be working now.
Yes, I was about to edit my last reply becasue I fixed it by force reinstalling it. RRD graphs were not working for me either so a force reinstall did the trick anyway. But as of right now, I am using the stable builds, too many bugs for daily use in Snapshots and I need a stable connection for a few weeks. Thanks for confirming though.
FWIW: I updated to Davidc502's build "OpenWrt SNAPSHOT r9886-399aa0b933 / LuCI Master (f138fc93)" when I experience the issue so maybe it was the same Snapshot.