Bug 255676 - www/grafana7 fails to start for a second time
Summary: www/grafana7 fails to start for a second time
Status: New
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Only Me
Assignee: Bartek Rutkowski
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2021-05-07 07:15 UTC by Simeon Simeonov
Modified: 2023-07-29 06:22 UTC (History)
6 users (show)

See Also:
drtr0jan: maintainer-feedback-


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Simeon Simeonov 2021-05-07 07:15:20 UTC
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
Comment 1 Simeon Simeonov 2021-05-07 08:01:48 UTC
Installing grafana7 from the package repo (pkg install grafana7) doesn't seem to make any difference.
Comment 2 Simeon Simeonov 2021-05-09 11:24:46 UTC
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.
Comment 3 Zach Leslie freebsd_committer freebsd_triage 2021-05-12 18:19:11 UTC
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.
Comment 4 Simeon Simeonov 2021-05-18 08:03:58 UTC
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).
Comment 5 Nico Wiseman 2022-09-19 21:29:16 UTC
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
Comment 6 Rene Ladan freebsd_committer freebsd_triage 2022-11-07 09:42:26 UTC
Note that this port expired today, does it also happen with www/grafana8 or www/grafana9 ?
Comment 7 Jony Hudson 2022-11-21 23:51:16 UTC
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.
Comment 8 Boris Korzun 2023-07-12 18:26:07 UTC
Removed from the ports tree.