Grafana won't start on Raspberry Pi

Hello,

I have tried running grafana on a Raspberry Pi Model B Rev 2. Installation was successful but when trying to start it up the start up fails. I can’t get to the Dashboard at port 3000.

/var/log/syslog contains the following entries:
Jul 3 08:53:21 openHABianPi systemd[1]: Stopped Grafana instance.
Jul 3 08:53:21 openHABianPi systemd[1]: Started Grafana instance.
Jul 3 08:53:21 openHABianPi systemd[1]: grafana-server.service: Main process exited, code=killed, status=4/ILL
Jul 3 08:53:21 openHABianPi systemd[1]: grafana-server.service: Unit entered failed state.
Jul 3 08:53:21 openHABianPi systemd[1]: grafana-server.service: Failed with result ‘signal’.
Jul 3 08:53:21 openHABianPi systemd[1]: grafana-server.service: Service hold-off time over, scheduling restart.
Jul 3 08:53:21 openHABianPi systemd[1]: Stopped Grafana instance.
Jul 3 08:53:21 openHABianPi systemd[1]: Started Grafana instance.
Jul 3 08:53:21 openHABianPi systemd[1]: grafana-server.service: Main process exited, code=killed, status=4/ILL
Jul 3 08:53:21 openHABianPi systemd[1]: grafana-server.service: Unit entered failed state.
Jul 3 08:53:21 openHABianPi systemd[1]: grafana-server.service: Failed with result ‘signal’.
Jul 3 08:53:22 openHABianPi systemd[1]: grafana-server.service: Service hold-off time over, scheduling restart.
Jul 3 08:53:22 openHABianPi systemd[1]: Stopped Grafana instance.
Jul 3 08:53:22 openHABianPi systemd[1]: grafana-server.service: Start request repeated too quickly.
Jul 3 08:53:22 openHABianPi systemd[1]: Failed to start Grafana instance.
Jul 3 08:53:22 openHABianPi systemd[1]: grafana-server.service: Unit entered failed state.
Jul 3 08:53:22 openHABianPi systemd[1]: grafana-server.service: Failed with result ‘signal’.
Jul 3 08:53:46 openHABianPi systemd[1]: Reloading.

Any clue about how I start it up?

Hello,
I’m not sure. But You can start grafana by root account and check result.

First my Raspberry is:

Platform = Raspberry Pi Model B Plus Rev 1.2

Uptime = 1 day(s). 23:36:57

Then I’m trying to start Grafana by typing: sudo service grafana-server start

And this is the result in the system log /var/log/syslog
File: syslog

Jul 4 09:11:50 openHABianPi systemd[1]: Started Grafana instance.
Jul 4 09:11:50 openHABianPi systemd[1]: grafana-server.service: Main process exited, code=killed, status=4/ILL
Jul 4 09:11:50 openHABianPi systemd[1]: grafana-server.service: Unit entered failed state.
Jul 4 09:11:50 openHABianPi systemd[1]: grafana-server.service: Failed with result ‘signal’.
Jul 4 09:11:50 openHABianPi systemd[1]: grafana-server.service: Service hold-off time over, scheduling restart.
Jul 4 09:11:50 openHABianPi systemd[1]: Stopped Grafana instance.
Jul 4 09:11:50 openHABianPi systemd[1]: Started Grafana instance.
Jul 4 09:11:50 openHABianPi systemd[1]: grafana-server.service: Main process exited, code=killed, status=4/ILL
Jul 4 09:11:50 openHABianPi systemd[1]: grafana-server.service: Unit entered failed state.
Jul 4 09:11:50 openHABianPi systemd[1]: grafana-server.service: Failed with result ‘signal’.
Jul 4 09:11:51 openHABianPi systemd[1]: grafana-server.service: Service hold-off time over, scheduling restart.
Jul 4 09:11:51 openHABianPi systemd[1]: Stopped Grafana instance.
Jul 4 09:11:51 openHABianPi systemd[1]: Started Grafana instance.
Jul 4 09:11:51 openHABianPi systemd[1]: grafana-server.service: Main process exited, code=killed, status=4/ILL
Jul 4 09:11:51 openHABianPi systemd[1]: grafana-server.service: Unit entered failed state.
Jul 4 09:11:51 openHABianPi systemd[1]: grafana-server.service: Failed with result ‘signal’.
Jul 4 09:11:51 openHABianPi systemd[1]: grafana-server.service: Service hold-off time over, scheduling restart.
Jul 4 09:11:51 openHABianPi systemd[1]: Stopped Grafana instance.
Jul 4 09:11:51 openHABianPi systemd[1]: Started Grafana instance.
Jul 4 09:11:51 openHABianPi systemd[1]: grafana-server.service: Main process exited, code=killed, status=4/ILL
Jul 4 09:11:51 openHABianPi systemd[1]: grafana-server.service: Unit entered failed state.
Jul 4 09:11:51 openHABianPi systemd[1]: grafana-server.service: Failed with result ‘signal’.
Jul 4 09:11:51 openHABianPi systemd[1]: grafana-server.service: Service hold-off time over, scheduling restart.
Jul 4 09:11:51 openHABianPi systemd[1]: Stopped Grafana instance.
Jul 4 09:11:51 openHABianPi systemd[1]: grafana-server.service: Start request repeated too quickly.
Jul 4 09:11:51 openHABianPi systemd[1]: Failed to start Grafana instance.
Jul 4 09:11:51 openHABianPi systemd[1]: grafana-server.service: Unit entered failed state.
Jul 4 09:11:51 openHABianPi systemd[1]: grafana-server.service: Failed with result ‘signal’.

What ARM build of Grafana are you using and what distro?

Marcus

Openhabian running in background Debian and I’ve installed Debian(ARMv7) version of Grafana grafana_5.2.1_armhf.deb

Does it work better using systemd?

systemctl daemon-reload
systemctl start grafana-server
systemctl status grafana-server

I can’t pass systemctl daemon-reload it ask for a password, I enter my system password and that’s what I get:
polkit-agent-helper-1: pam_authenticate failed: Authentication failure
==== AUTHENTICATION FAILED ===
Failed to reload daemon: Access denied

Is it the same password has for login into a session by SSH?

OK I was able by using sudo before each command… here is the result:

● grafana-server.service - Grafana instance
Loaded: loaded (/usr/lib/systemd/system/grafana-server.service; enabled; vendor preset: enabled)
Active: failed (Result: signal) since Thu 2018-07-05 08:16:53 EDT; 10s ago
Docs: http://docs.grafana.org
Process: 28007 ExecStart=/usr/sbin/grafana-server --config={CONF_FILE} --pidfile={PID_FILE_DIR}/grafana-server.pid
Main PID: 28007 (code=killed, signal=ILL)

Jul 05 08:16:52 openHABianPi systemd[1]: grafana-server.service: Failed with result ‘signal’.
Jul 05 08:16:53 openHABianPi systemd[1]: grafana-server.service: Service hold-off time over, scheduling restart.
Jul 05 08:16:53 openHABianPi systemd[1]: Stopped Grafana instance.
Jul 05 08:16:53 openHABianPi systemd[1]: grafana-server.service: Start request repeated too quickly.
Jul 05 08:16:53 openHABianPi systemd[1]: Failed to start Grafana instance.
Jul 05 08:16:53 openHABianPi systemd[1]: grafana-server.service: Unit entered failed state.
Jul 05 08:16:53 openHABianPi systemd[1]: grafana-server.service: Failed with result ‘signal’.

Okay. I would recommend you try to start without init.d/systemd and just start the binary, like

./usr/sbin/grafana-server --config=/etc/grafana/grafana.ini

Are there any logs generated in /var/log/grafana?

Marcus

I’ve de-installed Grafana…

And that worked or what?

Marcus

I’ve seen this error too. The error is a result of trying to use your ARMv7 binary on ARMv6. All the quad-core Pi’s (2, 3 and 3+) are v7 while the single-core (A, B, and Zero) are v6. Installation works fine since Raspbian is “armhf”, however the binary will get a SIGKILL due to illegal instructions.

Could you please make the binary ARMv6 compatible to allow use on all Raspberry Pi’s? It’s as easy as adding GOARM=6 to your build environment. I believe the performance won’t be affected much (as all of Raspbian, the official Pi OS, is built that way). The former fg2it binaries were built that way too, however he has discontinued updates after official binaries for ARM became available.

There’s an open feature request.