Grafana not starting on RPi: ELF load command address/offset not page-aligned

  • What Grafana version and what operating system are you using?
 $  cat /etc/os-release
PRETTY_NAME="Debian GNU/Linux 12 (bookworm)"
NAME="Debian GNU/Linux"
VERSION_ID="12"
VERSION="12 (bookworm)"
VERSION_CODENAME=bookworm

Grafana version: 11.0.0

  • What are you trying to achieve?
    Start Grafana after installation

  • How are you trying to achieve it?

sudo /bin/systemctl start grafana-server
  • What happened?
 $ sudo /bin/systemctl status grafana-server
× grafana-server.service - Grafana instance
     Loaded: loaded (/lib/systemd/system/grafana-server.service; disabled; preset: enabled)
     Active: failed (Result: exit-code) since Tue 2024-06-11 12:26:55 CEST; 235ms ago
   Duration: 1ms
       Docs: http://docs.grafana.org
    Process: 15490 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.data=${DATA_DIR} cfg:default.paths.plugins=${PLUGINS_DIR} cfg:default.paths.provision>
   Main PID: 15490 (code=exited, status=127)
        CPU: 1ms

Jun 11 12:26:55 Automation systemd[1]: grafana-server.service: Scheduled restart job, restart counter is at 5.
Jun 11 12:26:55 Automation systemd[1]: Stopped grafana-server.service - Grafana instance.
Jun 11 12:26:55 Automation systemd[1]: grafana-server.service: Start request repeated too quickly.
Jun 11 12:26:55 Automation systemd[1]: grafana-server.service: Failed with result 'exit-code'.
Jun 11 12:26:55 Automation systemd[1]: Failed to start grafana-server.service - Grafana instance.
  • Did you receive any errors in the Grafana UI or in related logs? If so, please tell us exactly what they were.
    The folder /var/log/grafana is empty. No log file inside.
    The file /etc/grafana/grafana.ini has no Logging [log] section. A added ;level = info but the folder /var/log/grafana is still empty.

  • Did you follow any online instructions? If so, what is the URL?
    Install Grafana on Raspberry Pi | Grafana Labs

use journalctl -u grafana for logs

$ journalctl -u grafana
-- No entries --

journalctl -u grafana-server

Jun 11 14:50:08 Automation systemd[1]: Started grafana-server.service - Grafana instance.
Jun 11 14:50:08 Automation systemd[1]: grafana-server.service: Main process exited, code=exited, status=127/n/a
Jun 11 14:50:08 Automation grafana-server[27519]: /usr/sbin/grafana-server: error while loading shared libraries: libpthread.so.0: ELF load command address/offset not page-aligned
Jun 11 14:50:08 Automation systemd[1]: grafana-server.service: Failed with result 'exit-code'.
Jun 11 14:50:08 Automation systemd[1]: grafana-server.service: Scheduled restart job, restart counter is at 1.
Jun 11 14:50:08 Automation systemd[1]: Stopped grafana-server.service - Grafana instance.
Jun 11 14:50:08 Automation systemd[1]: Started grafana-server.service - Grafana instance.
Jun 11 14:50:08 Automation grafana-server[27521]: /usr/sbin/grafana-server: error while loading shared libraries: libpthread.so.0: ELF load command address/offset not page-aligned
Jun 11 14:50:08 Automation systemd[1]: grafana-server.service: Main process exited, code=exited, status=127/n/a
Jun 11 14:50:08 Automation systemd[1]: grafana-server.service: Failed with result 'exit-code'.
Jun 11 14:50:08 Automation systemd[1]: grafana-server.service: Scheduled restart job, restart counter is at 2.
Jun 11 14:50:08 Automation systemd[1]: Stopped grafana-server.service - Grafana instance.
Jun 11 14:50:08 Automation systemd[1]: Started grafana-server.service - Grafana instance.
Jun 11 14:50:08 Automation grafana-server[27523]: /usr/sbin/grafana-server: error while loading shared libraries: libpthread.so.0: ELF load command address/offset not page-aligned
Jun 11 14:50:08 Automation systemd[1]: grafana-server.service: Main process exited, code=exited, status=127/n/a
Jun 11 14:50:08 Automation systemd[1]: grafana-server.service: Failed with result 'exit-code'.
Jun 11 14:50:08 Automation systemd[1]: grafana-server.service: Scheduled restart job, restart counter is at 3.
Jun 11 14:50:08 Automation systemd[1]: Stopped grafana-server.service - Grafana instance.
Jun 11 14:50:08 Automation systemd[1]: Started grafana-server.service - Grafana instance.
Jun 11 14:50:08 Automation grafana-server[27524]: /usr/sbin/grafana-server: error while loading shared libraries: libpthread.so.0: ELF load command address/offset not page-aligned
Jun 11 14:50:08 Automation systemd[1]: grafana-server.service: Main process exited, code=exited, status=127/n/a
Jun 11 14:50:08 Automation systemd[1]: grafana-server.service: Failed with result 'exit-code'.
Jun 11 14:50:08 Automation systemd[1]: grafana-server.service: Scheduled restart job, restart counter is at 4.
Jun 11 14:50:08 Automation systemd[1]: Stopped grafana-server.service - Grafana instance.
Jun 11 14:50:08 Automation systemd[1]: Started grafana-server.service - Grafana instance.
Jun 11 14:50:08 Automation grafana-server[27525]: /usr/sbin/grafana-server: error while loading shared libraries: libpthread.so.0: ELF load command address/offset not page-aligned
Jun 11 14:50:08 Automation systemd[1]: grafana-server.service: Main process exited, code=exited, status=127/n/a
Jun 11 14:50:08 Automation systemd[1]: grafana-server.service: Failed with result 'exit-code'.
Jun 11 14:50:09 Automation systemd[1]: grafana-server.service: Scheduled restart job, restart counter is at 5.
Jun 11 14:50:09 Automation systemd[1]: Stopped grafana-server.service - Grafana instance.
Jun 11 14:50:09 Automation systemd[1]: grafana-server.service: Start request repeated too quickly.
Jun 11 14:50:09 Automation systemd[1]: grafana-server.service: Failed with result 'exit-code'.
Jun 11 14:50:09 Automation systemd[1]: Failed to start grafana-server.service - Grafana instance.

So you have error:

grafana-server: error while loading shared libraries: libpthread.so.0: ELF load command address/offset not page-aligned

Ask your grafana package provider if it is really compiled for your OS.

You mean there is no grafana package for debian 12 (bookworm)?

so you are running this Debian Linux on a rpi?

How did you install Grafana?

yes

I used this guide…

same issue

you tried it just now that fast?

yes :grinning:

1 Like

probably skipped something :crazy_face::rofl:

my bet: Several shared libraries on 32-bit Bookworm are linked with 4K page alignment producing fails in systemd-nspawn · Issue #120 · raspberrypi/bookworm-feedback · GitHub

Unfortunately, I’m not a professional. What i have to do?
Add kernel=kernel8.img to file /boot/firmware/config.txt? But I didn’t find any “kernel8.img” in folder /boot/firmware.

I don’t know. That’s not Grafana problem, but RPI problem → RPI forum will be better to ask