Roots Discourse

Mount.nfs: access denied by server while mounting

After exactly following the Installation-Instructions and now trying to $ vagrant up on my Macbook Pro with OSX Sierra 10.12.6, I’m getting this Error Message:

The following SSH command responded with a non-zero exit status.
Vagrant assumes that this means the command failed!

mount -o vers=3,udp 192.168.50.1:/path/to/my/project/vagrant-nfs-roots-example-project.com/site /vagrant-nfs-roots-example-project.com

Stdout from the command:

Stderr from the command:

mount.nfs: access denied by server while mounting 192.168.50.1:/path/to/my/project/roots-example-project.com/site

I have tried everything I found here in the discourse forum, as well as on github and stackoverflow. I’ve been trying to make this work for days now and I don’t know what else to try (except setting the whole thing up on a clean, new operating system).

  • I’m not using an encrypted drive
  • I deleted and reinstalled vagrant, ansible, python and virtual box
  • I’m using the original test-project, to make sure there is no problem with the .yml config files.
  • I’m checking the export-file and the hosts file.
  • I did $vagrant destroy, $vagrant up and $vagrant up --provision a million times
  • I tried all of the edits on the Vagrantfile described in other threads (none of them worked)
  • I don’t have dockr installed
  • I changed the IP-Adress in the vagrant.default.yml
  • I uninstalled Avira
  • I updated to Mojave

I’m using:
Vagrant 2.2.5
Ansible 2.8.3 (installed through pip)
Python 2.7.10
Virtualbox 6.0.10

I would highly appreciate some help on figuring out what the problem is. I would even pay someone, if he/she fixes this for me via teamviewer or so. Feel free to contact me on this: josialoos@gmail.com

I know there are already a few threads on this and on similar topics. But as I said: none of them worked for me and also most of them are quite old and related to pip, vagrant and ansible version issues, which should have been fixed long time ago.

The Error-Message seems so randomly switch to this:

The following SSH command responded with a non-zero exit status.
Vagrant assumes that this means the command failed!

mount -o vers=3,udp 192.168.50.1:/Users/josialoos/Documents/Roots.io\ Webprojekte/roots-example-project.com/site /vagrant-nfs-roots-example-project.com

Stdout from the command:

Stderr from the command:

mount.nfs: requested NFS version or transport protocol is not supported

The last sentence is different now. I didn’t really change anything.

After working on this for days now I found a - very unsatisfying - workaround.

For some reason (no idea why) NFS connection between guest and host does not work, so that vagrant up constantly fails.

So I switched to rsync. How I did this:

  1. in ‘Vagrantfile’, located in the trellis-folder I changed this:
    config.vm.synced_folder local_site_path(site), nfs_path(name), type: 'nfs'
    to this:
    config.vm.synced_folder local_site_path(site), nfs_path(name), type: 'rsync'
    and this:
    config.vm.synced_folder ANSIBLE_PATH, '/ansible-nfs', type: 'nfs'
    to this:
    config.vm.synced_folder ANSIBLE_PATH, '/ansible-nfs', type: 'rsync'
    so basically I just changed the ‘nfs’ to ‘rsync’ on these two files.

  2. I then did vagrant up and got a new Error:

     The following SSH command responded with a non-zero exit status.
     Vagrant assumes that this means the command failed!
    
     pip install  --upgrade ansible==2.7.5
    
     Stdout from the command:
    
    
    
     Stderr from the command:
    
     bash: line 5: pip: command not found
    
  3. In a new Terminal-Window, I did vagrant ssh to ssh in to the virtualbox server which has been set up but not fully deployed by vagrant and then installed pip and ansible manually like so:
    $ sudo apt install python-pip
    $ pip install --upgrade ansible==2.7.5

  4. Then I went back to vagrant-Terminal-Window and did vagrant provision
    Vagrant would run without any problems now and deploy the whole thing and I can call the example.dev localhost in my browser and get a fresh wordpress.
    EDIT: The second time I did step 4., simply doing vagrant provision right away did not work anymore. It gave me this Error:
    'playbook' does not exist on the guest: /home/vagrant/trellis/dev.yml
    So I did vagrant halt and then vagrant provision, which then worked.

To be honest: I love the idea of roots.io - making deployment and staging super easy. But as a professional webdeveloper - under these circumstances - this is no option for me, as it’s not safe. I’ll be faster cowboycoding with mamp then.

I have the feeling, that roots.io has just to many components, which obviously are not perfectly working together. If I start building my websites on roots.io and then for some reason run in to problems like these, that’s gonna be a huge mess.

I learned a lot though and still hope that someone may help me out here and change my mind. Otherwise I’ll have to start digging in to docker or easyengine or so I guess …

Have you check /etc/exports?

Of course I did, as I already said in my opening post.