Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cannot enable plugin: No btrfs.sock created #34

Open
crakkhead opened this issue Oct 29, 2020 · 7 comments
Open

Cannot enable plugin: No btrfs.sock created #34

crakkhead opened this issue Oct 29, 2020 · 7 comments

Comments

@crakkhead
Copy link

I'm getting an error when installing or enabling the buttervolume plugin. I've tried to install the plugin through the repository:

> docker plugin install anybox/buttervolume
...
Error response from daemon: dial unix /run/docker/plugins/<uuid>/btrfs.sock: connect: no such file or directory

The plugin was installed but cannot be enabled.

> docker plugin ls
ID          NAME                         DESCRIPTION                      ENABLED
<ID>        anybox/buttervolume:latest   BTRFS Volume Plugin for Docker   false

Trying to enable it returns the same error:

> docker plugin enable anybox/buttervolume:latest 
Error response from daemon: dial unix /run/docker/plugins/<uuid>/btrfs.sock: connect: no such file or directory

Apparently the btrfs.sock file isn't created during the installation.

@ccomb
Copy link
Member

ccomb commented Oct 29, 2020

Hi, thanks for reporting this case, do you have any more information in the logs? Using something like sudo journalctl -f -u docker.service
Also what are your version of Docker?

@crakkhead
Copy link
Author

Sorry for not providing this basic information in the first place.
I'm using Docker version 19.03.11.
In the logs this is the output I get when trying to enable the plugin:

Oct 29 13:09:10 hostname dockerd[2126]: time="2020-10-29T13:09:10+01:00" level=error msg="standard_init_linux.go:211: exec user process caused \"exec format error\"" plugin=8ecb7051759b4b32d0006fc8481723c892dcbd9f30f33eeed9790390e61e4b3e
Oct 29 13:09:11 hostname dockerd[2126]: time="2020-10-29T13:09:11+01:00" level=error msg="standard_init_linux.go:211: exec user process caused \"exec format error\"" plugin=8ecb7051759b4b32d0006fc8481723c892dcbd9f30f33eeed9790390e61e4b3e
Oct 29 13:09:23 hostname dockerd[2126]: time="2020-10-29T13:09:23.315028080+01:00" level=error msg="Sending SIGTERM to plugin failed with error: process already finished: not found"
Oct 29 13:09:23 hostname dockerd[2126]: time="2020-10-29T13:09:23.315152929+01:00" level=error msg="Handler for POST /v1.40/plugins/anybox/buttervolume:latest/enable returned error: dial unix /run/docker/plugins/8ecb7051759b4b32d0006fc8481723c892dcbd9f30f33eeed9790390e61e4b3e/btrfs.sock: connect: no such file or directory"
Oct 29 13:09:23 hostname dockerd[2126]: time="2020-10-29T13:09:23.761398911+01:00" level=error msg="Sending SIGTERM to plugin failed with error: process already finished: not found"

@crakkhead
Copy link
Author

One more thing: I'm getting the error on a Raspberry Pi 4. I've tried the plugin in a x86 VM and it worked. Is the arm architecture the problem here?

@crakkhead
Copy link
Author

I've sorted out the issue. It was indeed due to the arm architecture of the Pi. Specifically the link to the github repo of tini points to the amd64 version of the binary. Changing this to the arm64 version fixed the issue. Otherwise the plugin seems to run well on arm64.
Thanks for providing this plugin!

@ccomb
Copy link
Member

ccomb commented Nov 3, 2020

Thanks a lot for finding the issue.
I'm reopening because someone else can find this problem when using arm64 or another arch. It is not obvious in the first place. There should be a way to automate de selection of the arch, or to build tini during the build, or to not use tini at all?

@ccomb ccomb reopened this Nov 3, 2020
@ccomb
Copy link
Member

ccomb commented Nov 3, 2020

In the Tini doc I can read

NOTE: If you are using Docker 1.13 or greater, Tini is included in Docker itself. This includes all versions of Docker CE. To enable Tini, just pass the --init flag to docker run.

@crakkhead
Copy link
Author

In the Tini doc I can read

NOTE: If you are using Docker 1.13 or greater, Tini is included in Docker itself. This includes all versions of Docker CE. To enable Tini, just pass the --init flag to docker run.

I managed to run the plugin with the docker-init binary provided by my docker installation. I didn't find an equivalent --init option for plugins, so I copied the docker-init from the host into the rootfs directory before plugin creation and adjusted the entrypoint.sh and Dockerfile. Haven't yet tested this setup much, but the tests run fine with the --init option enabled.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants