Roots Discourse

Mounting NFS shared folders timeout error on vagrant up

I’ve followed the installation steps from the docs and installed the dependencies with the exact versions listed. What I’ve done includes the instructions from these three pages: https://roots.io/trellis/docs/installing-trellis/ and https://roots.io/trellis/docs/wordpress-sites/ and https://roots.io/trellis/docs/local-development-setup/

I’m using Ubuntu 16.04 64bit and I have Vagrant 1.8.1 and Ansible 2.0.2.0 and all other dependencies with the correct versions.

After I try to vagrant up then I get this error:

==> default: Mounting NFS shared folders...
The following SSH command responded with a non-zero exit status.
Vagrant assumes that this means the command failed!

mount -o 'vers=3,udp' XXX.XXX.XX.X:'/home/lordess/Projects/lordess.com/site' /vagrant-nfs-example.com

Stdout from the command:

Stderr from the command:

mount.nfs: Connection timed out

I x’ed out the IP for privacy.

3 Likes

Hello!

I’m getting started with Trellis and get a similar issue to @lordess.

I’m using:

  • Ubuntu 16.04.2 LTS
  • Vagrant 1.9.5
  • Ansible 2.3.0.0
  • VirtualBox 5.1.22r115126

Researching the problem I have tried the following (which do not solve the problem for me):

Are there any other suggestions to get rid of the mount.nfs: Connection timed out error?

@silumesii Seeing that you’re on Ubuntu and having trouble with NFS, if you also have an encrypted Ubuntu home directory, I wonder if this thread will be relevant.

Thanks @fullyint. None of these particular drives is encrypted. The hint about monitoring /etc/exports is useful though.

Any other ideas?

Hello @lordess and @fullyint, managed to get things to work for me by disabling ufw on my development machine. This isn’t an ideal situation so I’m researching which ports to allow.

Hope this helps.

1 Like

Quickly wanted to let folks know that this recipe is working for me:

I now have ufw enabled and NFS mounts working as well. Finally!

1 Like

Greetings again!

I ran an update on my system and now have the timeout error again.

The setup:

  • Ubuntu 16.04.2 LTS
  • Vagrant 1.9.7
  • Ansible 2.3.1.0
  • VirtualBox 5.1.24r117012

The error:

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

mount -o vers=3,udp <IP Address>:<local-path> <mount-path>

Stdout from the command:



Stderr from the command:

mount.nfs: Connection timed out

The earlier fixes that worked for me aren’t working anymore. Namely disabling ufw or opening NFS ports.

Does anyone have suggestions of fixes to try?

Looks like the issue is related to VirtualBox.

On downgrading VirtualBox, the setup works as expected.

1 Like

The current version of VirtualBox (5.1.26r117224) fixes this issue for me.

vagrant up --provision works as expected again and mounts NFS folders.

4 Likes

I resolved this issue as well. For those who may have the same setup as me here’s what was going on:

I was running Ubuntu 17.04 with the GNOME Desktop 3.24. I installed following their instructions here. I replaced yakkety in this line deb http://download.virtualbox.org/virtualbox/debian yakkety contrib with zesty - which is the version for Ubuntu 17.04.

I ran vagrant up and got the aforementioned NSF error.

I then uninstalled by executing sudo apt-get remove --purge virtualbox-5.1

Then I downloaded yakkety AMD64 version from the documentation page and re-ran vagrant up and everything worked.

Actually, there error seems to reappear every time I restart the computer or server.