Skip to content
This repository was archived by the owner on Oct 19, 2022. It is now read-only.

Unable to use plugin in Swarm #62

Open
sreejithhere opened this issue Aug 10, 2018 · 2 comments
Open

Unable to use plugin in Swarm #62

sreejithhere opened this issue Aug 10, 2018 · 2 comments

Comments

@sreejithhere
Copy link

sreejithhere commented Aug 10, 2018

I am trying to create the a swarm using the sshfs plugin as the volume driver.
My stack has a volume defined as below

volumes:
  ssh-data:
    driver: vieux/sshfs
    driver_opts:
      sshcmd: root@server:/data
      password: root

The stack has two services defined. The first server runs a simple ssh server with username and password root:root. The second one is a simple alpine based service which has uses the defined volume.

When I deploy the stack the SSH server service starts up correctly. However the client service does not start. docker service ps command gives the following error

"starting container failed: error while mounting volume '/var/lib/docker/plugins/c26a7795b28466ea1959e0c5e0ae2535bbaa9ddc8aa1a71c3b862ed6106d341f/rootfs': VolumeDriver.Mount: sshfs command execute failed: exit status 1 (read: Connection reset by peer
)"

I tried removing the volume use from the client and started the services. Both the service starts up correctly. In order to test that the SSH service is working properly I did the following

  1. Exec into the client container as bash
  2. Connect to the server service using ssh <user>@<service name>. This worked proving that the SSH connection between the services are working and therefore the issue is with the volume plugin definition

I am attaching my yml file for reference
ssh.yml.txt

@Marcel-B
Copy link

Same error here. Any solutions?

@Singwai
Copy link

Singwai commented Apr 9, 2019

Things you should check.

the host of the container need to able to ssh to the file system host including to itself.

if your environment has only single node, make sure the ssh command actually work.
Another thing worth checking is that if you can ssh using root? why you want that anyway.

# for free to subscribe to this conversation on GitHub. Already have an account? #.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants