Grafana fails (and other additonal packagers) from Openhabian image

  • Platform information:
    • Hardware: RPI4 -4GBRAM
    • OS: Openhabian 1.6
    • Java Runtime Environment: Azul 8
    • openHAB version: stable

Hello, I wanted to migrate to full USB boot on my RPI4- as a linux noob. I backedup my config then imaged the Openhabian 1.6 on a SD card and ran it and installed initial updates etc. so it boots. Then I copied this with SD Card copier form another Linux machine to USB drive. It boots fine from the USB drive. I then installed mqtt from openhabian-config- but that gave me also errors during install- it did not complete which I could fix with this
[Openhabian - Mosquitto MQTT failed to start]
So my mqtt is now working (THX @mstormi )

Now I wanted to setup Grafana and influxdb. I actually did this before I restored my backup and I saw the “grafana” page other the openhab start screen on 8080. So it seemed to have worked before the backup. After the backup- the grafana window does not show up on 8080.
I tried “fix permissions” and reinstall grafana and Influx from openhabian-config -but it is not working, it errors out. I have no idea… I am not a linux guy… if anyone could give me a hint - that be awesome!

cheers

:09:31] openhabian@openhab:~$ sudo systemctl status grafana-server.service
● grafana-server.service - Grafana instance
   Loaded: loaded (/usr/lib/systemd/system/grafana-server.service; enabled; vendor preset: enabled)
   Active: failed (Result: exit-code) since Sun 2020-11-29 18:09:15 CET; 32s ago
     Docs: http://docs.grafana.org
  Process: 10012 ExecStart=/usr/sbin/grafana-server --config=${CONF_FILE} --pidfile=${PID_FILE_DIR}/grafana-server.pid --packaging=deb cfg:default.paths.logs=${LOG_DIR} cfg:default.paths.da
 Main PID: 10012 (code=exited, status=1/FAILURE)

Nov 29 18:09:15 openhab systemd[1]: grafana-server.service: Service RestartSec=100ms expired, scheduling restart.
Nov 29 18:09:15 openhab systemd[1]: grafana-server.service: Scheduled restart job, restart counter is at 5.
Nov 29 18:09:15 openhab systemd[1]: Stopped Grafana instance.
Nov 29 18:09:15 openhab systemd[1]: grafana-server.service: Start request repeated too quickly.
Nov 29 18:09:15 openhab systemd[1]: grafana-server.service: Failed with result 'exit-code'.
Nov 29 18:09:15 openhab systemd[1]: Failed to start Grafana instance.

Nov 29 17:44:17 openhab systemd[1]: grafana-server.service: Failed with result 'exit-code'.
Nov 29 17:44:17 openhab systemd[1]: grafana-server.service: Service RestartSec=100ms expired, scheduling restart.
Nov 29 17:44:17 openhab systemd[1]: grafana-server.service: Scheduled restart job, restart counter is at 5.
Nov 29 17:44:17 openhab systemd[1]: Stopped Grafana instance.
Nov 29 17:44:17 openhab systemd[1]: grafana-server.service: Start request repeated too quickly.

Check if there is any grafana related output in

sudo journalctl

that gives any hint.

Hmm… thank you looks like a permissions issue… I had a few of those… … Linux is a mystery to me…

sudo chown grafana /var/log/grafana /opt/zram/log.bind/grafana

…this fixed it… it did it similar to the mosquitto fix…

Thank you for the tip – before:

 Started Grafana instance.
Nov 29 17:44:15 openhab grafana-server[8238]: Failed to start grafana. error: failed to create log directory "/var/log/grafana": mkdir /var/log/grafana: permission denied
Nov 29 17:44:15 openhab systemd[1]: grafana-server.service: Main process exited, code=exited, status=1/FAILURE
Nov 29 17:44:15 openhab systemd[1]: grafana-server.service: Failed with result 'exit-code'.
Nov 29 17:44:15 openhab systemd[1]: grafana-server.service: Service RestartSec=100ms expired, scheduling restart.
Nov 29 17:44:15 openhab systemd[1]: grafana-server.service: Scheduled restart job, restart counter is at 1.

after

sudo systemctl status grafana-server.service
● grafana-server.service - Grafana instance
   Loaded: loaded (/usr/lib/systemd/system/grafana-server.service; enabled; vendor preset: enabled)
   Active: active (running) since Sun 2020-11-29 19:46:21 CET; 12s ago
     Docs: http://docs.grafana.org
 Main PID: 13426 (grafana-server)
    Tasks: 10 (limit: 4915)
   CGroup: /system.slice/grafana-server.service
           └─13426 /usr/sbin/grafana-server --config=/etc/grafana/grafana.ini --pidfile=/var/run/grafana/grafana-server.pid --packaging=deb cfg:default.paths.logs=/var/log/grafana cfg:defau

Nov 29 19:46:21 openhab grafana-server[13426]: t=2020-11-29T19:46:21+0100 lvl=info msg="Path Logs" logger=settings path=/var/log/grafana
Nov 29 19:46:21 openhab grafana-server[13426]: t=2020-11-29T19:46:21+0100 lvl=info msg="Path Plugins" logger=settings path=/var/lib/grafana/plugins
Nov 29 19:46:21 openhab grafana-server[13426]: t=2020-11-29T19:46:21+0100 lvl=info msg="Path Provisioning" logger=settings path=/etc/grafana/provisioning