docker-volume-plugins icon indicating copy to clipboard operation
docker-volume-plugins copied to clipboard

Enabling plugin throws "no such file or directory" error on boot2docker vm

Open jonl-percsolutions-com opened this issue 7 years ago • 17 comments

I am attempting to use the nfs-volume-pugin on a docker machine created using dockertoolbox and the vsphere driver. So the underlying machine image is a boot2docker vm.

When attempting to enable the plugin I am receiving an error:

Error response from daemon: dial unix /run/docker/plugins/bf1e4c06ddc7d75060a52846b09e8efb573bb49ae6f65147b541e53c66a5e204/nfs.sock: connect: no such file or directory

It seems that it might be some kind of permission error, but I can not tell if that is an error because of the file permissions in boot2docker or because of the manner in which the plugin is attempting to create the files in question. I am able to manually create the file, but then I receive a different error and it gets deleted afterwards, so I lean towards it not being a file permission issue, but an issue with the plugin.

Boot2Docker version 18.06.0-ce, build HEAD : 1f40eb2 - Thu Jul 19 18:48:09 UTC 2018 doc Client: Version: 18.06.0-ce API version: 1.38 Go version: go1.10.3 Git commit: 0ffa825 Built: Wed Jul 18 19:04:39 2018 OS/Arch: linux/amd64 Experimental: false

Server: Engine: Version: 18.06.0-ce API version: 1.38 (minimum version 1.12) Go version: go1.10.3 Git commit: 0ffa825 Built: Wed Jul 18 19:13:39 2018 OS/Arch: linux/amd64 Experimental: false

jonl-percsolutions-com avatar Sep 07 '18 19:09 jonl-percsolutions-com

does it show anything on /var/log/messages (that's where docker normally dumps its logs)

trajano avatar Sep 14 '18 01:09 trajano

this is the output from /var/log/docker.log (which is where it goes to in boot2docker.iso).

time="2018-09-27T02:44:19.195632734Z" level=error msg="Handler for POST /v1.38/plugins/centos-nfs/enable returned error: dial unix /run/docker/plugins/8889e175106885871b347f6ac614d2bb04cd1942e74cc1948487789b99783bc1/osmounted.sock: connect: no such file or directory"

jonl-percsolutions-com avatar Sep 27 '18 15:09 jonl-percsolutions-com

I have the same issue, in part. When I install and enable the plugin on ARM (Raspberry Pi1 & 2): Error response from daemon: dial unix /run/docker/plugins/28aa48256e33c2fa2e7165012ab2af17841a6d8a983443d5f4da244b250944a6/gfs.sock: connect: no such file or directory However, when I run the plugin on a X86_64 machine, the plugin works fine.

All hosts run /run in tmpfs and the space on ARM is smaller, but I doubt available space is the issue.

tyhawk avatar Nov 04 '18 11:11 tyhawk

@tyhawk I am presuming you're using the gluster plugin. However, I am wondering if there's a bug in Docker that prevents it from using managed plugins in ARM OS

trajano avatar Nov 06 '18 06:11 trajano

I was having the same error reported on an ARM host. To resolve it I needed to rebuild the plugin for the ARM architecture. To do that I had to modify the Dockerfile to reference the arm64 version of the 'go' distribution. Another thing was that this plugin indirectly depends on https://github.com/docker/go-connections.git which is currently broken. See https://github.com/docker/go-connections/pull/61 . In order to work that around I made another modification to the Dockerfile to checkout the revision of the docker/go-connections before the bad change went it. Eventually, I was able to rebuild the plugin directly on the ARM host and the issue was resolved. It may not be the best way of doing things, but here's my Dockerfile I ended up with:

RUN yum install -q -y centos-release-gluster && \
  yum install -q -y go git glusterfs glusterfs-fuse attr
RUN curl -LO https://dl.google.com/go/go1.12.5.linux-arm64.tar.gz && \
  tar -C /usr/local -xvzf go1.12.5.linux-arm64.tar.gz
RUN export PATH=$PATH:/usr/local/go/bin && \
  mkdir -p /root/go/src/github.com/docker && \
  cd /root/go/src/github.com/docker && \
  git clone https://github.com/docker/go-connections.git && \
  cd go-connections && \
  git checkout 908dcf0115b8215cde21154dd910fb80862dbf86 && \
  cd / && \
  go get github.com/trajano/docker-volume-plugins/glusterfs-volume-plugin && \
  mv $HOME/go/bin/glusterfs-volume-plugin / && \
  rm -rf /usr/local/go && \
  yum remove -q -y go git gcc && \
  yum autoremove -q -y && \
  yum clean all && \
  rm -rf /var/cache/yum /var/log/anaconda /var/cache/yum /etc/mtab && \
  rm /var/log/lastlog /var/log/tallylog```

serhiiz avatar May 23 '19 19:05 serhiiz

I'm currently trying to build this on a RPI-4 cluster, but still out of luck. I adjusted the Dockerfile to include the armv6 version of go as well as the missing gcc.

FROM centos:7 RUN yum install -q -y go git glusterfs glusterfs-fuse attr gcc RUN curl -LO https://dl.google.com/go/go1.12.5.linux-armv6l.tar.gz && \ tar -C /usr/local -xvzf go1.12.5.linux-armv6l.tar.gz RUN export PATH=$PATH:/usr/local/go/bin && \ mkdir -p /root/go/src/github.com/docker && \ cd /root/go/src/github.com/docker && \ git clone https://github.com/docker/go-connections.git && \ cd go-connections && \ git checkout 908dcf0115b8215cde21154dd910fb80862dbf86 && \ cd / && \ go get github.com/trajano/docker-volume-plugins/glusterfs-volume-plugin && \ mv $HOME/go/bin/glusterfs-volume-plugin / && \ rm -rf /usr/local/go && \ yum remove -q -y go git gcc && \ yum autoremove -q -y && \ yum clean all && \ rm -rf /var/cache/yum /var/log/anaconda /var/cache/yum /etc/mtab && \ rm -fv /var/log/lastlog /var/log/tallylog

It builds nicely by: docker build -t glustertest . ... Successfully built 5e432ca46638 Successfully tagged glustertest:latest But the installation fails: docker plugin install --alias glusterfs glustertest --grant-all-permissions --disable Error response from daemon: pull access denied for glustertest, repository does not exist or may require 'docker login': denied: requested access to the resource is denied

I now wonder, whether my build command is wrong, or the install?

Thank you in advance.

Best regards, Empor

Empor-co avatar Sep 07 '19 17:09 Empor-co

I'm also trying to use the gluster plugin on a cluster of raspberry pies. Same as OP, the following error shows up while trying to enable the plugin:

Error response from daemon: dial unix /run/docker/plugins/{id}/nfs.sock: connect: no such file or directory

Are there any plans on making this cross-platform by any chance?

d-rez avatar Dec 24 '19 17:12 d-rez

Any working fix on this for raspberry pi 4?

emilrowland avatar Jan 31 '20 08:01 emilrowland

Tried using the plugin on a arm64 dietpi raspberry pi 3B+, same issue as mentioned above:

Error response from daemon: dial unix /run/docker/plugins/2b05a7a2d0d98718a289f2d2415a4a3a14878764ecbec7f5364ce9c295bcc40a/gfs.sock: connect: no such file or directory

rafaelreis-r avatar Sep 10 '20 15:09 rafaelreis-r

Same issue when I try to enable the plugin. docker plugin enable glusterfs

Error response from daemon: dial unix /run/docker/plugins/0083b091576907f5f214a29d679d7fa4c619716022800d54bf443ebd67793702/gfs.sock: connect: no such file or directory

GTrannoy avatar Nov 22 '20 09:11 GTrannoy

Same error here.:

docker plugin enable glusterfs Error response from daemon: dial unix /run/docker/plugins//gfs.sock: connect: no such file or directory

openarun avatar Jan 13 '21 19:01 openarun

Like others, I'm on a Raspberry Pi 4 building a GlusterFS/Docker cluster and have run into this issue.

nerdily avatar May 10 '21 01:05 nerdily

Try using a forked version of this project: https://github.com/marcelo-ochoa/docker-volume-plugins I am using an ArmV7 pre-build image: https://hub.docker.com/repository/docker/mochoa/glusterfs-volume-plugin-armv7l on QNAP NAS without any issues. Marcelo.

marcelo-ochoa avatar May 10 '21 11:05 marcelo-ochoa

Cool. I'll give it a look!

nerdily avatar May 10 '21 11:05 nerdily

journalctl -u docker | grep <id>

Returned: time="2022-09-05T10:36:58+02:00" level=error msg="exec /glusterfs-volume-plugin: permission denied" plugin=<id>

/glusterfs-volume-plugin is stored in /var/lib/docker/plugins/<id>/rootfs

/var was mounted from somewhere else, I had read-write access, but mount was mounted with noexec option

JHJohny avatar Sep 05 '22 12:09 JHJohny

Im getting the same on RPi 4B Is there a known fix for this?

akashkj avatar Sep 08 '22 16:09 akashkj

This project is forked at marcelo-ochoa/docker-volume-plugins please submit PR or bugs there.

marcelo-ochoa avatar Sep 08 '22 19:09 marcelo-ochoa