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

Invalid Argument Error when Deploying Portainer with Volume to Persist Data (Docker Swarm) #1234

Closed
ChexWarrior opened this issue Sep 25, 2017 · 3 comments

Comments

@ChexWarrior
Copy link

Description

Hello,

I am currently attempting to deploy Portainer as part of a swarm on a local Vagrant environment (3 Ubuntu 16.04 machines, one manager and two workers). When I specify a volume to persist Portainer data the service continuously fails with task: non-zero exit (1) and when I run docker service logs I see the following error: invalid argument. The section of the stack YAML file pertaining to Portainer is like so:

portainer:
    image: portainer/portainer:latest
    volumes:
      - /var/run/docker.sock:/var/run/docker.sock
      - /volumes/monitor/portainer/data:/data
    deploy:
      placement:
        constraints:
          - node.role == manager
    networks:
      - monitor

It should also be noted that when I do not specify the volume for Portainer data the service runs with no issues at all.

Additional Info: The root of the portainer volume /volumes is within a shared folder on vagrant that has permissions set to 777 for both directory and file mode.

Any help anyone could give would be greatly appreciated. Thank you.

Steps to reproduce the issue:

  1. Start Vagrant Environment (I can provide more details here if needed)
  2. Run docker stack deploy

Technical details:

  • Portainer version: 1.14.2
  • Target Docker version (the host/cluster you manage): 17.06.2-ce
  • Platform (windows/linux): Ubuntu 16.04
  • Command used to start Portainer (docker run -p 9000:9000 portainer/portainer): Run in docker swarm (explained above)
  • Browser: Firefox Developer Edition
@ChexWarrior
Copy link
Author

ChexWarrior commented Sep 25, 2017

I just tried creating the Portainer volume outside of the shared directory and the service started with no issues, so it looks like the permissions on the shared vagrant folder must have been causing the problem. I'll close this now and report back anymore findings.

@ChexWarrior
Copy link
Author

The issue is actually the Virtual Box synced (shared) folder mechanism, changing the shared folder to use NFS fixes the issue.

@das-peter
Copy link

@ChexWarrior Stumbled across this as well. Question is - shouldn't it work with VirtualBox synced folders too?

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