Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Mount.nfs: Connection timed out ... - Vagrant - Trellis

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

like image 838
deleting Avatar asked Jul 26 '17 14:07

deleting


People also ask

Why is my vagrant Machine stuck while mounting NFS shared folders?

If your Vagrant machine stuck while "Mounting NFS shared folders", you can use the workaround given below. This is probably and more likely caused by your firewall. In my case, it is indeed the firewall issue. I had to allow the following services through the firewall to fix mounting NFS shared folders issue in Vagrant: rpc-bind.

How do I fix NFS mount points on macOS Catalina?

We are looking at a few issues surrounding NFS mount points on macOS Catalina. If it's possible, one workaround until we can get a fix shipped is to add the nfs_export: false option to each NFS mount and manually edit /etc/exports to suit your needs.

Is your NFS daemon running?

1 Answer 1 ActiveOldestVotes 6 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:

Does enabling the default firewall block NFS?

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.


1 Answers

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/)

like image 170
hotfire42 Avatar answered Nov 09 '22 19:11

hotfire42