After installing grafana from the ports collection (make install clean), starting it with the default grafana.conf, changing the admin password, it fails to start again. syslog gives me the following message: May 7 09:04:56 SagaBOX grafana[7879]: panic: error getting work directory: stat .: permission denied May 7 09:04:56 SagaBOX grafana[7879]: May 7 09:04:56 SagaBOX grafana[7879]: goroutine 1 [running]: May 7 09:04:56 SagaBOX grafana[7879]: gopkg.in/macaron%2ev1.init.1() May 7 09:04:56 SagaBOX grafana[7879]: /usr/ports/www/grafana7/work/grafana-7.5.1/vendor/gopkg.in/macaron.v1/macaron.go:317 +0x110
Installing grafana7 from the package repo (pkg install grafana7) doesn't seem to make any difference.
The problem didn't seem to exist when booting the system. Only when issuing (one)start. Removing: /usr/bin/env ${grafana_env} from command_args in /usr/local/etc/rc.d/grafana seems to fix the problem for me.
I am seeing this also. If the `daemon` command is executed outside of `/root`, everything seems to run correctly. Perhaps a code release in grafana upstream has started trying to read the local directory. I've built up a new jail to confirm this is an issue outside of the first instance that I observed this. I've messaged the maintainer on the subject as well, but have not heard back yet.
Great observation. The daemon fails when executed within /root for me as well, but if I set f.i. chmod 755 /root ... the daemon executes from /root (cwd).
As of today 9/19/22 Following along the lines of not running the daemon from /root I find it better, in stead of editing the permissions of the root folder to simply redirect the daemon command to a different location If you edit /usr/local/etc/rc.d/grfana to include the line grafana_chdir="${grafana_homepath}" The daemon will not run in the /root directory
Note that this port expired today, does it also happen with www/grafana8 or www/grafana9 ?
I think this does also affect grafana9. I've put Nico's suggested addition into a patch on https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=267914 . I haven't tested grafana8.
Removed from the ports tree.