briangann / grafana-gauge-panel

D3 Based Gauge Panel for Grafana 6.x and Higher
MIT License
57 stars 24 forks source link

Failed to install plugin #106

Closed big-col closed 8 months ago

big-col commented 9 months ago

Hi, im getting error 'Failed to install plugin' when i try and install on Grafana v10.3.3 (252761264e)

briangann commented 9 months ago

i'm not seeing this, do you have logs showing the error?

i'm running with with 10.3.3

image

image

big-col commented 9 months ago

Hi Brian, the IP ID of my Raspberry Pi is 192.168.1.40. 1.39 is mentioned in the logs below?

logs: logger=context` userId=1 orgId=1 uname=admin t=2024-03-04T16:42:42.743123666Z level=info msg="Request Completed" method=GET path=/api/live/ws status=-1 remote_addr=192.168.1.39 time_ms=9 duration=9.176209ms size=0 referer= handler=/api/l> logger=context userId=1 orgId=1 uname=admin t=2024-03-04T16:42:43.628988471Z level=info msg="Request Completed" method=GET path=/api/plugins/briangann-gauge-panel/markdown/README status=404 remote_addr=192.168.1.39 time_ms=45 duration=4> <permission denied, make sure you have write access to plugin dir" remote_addr=192.168.1.39 traceID= logger=context userId=1 orgId=1 uname=admin t=2024-03-04T16:42:45.802957502Z level=error msg="Request Completed" method=POST path=/api/plugins/briangann-gauge-panel/install status=500 remote_addr=192.168.1.39 time_ms=468 duration=468.99>

briangann commented 8 months ago

this looks like the permissions on the pi are not quite right to be able to install plugins.

check /var/lib/grafana/plugins for ownership and permissions (i believe it should be uid 472, and writable), mine looks like this:

drwxr-xr-x  5 grafana grafana   4096 Jan  9  2019 .
drwxr-xr-x 57 root    root      4096 May 12  2023 ..
-rw-r-----  1 grafana grafana 409600 Jan  9  2019 grafana.db
drwxr-x---  2 grafana grafana   4096 Jan  9  2019 plugins
drwx------  2 grafana grafana   4096 Jan  9  2019 png
drwx------ 18 grafana grafana   4096 Jan  9  2019 sessions

(the address 1.39 is probably from your browser)

big-col commented 8 months ago

mine is:

pi@openplotter:/var/lib/grafana $ ls -l total 1036 drwxr-x--- 3 grafana grafana 4096 Feb 25 10:42 alerting drwx------ 2 grafana grafana 4096 Feb 25 10:42 csv -rw-r----- 1 grafana grafana 1040384 Mar 5 20:32 grafana.db drwxr-xr-x 3 root root 4096 Feb 25 10:41 plugins drwx------ 2 grafana grafana 4096 Feb 25 10:42 png

big-col commented 8 months ago

tried 472, same result. tried 777 - plugin installed! reverted back to 472

thanks :)

briangann commented 8 months ago

looks like the path is owned by root - you can change that chown -R grafana:grafana /var/lib/grafana/plugins and the permissions will work in the future. not sure why it was set to root:root

big-col commented 8 months ago

re booted Pi, grafana webpage cant be reached

big-col commented 8 months ago

oops, grafana process needed restarting....Plugin working, thank you!

briangann commented 8 months ago

great to hear!