Loki: docker plugin enable Loki gives an error

Created on 5 Sep 2019  路  9Comments  路  Source: grafana/loki

Describe the bug
After installing the plugin.

$ docker plugin enable loki
error: dial unix /run/docker/plugins/9c4f09236095deb097b2a9d864b7152451bb4d300f009f11971773a282a985f9/loki.sock: connect: no such file or directory"

The plugin remains disabled and unusable

To Reproduce

$ docker plugin install  grafana/loki-docker-driver:latest --alias loki --grant-all-permissions
$ docker plugin enable loki

Expected behavior
Just work

Environment:

 Client: Docker Engine - Community
 Version:           19.03.2
 API version:       1.40
 Go version:        go1.12.8
 Git commit:        6a30dfc
 Built:             Thu Aug 29 06:18:36 2019
 OS/Arch:           linux/arm
 Experimental:      false

Server: Docker Engine - Community
 Engine:
  Version:          19.03.2
  API version:      1.40 (minimum version 1.12)
  Go version:       go1.12.8
  Git commit:       6a30dfc
  Built:            Thu Aug 29 06:12:41 2019
  OS/Arch:          linux/arm
  Experimental:     false
 containerd:
  Version:          1.2.6
  GitCommit:        894b81a4b802e4eb2a91d1ce216b8817763c29fb
 runc:
  Version:          1.0.0-rc8
  GitCommit:        425e105d5a03fabd737a126ad93d62a9eeede87f
 docker-init:
  Version:          0.18.0
  GitCommit:        fec3683

Screenshots, promtail config, or terminal output

Most helpful comment

To chime in on demand, I just got this error and ARM64 support would be great.

All 9 comments

Looks like an ARM issue, works OK on Intel.

Hi,

I am sorry, but we are currently not packaging the docker plugin for other platforms than linux/amd64.

This may change in the future, once our CI system allows it.

In the meantime, you can build the plugin yourself for the desired os / arch. To do so, clone the repository on the target system and run make docker-driver. This should compile it correctly locally.

Cross compiling on linux/amd64 to linux/arm works OK.

To chime in on demand, I just got this error and ARM64 support would be great.

Cross compiling on linux/amd64 to linux/arm works OK.

any hints on how can this be done @steveww?

building it on arm64 as suggested in https://github.com/grafana/loki/issues/974#issuecomment-528492440 fails for me:
Status: Downloaded newer image for grafana/loki-build-image:0.9.0 ---> 055a15113048 Step 3/10 : COPY . /src/loki ---> 1e437dca72d9 Step 4/10 : WORKDIR /src/loki ---> Running in e5d65944e1fb Removing intermediate container e5d65944e1fb ---> 56d1db0de82a Step 5/10 : RUN make clean && make BUILD_IN_CONTAINER=false cmd/docker-driver/docker-driver ---> Running in 8d43b0fbd6f2 standard_init_linux.go:211: exec user process caused "exec format error" The command '/bin/sh -c make clean && make BUILD_IN_CONTAINER=false cmd/docker-driver/docker-driver' returned a non-zero code: 1 make: *** [Makefile:372: docker-driver] Error 1

Compiling everything on a RPi is a challenge as the compilation takes a lot of memory that the RPi does not have. I cross compile on a Linux server, it's a lot quicker too.

$ GOARCH=arm go build ./cmd/loki

Then just copy the binary to the RPi.

Compiling everything on a RPi is a challenge as the compilation takes a lot of memory that the RPi does not have. I cross compile on a Linux server, it's a lot quicker too.

$ GOARCH=arm go build ./cmd/loki

Then just copy the binary to the RPi.

I had to run
GOARCH=arm go build ./cmd/docker-driver

Then scp the 'docker-driver' executable to my rpi's /var/lib/docker/plugins//rootfs/bin dir
where ID is the ID of the docker plugin

waboring@airspy:~: $  docker plugin list
ID                  NAME                DESCRIPTION           ENABLED
f2386e8f68e4        loki:latest         Loki Logging Driver   true

Then I enabled the docker driver and it was happy

waboring@airspy:~: $  docker plugin enable loki
loki

Hello all,
I've compiled the binary but how do I install it manually? The location "/var/lib/docker/plugins//rootfs/bin dir" does not exist. I can get as far as "/var/lib/docker/plugins".

Did you try using https://github.com/grafana/loki/issues/1973#issuecomment-645084374

If not, I think you need to install per the instructions, which will fail, but create the needed folder.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

Mario-Hofstaetter picture Mario-Hofstaetter  路  4Comments

ghostsquad picture ghostsquad  路  3Comments

SuperQ picture SuperQ  路  5Comments

kylos101 picture kylos101  路  4Comments

suppix picture suppix  路  3Comments