ddev start fails with NFS mount: Cannot start service web - error while mounting volume - permission denied

Created on 2 Jul 2019  路  7Comments  路  Source: drud/ddev

Describe the bug
"ddev start" fails when bringing up a project with nfs_mount_enabled: true

This is what comes up in my console (Cmder):

Starting foobar...
Pushing mkcert rootca certs to ddev-global-cache
Pushed mkcert rootca certs to ddev-global-cache
Creating volume "ddev-foobar_nfsmount" with local driver
Creating ddev-foobar-db ... done
Creating ddev-foobar-dba ... done
Creating ddev-foobar-web ... error

ERROR: for ddev-foobar-web  Cannot start service web: error while mounting volume '/var/lib/docker/volumes/ddev-foobar_nfsmount/_data': error while mounting volume with options: type='nfs' device=':/d/mt/Projekte/workspace/foobar' o='addr=host.docker.internal,hard,nolock,rw': permission denied

ERROR: for web  Cannot start service web: error while mounting volume '/var/lib/docker/volumes/ddev-foobar_nfsmount/_data': error while mounting volume with options: type='nfs' device=':/d/mt/Projekte/workspace/foobar' o='addr=host.docker.internal,hard,nolock,rw': permission denied
Encountered errors while bringing up the project.
raven: got http status 429 - x-sentry-error: Creation of this event was denied due to rate limiting Failed to start foobar: Failed to run docker-compose [-f D:\mt\Projekte\workspace\foobar\.ddev\docker-compose.yaml up --build -d], err='exit status 1', stdout='', stderr='Creating volume "ddev-foobar_nfsmount" with local driver

It has worked before, I suspect that an update from ddev 1.8 to 1.9 or one of the recent Windows updates was the cuplrit.

However, it did not work when I downgraded to ddev 1.8.
When switching to nfs_mount_enabled: false, the project starts successfully

To Reproduce

Install ddev on Windows 10 with chocolatey (choco install ddev)
Upgrade ddev to version 1.9: choco upgrade ddev
Create a project or open existing one
ddev rm -a
ddev config
ddev start

Expected behavior
ddev should start successfully, including the service ddev-foobar-web

Version and configuration information (please complete the following information):

  • Windows 10 with recent updates
  • Docker desktop Version 2.0.0.3 (31259), Build: 8858db3
  • config.yaml contents for the misbehaving project
    APIVersion: v1.9.1
    name: foobar
    type: wordpress
    docroot: htdocs
    php_version: "7.1"
    webserver_type: nginx-fpm
    router_http_port: "80"
    router_https_port: "443"
    xdebug_enabled: false
    additional_hostnames: []
    additional_fqdns: []
    mariadb_version: "10.2"
    nfs_mount_enabled: true
    provider: default
    use_dns_when_possible: true
    timezone: ""
  • Do you have any custom configuration (nginx, php, mysql) in the .ddev folder?
    No

    • I also restarted Docker, reset the credentials an reset Docker to factory defaults
    • The drive in question, D:, is shared in the Docker Settings.
    • The Windows Admin password has not changed.

Most helpful comment

Please check your ~/.ddev/nfs_exports.txt, Mine has

C:\Users\rfay > /c/Users/rfay
C:\Users\rfay > /C/Users/rfay

If you don't have both upper- and lower-case 'c' in there you might want to try that. You must restart the nfsd service afterward.

Did you step through the debugging instructions? https://ddev.readthedocs.io/en/stable/users/performance/#windows-specific-nfs-debugging

Also, you might want to remove the service, remove ~/.ddev/nfs_exports.txt, and re-run the nfs setup script.

All 7 comments

Please check your ~/.ddev/nfs_exports.txt, Mine has

C:\Users\rfay > /c/Users/rfay
C:\Users\rfay > /C/Users/rfay

If you don't have both upper- and lower-case 'c' in there you might want to try that. You must restart the nfsd service afterward.

Did you step through the debugging instructions? https://ddev.readthedocs.io/en/stable/users/performance/#windows-specific-nfs-debugging

Also, you might want to remove the service, remove ~/.ddev/nfs_exports.txt, and re-run the nfs setup script.

Oh, I note you have this project on the d: drive, you'll want to make sure that's listed in ~/.ddev/nfs_exports.txt.

No response from OP, so closing. I"m pretty sure the issue was probably not putting the directory you were working with into the exports file.

Thanks for your feedback. (I was able to work without DDEV recently, so I missed to check up on this.)

I can confirm that your solution worked.

C:\Users\my_username\.ddev\nfs_exports.txt:

Before:

D:\my\Projects\workspace\ > /D/my/Projects/workspace

After:

D:\my\Projects\workspace\ > /D/my/Projects/workspace
D:\my\Projects\workspace\ > /d/my/Projects/workspace

Thanks for the report back. Glad it's working for you!

@rfay Sorry bothering you but please do add this to the docs. I'd do it personally right now if I could. So glad I found this issue.

Most likely the problem you had was that the v1.10.0 and v1.10.1 windows installers didn't include the script (or most anything else, including sudo, etc) so if you did the install and then used the script that was installed, it would have been an old one. I verified the behavior of the current script, and it seems to be fine, but I'd love to have you try it and review it. You have to stop and uninstall the nfsd service and rm your nfs_exports.txt to run it.

If you have a suggestion of how and where to document this, your suggestion (or a PR) are welcome.

Was this page helpful?
0 / 5 - 0 ratings