3

I'm trying to run Grafana on my Raspberry Pi 3 with docker. My docker-compose entry for it is pretty straightforward:

version: '3.7'

services:  
grafana:
    container_name: grafana
    image: grafana/grafana
    restart: always
    ports:
      - "3000:3000"

But the container stops shortly after start with " /run.sh: line 80: /usr/share/grafana/bin/grafana-server: No such file or directory". Opening a terminal in a copy of the container per https://stackoverflow.com/a/39329138/6252186 shows that the file exists:

/usr/share/grafana/bin $ ls -lh
total 58M
-rwxr-xr-x    1 root     root       17.4M Oct 16 13:19 grafana-cli
-rw-r--r--    1 root     root          33 Oct 16 13:19 grafana-cli.md5
-rwxr-xr-x    1 root     root       40.6M Oct 16 13:19 grafana-server
-rw-r--r--    1 root     root          33 Oct 16 13:19 grafana-server.md5

The run.sh script is this: https://github.com/grafana/grafana/blob/master/packaging/docker/run.sh

Checking the interpreter of run.sh using readelf in a copy of the container yields: Requesting program interpreter: /lib/ld-linux-armhf.so.3. In contrast, /lib only contains the following:

apk ld-musl-armhf.so.1 libcrypto.so.1.1 libz.so.1 mdev firmware libc.musl-armv7.so.1 libssl.so.1.1 libz.so.1.2.11

This might be the problem. What would be the best way to fix this?

PS: I wasn't sure if this was better suited for Superuser or Stackoverflow, so please tell me if I went to the wrong site :)

LimaKilo
  • 141
  • 8
  • 1
    @KamilMaciorowski the docker container doesn't have readelf available. I copied the file out of the container to my home and ran the command there, the output is `[Requesting program interpreter: /lib/ld-linux-armhf.so.3`. Is that valid for inside the container? This interpreter is not available in the container: `/lib $ ls` yields `apk ld-musl-armhf.so.1 libcrypto.so.1.1 libz.so.1 mdev firmware libc.musl-armv7.so.1 libssl.so.1.1 libz.so.1.2.11 ` – LimaKilo Oct 26 '19 at 21:18
  • @KamilMaciorowski done, thanks. By the way, I installed an older version of grafana (6.3.0), where the base is Ubuntu, not Alpine (and thus the interpreter is there), and it works. – LimaKilo Oct 26 '19 at 22:50
  • Can you post the self-answer how you solved it? – kenorb Oct 28 '19 at 14:11
  • @kenorb until now I only got it working by using an older version of Grafana, is that worth a self-answer? – LimaKilo Oct 28 '19 at 21:05
  • Nevermind, I found the solution, see answer. – LimaKilo Oct 28 '19 at 21:16

1 Answers1

1

In the commits for the Grafana Docker image I found that someone already reported this issue and it already got fixed: https://github.com/grafana/grafana/issues/19585. The fix will be included in the next release (6.5.0) in a few weeks and is already available in nightly builds (grafana/grafana:master).

LimaKilo
  • 141
  • 8