Mount.nfs: Connection timed out ... - Vagrant - Trellis
Asked Answered
G

3

7

I'm trying to run vagrant up for the first time, but I'm getting 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/erick/... (path)

Stdout from the command:

Stderr from the command:

mount.nfs: Connection timed out

How Can I fix it?

Thank You

Galateah answered 26/7, 2017 at 14:56 Comment(0)
L
7

Is your nfs daemon running? You can check it with nfsd status, which should return nfsd service is enabled. In case it is not running, you can enable and start it with:

sudo nfsd enable
sudo nfsd start

I have had the same problem recently and noticed that enabling the default macOS firewall will block NFS, and it will just timeout without any error. If you have enabled the firewall, I would first try to disable it and try again. If it works then, you can add rules to allow the nfs traffic to pass trough the firewall.

If it is still not working:

  • Make sure the file /etc/exports exists
  • Check your export file using nfsd checkexports
  • Check your syslog for nfsd errors

You can find the nfsd man here: https://developer.apple.com/legacy/library/documentation/Darwin/Reference/ManPages/man8/nfsd.8.html

(edit: unfortunately, the man page is down and I can not find it anymore - here is a replacement, but you should probably check if you can retrieve the correct version from apple. https://www.unix.com/man-page/osx/8/nfsd/)

Leal answered 6/9, 2017 at 16:39 Comment(1)
I've looked all over the web for this. Don't know why but my nfsd wasn't running on OSX 10.14. ThanksPassion
E
0

I just had the same error, but I could easily fix it by halting vagrant and rebooting the host machine.

Envenom answered 24/5, 2022 at 7:2 Comment(0)
R
0

For me it was firewall blocking the connection.

ufw status indicated that it was active and sudo ufw disable instantly fixed the mounting issue.

Raybin answered 12/7, 2022 at 11:51 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.