dinger1986 / TRMM-Grafana

Grafana Dashboards setup and preconfigured to work with Tactical RMM
30 stars 17 forks source link

permission denied on install #29

Closed twixwix closed 1 year ago

twixwix commented 1 year ago

I have red some of the other issues and did some troubleshooting on my own but in the end with no other results. When I finished the installation and quickly check the log it always shows up the same error

logger=http.server t=2023-01-01T13:10:04.680665551Z level=info msg="HTTP Server Listen" address=[::]:3000 protocol=https subUrl= socket= logger=server t=2023-01-01T13:10:04.680710706Z level=error msg="Stopped background service" service=*api.HTTPServer reason="open /etc/letsencrypt/live/sub.mydomain.ch/fullchain.pem: permission denied" logger=tracing t=2023-01-01T13:10:04.680774275Z level=info msg="Closing tracing" logger=infra.usagestats.collector t=2023-01-01T13:10:04.681216292Z level=error msg="Failed to get system stats" error="context canceled" logger=server t=2023-01-01T13:10:04.83900779Z level=error msg="Server shutdown" error="*api.HTTPServer run error: open /etc/letsencrypt/live/sub.mydomain.ch/fullchain.pem: permission denied"

In the end I think the wrong user is trying to access the certificate.. but in the end I am not really sure about that. During the script I enter the same user as used for the TRMM installation "tactical".

twixwix commented 1 year ago

When I do the trmm installation as new user "grafana" it works but I get some real errors on the main installation. Is there an error in the script that entered user is not used?

dinger1986 commented 1 year ago

I have messaged on discord as keen to chat about what you have done

dinger1986 commented 1 year ago

issue resolved, grafana service is set to run as the tactical user, swapped it now and it works fine, the username was ignored for the service which is shouldnt have been