Grafana not reachable after setup/ reboot

Installed OH3 freshly incl. InfluxDB/Grafana. Working well and set first graph. Rebooted after a while the Raspberry Pie and finally not able any longer to enter localhost:3000 (site not reachable). Any idea how to solve? A 2nd install of Grafana failed btw.

What are the error messages during re-install resp. during startup ?
Any information either in /var/log/syslog or via command: sudo journalctl -xe

issue is reproducible.

  1. Complete fresh OH 3.0.0 (openhabian 1.6.2, RPi4, SSD).

  2. Installing directly afterwards grafana+influxdb (via openhabian) + influxdb persistence.
    → Access to grafanfa via ip:3000 possible

  3. Reboot RPi4
    → No access any longer to ip:3000

checked the status - instance is not started

**[09:36:47]** **root@openHABianDevice**:**/home/openhabian**# sudo systemctl status grafana-server
**●** grafana-server.service - Grafana instance
Loaded: loaded (/lib/systemd/system/grafana-server.service; enabled; vendor p
Active: **failed** (Result: exit-code) since Wed 2020-12-23 09:33:01 CET; 3min 56
Docs: http://docs.grafana.org
Process: 1098 ExecStart=/usr/sbin/grafana-server --config=${CONF_FILE} --pidfi
Main PID: 1098 (code=exited, status=1/FAILURE)
Dec 23 09:33:01 openHABianDevice systemd[1]: grafana-server.service: Service Res
Dec 23 09:33:01 openHABianDevice systemd[1]: grafana-server.service: Scheduled r
Dec 23 09:33:01 openHABianDevice systemd[1]: Stopped Grafana instance.
Dec 23 09:33:01 openHABianDevice systemd[1]: **grafana-server.service: Start reque**
Dec 23 09:33:01 openHABianDevice systemd[1]: **grafana-server.service: Failed with**
Dec 23 09:33:01 openHABianDevice systemd[1]: **Failed to start Grafana instance.**
**[09:38:42]** **root@openHABianDevice**:**/home/openhabian**# sudo journalctl | grep grafana
Dec 23 09:32:58 openHABianDevice **grafana**-server[913]: Failed to start **grafana**. error: failed to create log directory "/var/log/**grafana**": mkdir /var/log/**grafana**: permission denied
Dec 23 09:32:58 openHABianDevice systemd[1]: **grafana**-server.service: Main process exited, code=exited, status=1/FAILURE
Dec 23 09:32:58 openHABianDevice systemd[1]: **grafana**-server.service: Failed with result 'exit-code'.
Dec 23 09:32:59 openHABianDevice systemd[1]: **grafana**-server.service: Service RestartSec=100ms expired, scheduling restart.
Dec 23 09:32:59 openHABianDevice systemd[1]: **grafana**-server.service: Scheduled restart job, restart counter is at 1.
Dec 23 09:32:59 openHABianDevice **grafana**-server[1024]: Failed to start **grafana**. error: failed to create log directory "/var/log/**grafana**": mkdir /var/log/**grafan**: permission denied
Dec 23 09:32:59 openHABianDevice systemd[1]: **grafana**-server.service: Main process exited, code=exited, status=1/FAILURE
Dec 23 09:32:59 openHABianDevice systemd[1]: **grafana**-server.service: Failed with result 'exit-code'.
Dec 23 09:33:00 openHABianDevice systemd[1]: **grafana**-server.service: Service RestartSec=100ms expired, scheduling restart.
Dec 23 09:33:00 openHABianDevice systemd[1]: **grafana**-server.service: Scheduled restart job, restart counter is at 2.
Dec 23 09:33:00 openHABianDevice **grafana**-server[1057]: Failed to start **grafana**. error: failed to create log directory "/var/log/**grafana**": mkdir /var/log/**grafan**: permission denied
Dec 23 09:33:00 openHABianDevice systemd[1]: **grafana**-server.service: Main process exited, code=exited, status=1/FAILURE
Dec 23 09:33:00 openHABianDevice systemd[1]: **grafana**-server.service: Failed with result 'exit-code'.
Dec 23 09:33:00 openHABianDevice systemd[1]: **grafana**-server.service: Service RestartSec=100ms expired, scheduling restart.
Dec 23 09:33:00 openHABianDevice systemd[1]: **grafana**-server.service: Scheduled restart job, restart counter is at 3.
Dec 23 09:33:00 openHABianDevice **grafana**-server[1082]: Failed to start **grafana**. error: failed to create log directory "/var/log/**grafana**": mkdir /var/log/**grafan**: permission denied
Dec 23 09:33:00 openHABianDevice systemd[1]: **grafana**-server.service: Main process exited, code=exited, status=1/FAILURE
Dec 23 09:33:00 openHABianDevice systemd[1]: **grafana**-server.service: Failed with result 'exit-code'.
Dec 23 09:33:01 openHABianDevice systemd[1]: **grafana**-server.service: Service RestartSec=100ms expired, scheduling restart.
Dec 23 09:33:01 openHABianDevice systemd[1]: **grafana**-server.service: Scheduled restart job, restart counter is at 4.
Dec 23 09:33:01 openHABianDevice **grafana**-server[1098]: Failed to start **grafana**. error: failed to create log directory "/var/log/**grafana**": mkdir /var/log/**grafan**: permission denied
Dec 23 09:33:01 openHABianDevice systemd[1]: **grafana**-server.service: Main process exited, code=exited, status=1/FAILURE
Dec 23 09:33:01 openHABianDevice systemd[1]: **grafana**-server.service: Failed with result 'exit-code'.
Dec 23 09:33:01 openHABianDevice systemd[1]: **grafana**-server.service: Service RestartSec=100ms expired, scheduling restart.
Dec 23 09:33:01 openHABianDevice systemd[1]: **grafana**-server.service: Scheduled restart job, restart counter is at 5.
Dec 23 09:33:01 openHABianDevice systemd[1]: **grafana**-server.service: Start request repeated too quickly.
Dec 23 09:33:01 openHABianDevice systemd[1]: **grafana**-server.service: Failed with result 'exit-code'.
Dec 23 09:34:15 openHABianDevice sudo[1705]: openhabian : TTY=pts/0 ; PWD=/home/openhabian ; USER=root ; COMMAND=/usr/bin/systemctl status **grafana**-server
Dec 23 09:34:47 openHABianDevice sudo[2099]: openhabian : TTY=pts/0 ; PWD=/home/openhabian ; USER=root ; COMMAND=/usr/bin/journalctl -xu **grafana**
Dec 23 09:36:58 openHABianDevice sudo[2514]: root : TTY=pts/0 ; PWD=/home/openhabian ; USER=root ; COMMAND=/usr/bin/systemctl status **grafana**-server

Hi, same issue here. And i had a similar issue with mosquitto.
Fix for mosquitto: click here

To fix grafana, this worked for me:
sudo mkdir -p /var/log/grafana /opt/zram/log.bind/grafana
sudo chown grafana /var/log/grafana /opt/zram/log.bind/grafana
sudo systemctl start grafana-server
Create /lib/systemd/system/grafana-server.service.d/override.conf and insert

[Unit]
After=network-online.target zram-config.service
Wants=network-online.target zram-config.service

Hope this will help you!

Best regards

2 Likes

thank you!

This topic was automatically closed 41 days after the last reply. New replies are no longer allowed.