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

Improve nfs.server.mount.require_resv_port check #1275

Closed
murathalici opened this issue Feb 11, 2020 · 13 comments
Closed

Improve nfs.server.mount.require_resv_port check #1275

murathalici opened this issue Feb 11, 2020 · 13 comments
Assignees
Projects

Comments

@murathalici
Copy link

murathalici commented Feb 11, 2020

Description

Problem/feature description...

Just got a brand new Mac that's running OSX 10.14.5 and I'm unable to get db and cli containers to work using VirtualBox. It works fine if I switch to docker desktop.

Describe the results you received:

fin p start
ERROR: for myd8site_db_1  Cannot start service db: error while mounting volume '/mnt/sda1/var/lib/docker/volumes/myd8site_project_root/_data': failed to mount local volume: mount :/Users/mhalici/Sites/docksal/myd8site:/mnt/sda1/var/lib/docker/volumes/myd8site_project_root/_data, flags: 0Creating myd8site_cli_1       ... error

ERROR: for myd8site_cli_1  Cannot create container for service cli: failed to mount local volume: mount :/Users/mhalici/Sites/docksal/myd8site:/mnt/sda1/var/lib/docker/volumes/myd8site_project_root/_data, flags: 0xc00, data: addr=192.168.64.1,vers=3,nolock,noacl,nocto,actimeo=1: connection refused

ERROR: for db  Cannot start service db: error while mounting volume '/mnt/sda1/var/lib/docker/volumes/myd8site_project_root/_data': failed to mount local volume: mount :/Users/mhalici/Sites/docksal/myd8site:/mnt/sda1/var/lib/docker/volumes/myd8site_project_root/_data, flags: 0xc00, data: addr=192.168.64.1,vers=3,nolock,noacl,nocto,actimeo=1: connection refused

ERROR: for cli  Cannot create container for service cli: failed to mount local volume: mount :/Users/mhalici/Sites/docksal/myd8site:/mnt/sda1/var/lib/docker/volumes/myd8site_project_root/_data, flags: 0xc00, data: addr=192.168.64.1,vers=3,nolock,noacl,nocto,actimeo=1: connection refused
ERROR: Encountered errors while bringing up the project.

Output of fin config:

fin config output
---------------------
COMPOSE_PROJECT_NAME_SAFE: myd8site
COMPOSE_FILE:
/Users/mhalici/.docksal/stacks/volumes-nfs.yml
/Users/mhalici/.docksal/stacks/stack-default.yml
/Users/mhalici/Sites/docksal/myd8site/.docksal/docksal.yml
ENV_FILE:
/Users/mhalici/Sites/docksal/myd8site/.docksal/docksal.env

PROJECT_ROOT: /Users/mhalici/Sites/docksal/myd8site
DOCROOT: docroot
VIRTUAL_HOST: myd8site.docksal
VIRTUAL_HOST_ALIASES: *.myd8site.docksal
IP: 192.168.64.100
MYSQL:

Docker Compose configuration
---------------------
services:
  browser:
    dns:
    - 192.168.64.100
    - 8.8.8.8
    - 192.168.64.100
    - 8.8.8.8
    hostname: browser
    image: selenium/standalone-chrome-debug
    ports:
    - 5901:5900/tcp
  cli:
    build:
      context: /Users/mhalici/Sites/docksal/myd8site/.docksal/services/cli
    dns:
    - 192.168.64.100
    - 8.8.8.8
    - 192.168.64.100
    - 8.8.8.8
    - 192.168.64.100
    - 8.8.8.8
    environment:
      BLACKFIRE_CLIENT_ID: null
      BLACKFIRE_CLIENT_TOKEN: null
      COMPOSER_ALLOW_XDEBUG: '0'
      COMPOSER_DISABLE_XDEBUG_WARN: '0'
      DOCROOT: docroot
      DRUSH_ALLOW_XDEBUG: '0'
      DRUSH_OPTIONS_URI: myd8site.docksal
      GIT_USER_EMAIL: mhalici@collegeboard.org
      GIT_USER_NAME: Murat Halici
      HOST_GID: '387158756'
      HOST_UID: '1318456268'
      MYSQL_DATABASE: default
      MYSQL_HOST: db
      MYSQL_PASSWORD: user
      MYSQL_ROOT_PASSWORD: root
      MYSQL_USER: user
      PATH: /var/www/vendor/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/home/docker/.composer/vendor/bin
      PHP_IDE_CONFIG: null
      SECRET_ACAPI_EMAIL: null
      SECRET_ACAPI_KEY: null
      SECRET_PLATFORMSH_CLI_TOKEN: null
      SECRET_SSH_PRIVATE_KEY: null
      SECRET_TERMINUS_TOKEN: null
      SSH_AUTH_SOCK: /.ssh-agent/proxy-socket
      VIRTUAL_HOST: myd8site.docksal
      XDEBUG_CONFIG: remote_connect_back=0 remote_host=192.168.64.1
      XDEBUG_ENABLED: '0'
    extra_hosts:
      packages.wcm.collegeboard.org: 10.154.3.17
    hostname: cli
    image: myd8site_cli
    labels:
      io.docksal.shell: bash
      io.docksal.user: docker
    volumes:
    - docksal_ssh_agent:/.ssh-agent:ro
    - cli_home:/home/docker:rw
    - project_root:/var/www:rw
  db:
    dns:
    - 192.168.64.100
    - 8.8.8.8
    - 192.168.64.100
    - 8.8.8.8
    - 192.168.64.100
    - 8.8.8.8
    environment:
      MYSQL_ALLOW_EMPTY_PASSWORD: null
      MYSQL_DATABASE: default
      MYSQL_INITDB_SKIP_TZINFO: null
      MYSQL_ONETIME_PASSWORD: null
      MYSQL_PASSWORD: user
      MYSQL_RANDOM_ROOT_PASSWORD: null
      MYSQL_ROOT_PASSWORD: root
      MYSQL_USER: user
    hostname: db
    image: docksal/mariadb:10.3
    ports:
    - 3306/tcp
    volumes:
    - db_data:/var/lib/mysql:rw
    - project_root:/var/www:ro,nocopy,cached
  web:
    depends_on:
      cli:
        condition: service_started
    dns:
    - 192.168.64.100
    - 8.8.8.8
    - 192.168.64.100
    - 8.8.8.8
    - 192.168.64.100
    - 8.8.8.8
    environment:
      APACHE_BASIC_AUTH_PASS: null
      APACHE_BASIC_AUTH_USER: null
      APACHE_DOCUMENTROOT: /var/www/docroot
      APACHE_FCGI_HOST_PORT: cli:9000
    hostname: web
    image: docksal/web:1.0-apache2.4
    labels:
      io.docksal.cert-name: none
      io.docksal.permanent: "false"
      io.docksal.project-root: /Users/mhalici/Sites/docksal/myd8site
      io.docksal.virtual-host: myd8site.docksal,*.myd8site.docksal
    volumes:
    - project_root:/var/www:ro
version: '2.1'
volumes:
  cli_home: {}
  db_data: {}
  docksal_ssh_agent:
    external: true
    name: docksal_ssh_agent
  project_root:
    driver: local
    driver_opts:
      device: :/Users/mhalici/Sites/docksal/myd8site
      o: addr=192.168.64.1,vers=3,nolock,noacl,nocto,noatime,nodiratime,actimeo=1
      type: nfs

Output of fin sysinfo:

fin sysinfo output
███  OS
Darwin Mac OS X 10.14.5
Darwin C02Z13KFLVDQ.local 18.6.0 Darwin Kernel Version 18.6.0: Thu Apr 25 23:16:27 PDT 2019; root:xnu-4903.261.4~2/RELEASE_X86_64 x86_64

███  ENVIRONMENT
MODE : VirtualBox VM
DOCKER_HOST : tcp://192.168.64.100:2376
DOCKSAL_NFS_PATH : /Users
NFS EXPORTS:

# <ds-nfs docksal
/Users 192.168.64.1 192.168.64.100 -alldirs -maproot=0:0
# ds-nfs>

███  FIN
fin version: 1.93.0

███  DOCKER COMPOSE
EXPECTED VERSION: 1.24.1
docker-compose version 1.24.1, build 4667896b
docker-py version: 3.7.3
CPython version: 3.6.8
OpenSSL version: OpenSSL 1.1.0j  20 Nov 2018

███  DOCKER
EXPECTED VERSION: 19.03.4

Client: Docker Engine - Community
Version:           19.03.4
API version:       1.40
Go version:        go1.12.10
Git commit:        9013bf5
Built:             Fri Oct 18 15:48:38 2019
OS/Arch:           darwin/amd64
Experimental:      false

Server: Docker Engine - Community
Engine:
Version:          19.03.4
API version:      1.40 (minimum version 1.12)
Go version:       go1.12.10
Git commit:       9013bf583a
Built:            Fri Oct 18 15:55:51 2019
OS/Arch:          linux/amd64
Experimental:     false
containerd:
Version:          v1.2.10
GitCommit:        b34a5c8af56e510852c35414db4c1f4fa6172339
runc:
Version:          1.0.0-rc8+dev
GitCommit:        3e425f80a8c931f88e6d94a8c831b9d5aa481657
docker-init:
Version:          0.18.0
GitCommit:        fec3683

███  DOCKER MACHINE
EXPECTED VERSION: 0.16.2
docker-machine version 0.16.2, build bd45ab13

NAME      ACTIVE   DRIVER       STATE     URL                         SWARM   DOCKER     ERRORS
docksal   *        virtualbox   Running   tcp://192.168.64.100:2376           v19.03.4

███  DOCKSAL: PROJECTS
project             STATUS              virtual host        project root

███  DOCKSAL: VIRTUAL HOSTS
No virtual hosts found

███  DOCKSAL: DNS
Successfully requested http://dns-test.docksal

███  DOCKER: RUNNING CONTAINERS
CONTAINER ID        IMAGE                              COMMAND                  CREATED             STATUS                    PORTS                                                    NAMES
9d8042ed7b6a        selenium/standalone-chrome-debug   "/opt/bin/entry_poin…"   3 minutes ago       Up 3 minutes              4444/tcp, 0.0.0.0:5901->5900/tcp                         myd8site_browser_1
4c2cf981296a        docksal/ssh-agent:1.3              "docker-entrypoint.s…"   14 minutes ago      Up 14 minutes (healthy)                                                            docksal-ssh-agent
d2e496e33615        docksal/dns:1.1                    "docker-entrypoint.s…"   14 minutes ago      Up 14 minutes (healthy)   192.168.64.100:53->53/udp                                docksal-dns
fd8c568d29cf        docksal/vhost-proxy:1.5            "docker-entrypoint.s…"   14 minutes ago      Up 14 minutes (healthy)   192.168.64.100:80->80/tcp, 192.168.64.100:443->443/tcp   docksal-vhost-proxy

███  DOCKER: NETWORKS
NETWORK ID          NAME                      DRIVER              SCOPE
d9bd3ddc8354        _default                  bridge              local
37f3cdf25603        bridge                    bridge              local
d03ecce40018        myd8site_default   bridge              local
b6e8657fbf9e        host                      host                local
2d12899efb5e        none                      null                local

███  VIRTUALBOX
EXPECTED VERSION: 5.2.34
6.0.14r133895

███  DOCKSAL MOUNTS
192.168.64.1:/Users on /Users type nfs (rw,noatime,nodiratime,vers=3,rsize=8192,wsize=8192,namlen=255,acregmin=1,acregmax=1,acdirmin=1,acdirmax=1,hard,nocto,nolock,noacl,proto=udp,timeo=11,retrans=3,sec=sys,mountaddr=192.168.64.1,mountvers=3,mountport=734,mountproto=udp,local_lock=all,addr=192.168.64.1)

███  HDD Usage
Filesystem                Size      Used Available Use% Mounted on
/dev/sda1                46.1G      3.3G     40.4G   7% /mnt/sda1
@lmakarov
Copy link
Member

lmakarov commented Feb 11, 2020

Looks like project containers are not able to mount the codebase from the host using NFS. At the same time, the default NFS mount looks to be fine in your case:

███  DOCKSAL MOUNTS
192.168.64.1:/Users on /Users type nfs (rw,noatime,nodiratime,vers=3,rsize=8192,wsize=8192,namlen=255,acregmin=1,acregmax=1,acdirmin=1,acdirmax=1,hard,nocto,nolock,noacl,proto=udp,timeo=11,retrans=3,sec=sys,mountaddr=192.168.64.1,mountvers=3,mountport=734,mountproto=udp,local_lock=all,addr=192.168.64.1)

I wonder if switching the volumes mode at the project level will make a difference in your case:

fin config set DOCKSAL_VOLUMES=bind
fin project reset

@murathalici
Copy link
Author

@lmakarov changing the mount type to "bind" worked for me. Thank you!

Is there a way to set that globally for all projects?

@lmakarov
Copy link
Member

Is there a way to set that globally for all projects?

Yes - fin config set --global DOCKSAL_VOLUMES=bind

The problem, though, is that we've just switched (in the latest release) to using DOCKSAL_VOLUMES=nfs globally for all fresh Docksal installations on Mac. All existing Mac users are grandfathered with DOCKSAL_VOLUMES=bind to preserve backward compatibility.

It's not clear what the issue with your setup is and whether this is a one-off problem or not. This will need to be further tested and investigated.

@lmakarov lmakarov added this to To do in 1.14.0 via automation Feb 12, 2020
@lmakarov lmakarov self-assigned this Feb 12, 2020
@steveoliver
Copy link
Contributor

FWIW, I'm getting the same or similar problem with a fresh Docksal install and a Platform.sh project.

fin config

COMPOSE_PROJECT_NAME_SAFE: cc
COMPOSE_FILE:
/Users/steve/.docksal/stacks/volumes-nfs.yml
/Users/steve/.docksal/stacks/stack-default.yml
/Users/steve/code/cc/.docksal/docksal.yml
ENV_FILE:
/Users/steve/code/cc/.docksal/docksal.env

PROJECT_ROOT: /Users/steve/code/cc
DOCROOT: web
VIRTUAL_HOST: cc.docksal
VIRTUAL_HOST_ALIASES: *.cc.docksal
IP: 192.168.64.100
MYSQL:

Docker Compose configuration
services:
cli:
dns:
- 192.168.64.100
- 8.8.8.8
environment:
BLACKFIRE_CLIENT_ID: null
BLACKFIRE_CLIENT_TOKEN: null
COMPOSER_ALLOW_XDEBUG: '0'
COMPOSER_DISABLE_XDEBUG_WARN: '0'
DOCROOT: web
DRUSH_ALLOW_XDEBUG: '0'
DRUSH_OPTIONS_URI: cc.docksal
GIT_USER_EMAIL: me@me.com
GIT_USER_NAME: Me
HOST_GID: '20'
HOST_UID: '501'
MYSQL_DATABASE: default
MYSQL_HOST: db
MYSQL_PASSWORD: user
MYSQL_ROOT_PASSWORD: root
MYSQL_USER: user
PHP_IDE_CONFIG: null
SECRET_ACAPI_EMAIL: null
SECRET_ACAPI_KEY: null
SECRET_PLATFORMSH_CLI_TOKEN: *******
SECRET_SSH_PRIVATE_KEY: null
SECRET_TERMINUS_TOKEN: null
SSH_AUTH_SOCK: /.ssh-agent/proxy-socket
VIRTUAL_HOST: cc.docksal
XDEBUG_CONFIG: remote_connect_back=0 remote_host=192.168.64.1
XDEBUG_ENABLED: '0'
hostname: cli
image: docksal/cli:2.10-php7.3
labels:
io.docksal.shell: bash
io.docksal.user: docker
volumes:
- docksal_ssh_agent:/.ssh-agent:ro
- cli_home:/home/docker:rw
- project_root:/var/www:rw,nocopy,cached
db:
dns:
- 192.168.64.100
- 8.8.8.8
environment:
MYSQL_ALLOW_EMPTY_PASSWORD: null
MYSQL_DATABASE: default
MYSQL_INITDB_SKIP_TZINFO: null
MYSQL_ONETIME_PASSWORD: null
MYSQL_PASSWORD: user
MYSQL_RANDOM_ROOT_PASSWORD: null
MYSQL_ROOT_PASSWORD: root
MYSQL_USER: user
hostname: db
image: docksal/mysql:5.6-1.4
ports:
- 3306/tcp
volumes:
- db_data:/var/lib/mysql:rw
- project_root:/var/www:ro,nocopy,cached
web:
depends_on:
cli:
condition: service_started
dns:
- 192.168.64.100
- 8.8.8.8
environment:
APACHE_BASIC_AUTH_PASS: null
APACHE_BASIC_AUTH_USER: null
APACHE_DOCUMENTROOT: /var/www/web
APACHE_FCGI_HOST_PORT: cli:9000
hostname: web
image: docksal/apache:2.4-2.3
labels:
io.docksal.cert-name: none
io.docksal.permanent: "false"
io.docksal.project-root: /Users/steve/code/cc
io.docksal.virtual-host: cc.docksal,.cc.docksal,cc.docksal.
volumes:
- project_root:/var/www:ro,nocopy,cached
version: '2.1'
volumes:
cli_home: {}
db_data: {}
docksal_ssh_agent:
external: true
name: docksal_ssh_agent
project_root:
driver: local
driver_opts:
device: :/Users/steve/code/cc
o: addr=192.168.64.1,vers=3,nolock,noacl,nocto,noatime,nodiratime,actimeo=1
type: nfs

fin sysinfo

███ OS
Darwin Mac OS X 10.15.3
Darwin retina.local 19.3.0 Darwin Kernel Version 19.3.0: Thu Jan 9 20:58:23 PST 2020; root:xnu-6153.81.5~1/RELEASE_X86_64 x86_64

███ ENVIRONMENT
MODE : Docker Desktop

███ FIN
fin version: 1.93.0

███ DOCKER COMPOSE
EXPECTED VERSION: 1.24.1
docker-compose version 1.24.1, build 4667896b
docker-py version: 3.7.3
CPython version: 3.6.8
OpenSSL version: OpenSSL 1.1.0j 20 Nov 2018

███ DOCKER
EXPECTED VERSION: 19.03.4

Client: Docker Engine - Community
Version: 19.03.4
API version: 1.40
Go version: go1.12.10
Git commit: 9013bf5
Built: Fri Oct 18 15:48:38 2019
OS/Arch: darwin/amd64
Experimental: false

Server: Docker Engine - Community
Engine:
Version: 19.03.4
API version: 1.40 (minimum version 1.12)
Go version: go1.12.10
Git commit: 9013bf5
Built: Thu Oct 17 23:50:38 2019
OS/Arch: linux/amd64
Experimental: false
containerd:
Version: v1.2.10
GitCommit: b34a5c8af56e510852c35414db4c1f4fa6172339
runc:
Version: 1.0.0-rc8+dev
GitCommit: 3e425f80a8c931f88e6d94a8c831b9d5aa481657
docker-init:
Version: 0.18.0
GitCommit: fec3683

███ DOCKSAL: PROJECTS
project STATUS virtual host project root

███ DOCKSAL: VIRTUAL HOSTS
No virtual hosts found

███ DOCKSAL: DNS
Successfully requested http://dns-test.docksal

███ DOCKER: RUNNING CONTAINERS
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
aa52b80dd4ba docksal/ssh-agent:1.3 "docker-entrypoint.s…" 14 minutes ago Up 14 minutes (healthy) docksal-ssh-agent
063da95b1754 docksal/dns:1.1 "docker-entrypoint.s…" 14 minutes ago Up 14 minutes (healthy) 192.168.64.100:53->53/udp docksal-dns
629618f1f7ba docksal/vhost-proxy:1.5 "docker-entrypoint.s…" 14 minutes ago Up 14 minutes (healthy) 192.168.64.100:80->80/tcp, 192.168.64.100:443->443/tcp docksal-vhost-proxy

███ DOCKER: NETWORKS
NETWORK ID NAME DRIVER SCOPE
4c9d6eb01eff _default bridge local
08414503800c bridge bridge local
fbe814fda754 cc_default bridge local
c36e4e74e7ce host host local
26bc056cd52b none null local

███ DOCKER DESKTOP
EXPECTED VERSION: 2.0.0.3
2.1.0.4

███ HDD Usage
Filesystem Size Used Avail Capacity iused ifree %iused Mounted on
/dev/disk1s5 466Gi 10Gi 111Gi 9% 484243 4882992677 0% /
devfs 204Ki 204Ki 0Bi 100% 706 0 100% /dev
/dev/disk1s1 466Gi 341Gi 111Gi 76% 2865351 4880611569 0% /System/Volumes/Data
/dev/disk1s4 466Gi 2.0Gi 111Gi 2% 3 4883476917 0% /private/var/vm
map auto_home 0Bi 0Bi 0Bi 100% 0 0 100% /System/Volumes/Data/home
/dev/disk1s3 466Gi 502Mi 111Gi 1% 36 4883476884 0% /Volumes/Recovery

fin project start

Starting services...
Creating network "cc_default" with the default driver
Creating volume "cc_cli_home" with default driver
Creating volume "cc_project_root" with local driver
Creating volume "cc_db_data" with default driver
Pulling db (docksal/mysql:5.6-1.4)...
5.6-1.4: Pulling from docksal/mysql
6ae821421a7d: Pull complete
a9e976e3aa6d: Pull complete
e3735e44a020: Pull complete
bfd564e9483f: Pull complete
df705f26e488: Pull complete
25097d3ea7b8: Pull complete
606c1b74fda2: Pull complete
eda5767f8d3f: Pull complete
5b57c9a598ba: Pull complete
57f28f294e2f: Pull complete
94b29ab4a8ab: Pull complete
46d3fb50d4a3: Pull complete
07c1fe6f1a6b: Pull complete
c6f39fa4fcd5: Pull complete
ab447db89641: Pull complete
d16287e76d02: Pull complete
Digest: sha256:f1c5bf36345f9680e4f310eae19274e9deee518993d2be57046d1455f569a401
Status: Downloaded newer image for docksal/mysql:5.6-1.4
Pulling cli (docksal/cli:2.10-php7.3)...
2.10-php7.3: Pulling from docksal/cli
8d691f585fa8: Pulling fs layer
cba12d3fd8b1: Pulling fs layer
cda54d6474c8: Pulling fs layer
412447ed0729: Pulling fs layer
338d86719e93: Pulling fs layer
c3696f952a03: Pulling fs layer
810a1a99b584: Pulling fs layer
14f73b1bb78d: Pulling fs layer
1a53be1f578f: Pulling fs layer
b3689bd21f1f: Pulling fs layer
b48b4c9bcac5: Pulling fs layer
84db6cb4d4e7: Pulling fs layer
7f5df79990c7: Pulling fs layer
364072fb7739: Pulling fs layer
5e5e253882a4: Pull complete
89e44e57195d: Pull complete
f27250b5a2b0: Pull complete
f587955fc65c: Pull complete
f64dc8db7607: Pull complete
0ea37568547e: Pull complete
17308deeecc5: Pull complete
5598ed4d2bd4: Pull complete
66c73a775d6e: Pull complete
8bff89cf4bfd: Pull complete
c77713b6c3d2: Pull complete
ceeed877de6f: Pull complete
8714b75dc20d: Pull complete
ad415a828312: Pull complete
cb1bca466831: Pull complete
4e1f40f0fbba: Pull complete
aee3bfc5658f: Pull complete
adc7968d42de: Pull complete
f17ceca7a9ba: Pull complete
fda85cb5cdc9: Pull complete
f725d411821f: Pull complete
7d13576def29: Pull complete
826c55ec3c9f: Pull complete
8accc1d02b5a: Pull complete
Digest: sha256:96911e8d58d989adab790d1ec9075786f3dfe18ee57face09b7bfd449e7186a2
Status: Downloaded newer image for docksal/cli:2.10-php7.3
Pulling web (docksal/apache:2.4-2.3)...
2.4-2.3: Pulling from docksal/apache
c67f3896b22c: Pull complete
154fb9965a5c: Pull complete
67a036bd0b88: Pull complete
f3566667ebd1: Pull complete
dbb4347ff2cc: Pull complete
382f0b9313f0: Pull complete
4ccfe04985a0: Pull complete
c234113d3391: Pull complete
8df36931c425: Pull complete
f688a27b7a81: Pull complete
Digest: sha256:6d94e356987f6ef99ee434b517599bda30172990bff027141a5c8046fcbc52e6
Status: Downloaded newer image for docksal/apache:2.4-2.3
Creating cc_db_1 ... error
Creating cc_cli_1 ...

ERROR: for cc_db_1 Cannot start service db: error while mounting volume '/var/lib/docker/volumes/cc_project_root/_data': failed to mount local volume: mount :/Users/steve/code/cc:/var/lib/docker/volumes/cc_project_root/_data, flags: 0xc00, data: addr=192.168.64.1,vers=3,nolock,noacl,nocto,actimeo=1: permission denCreating cc_cli_1 ... error

ERROR: for cc_cli_1 Cannot start service cli: error while mounting volume '/var/lib/docker/volumes/cc_project_root/_data': failed to mount local volume: mount :/Users/steve/code/cc:/var/lib/docker/volumes/cc_project_root/_data, flags: 0xc00, data: addr=192.168.64.1,vers=3,nolock,noacl,nocto,actimeo=1: permission denied

ERROR: for db Cannot start service db: error while mounting volume '/var/lib/docker/volumes/cc_project_root/_data': failed to mount local volume: mount :/Users/steve/code/cc:/var/lib/docker/volumes/cc_project_root/_data, flags: 0xc00, data: addr=192.168.64.1,vers=3,nolock,noacl,nocto,actimeo=1: permission denied

ERROR: for cli Cannot start service cli: error while mounting volume '/var/lib/docker/volumes/cc_project_root/_data': failed to mount local volume: mount :/Users/steve/code/cc:/var/lib/docker/volumes/cc_project_root/_data, flags: 0xc00, data: addr=192.168.64.1,vers=3,nolock,noacl,nocto,actimeo=1: permission denied
ERROR: Encountered errors while bringing up the project.

@achekulaev
Copy link
Member

I feel like there is some change in nfsd happened in Catalina

@achekulaev
Copy link
Member

It's not Catalina. @shelane 's colleague has the same error with 10.14.6

Starting services...
Starting drupal8_mail_1 ... 
Starting drupal8_mail_1 ... error
drupal8_chrome_1 is up-to-date
Starting drupal8_cli_1  ... 
ERROR: for drupal8_mail_1  Cannot start service mail: error while mounting volume '/var/lib/docker/volumes/drupal8_project_root/_data': failed to mount local volume: mount :/Users/gauthier8/Sites/drupal8:/var/lib/docker/volumes/drupal8_Starting drupal8_cli_1  ... error
Starting drupal8_db_1   ... error
oject_root/_data, flags: 0xc00, data: addr=192.168.64.1,vers=3,nolock,noacl,nocto,actimeo=1: permission denied
ERROR: for drupal8_db_1  Cannot start service db: error while mounting volume '/var/lib/docker/volumes/drupal8_project_root/_data': failed to mount local volume: mount :/Users/gauthier8/Sites/drupal8:/var/lib/docker/volumes/drupal8_project_root/_data, flags: 0xc00, data: addr=192.168.64.1,vers=3,nolock,noacl,nocto,actimeo=1: permission denied
ERROR: for mail  Cannot start service mail: error while mounting volume '/var/lib/docker/volumes/drupal8_project_root/_data': failed to mount local volume: mount :/Users/gauthier8/Sites/drupal8:/var/lib/docker/volumes/drupal8_project_root/_data, flags: 0xc00, data: addr=192.168.64.1,vers=3,nolock,noacl,nocto,actimeo=1: permission denied
ERROR: for cli  Cannot start service cli: error while mounting volume '/var/lib/docker/volumes/drupal8_project_root/_data': failed to mount local volume: mount :/Users/gauthier8/Sites/drupal8:/var/lib/docker/volumes/drupal8_project_root/_data, flags: 0xc00, data: addr=192.168.64.1,vers=3,nolock,noacl,nocto,actimeo=1: permission denied
ERROR: for db  Cannot start service db: error while mounting volume '/var/lib/docker/volumes/drupal8_project_root/_data': failed to mount local volume: mount :/Users/gauthier8/Sites/drupal8:/var/lib/docker/volumes/drupal8_project_root/_data, flags: 0xc00, data: addr=192.168.64.1,vers=3,nolock,noacl,nocto,actimeo=1: permission denied
ERROR: Encountered errors while bringing up the project.

@achekulaev
Copy link
Member

achekulaev commented Feb 19, 2020

@steveoliver @murathalici the issue was solved for @shelane via nfs.conf.

See cat /etc/nfs.conf. It should look like this.

#
# nfs.conf: the NFS configuration file
#
nfs.server.mount.require_resv_port = 0

BUT for Shelane (and likely for you) it does not look like this. The line with require_resv_port is either absent or commented out.
You need to make sure that file has that line, then restart your computer to be sure nfsd restarts properly.

Please try and let know if it helps you.

@lmakarov
Copy link
Member

@achekulaev any idea why this happens? We have the code that handles that configuration in /etc/nfs.conf change here

docksal/bin/fin

Lines 2615 to 2623 in d9ed003

# Set nfs.server.mount.require_resv_port = 0
# Many NFS server implementations require this because of
# the false belief that this requirement increases security.
# Without this, NFS mounts are very likely to fail
if ! (cat /etc/nfs.conf | grep -e 'nfs\.server\.mount\.require_resv_port\s*=\s*0' >/dev/null); then
echo "Writing /etc/nfs.conf..."
echo "nfs.server.mount.require_resv_port = 0" | sudo tee -a /etc/nfs.conf >/dev/null
NFSD_RESTART_REQUIRED="true"
fi

@achekulaev
Copy link
Member

achekulaev commented Feb 21, 2020

In Shelane's case the line was commented out, the code does not check for this. I guess it can be the same in other cases.
Or maybe it's something else in their cases. Like secure port thing.

@shelane
Copy link
Member

shelane commented Feb 21, 2020

In my colleague’s case, he had previously installed Vagrant which affected both the nfs.conf file and the exports file.

@laetus007
Copy link

@lmakarov I've been banging my head against a wall trying to get personal desktop to run a project for a day or more - your solution to to add the lineDOCKSAL_VOLUMES=bindworked like a charm. Running an older 2013 Mac but on Catalina - the nfs.conf file looked appropriate per @achekulaev comment.

Anywise! Thank you so much for having a fix so I can continue to work.

@sumit3021kumar
Copy link

sumit3021kumar commented May 13, 2020

Thanks @lmakarov it's working for me as well
I am running below command and issue has been resolved

fin config set DOCKSAL_VOLUMES=bind
fin project reset

@lmakarov lmakarov changed the title Cannot start service db: error while mounting volume Improve nfs.server.mount.require_resv_port check May 13, 2020
@lmakarov lmakarov assigned achekulaev and unassigned lmakarov May 13, 2020
1.14.0 automation moved this from To do to Done Jul 6, 2020
@drupalicus
Copy link

Looks like project containers are not able to mount the codebase from the host using NFS. At the same time, the default NFS mount looks to be fine in your case:

███  DOCKSAL MOUNTS
192.168.64.1:/Users on /Users type nfs (rw,noatime,nodiratime,vers=3,rsize=8192,wsize=8192,namlen=255,acregmin=1,acregmax=1,acdirmin=1,acdirmax=1,hard,nocto,nolock,noacl,proto=udp,timeo=11,retrans=3,sec=sys,mountaddr=192.168.64.1,mountvers=3,mountport=734,mountproto=udp,local_lock=all,addr=192.168.64.1)

I wonder if switching the volumes mode at the project level will make a difference in your case:

fin config set DOCKSAL_VOLUMES=bind
fin project reset

Thank you my friend I spend around one week to figure it out, the issues was that after the cli had been created the file system had no permissions to write something in the volume that was not present, I tried your recommendation and it worked so nicely, I am new to docksal, so this was really useful. Thank you again for sharing this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
No open projects
1.14.0
  
Done
Development

No branches or pull requests

8 participants