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

Created on 25 Sep 2017  ·  3Comments  ·  Source: portainer/portainer


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

Most helpful comment

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

All 3 comments

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.

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

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

Was this page helpful?
0 / 5 - 0 ratings

Related issues

linquize picture linquize  ·  3Comments

aprcloud picture aprcloud  ·  3Comments

yexingqi picture yexingqi  ·  3Comments

adi90x picture adi90x  ·  4Comments

himred picture himred  ·  3Comments