-
Notifications
You must be signed in to change notification settings - Fork 4.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[NFS] vagrant up hangs while "Mounting NFS shared folders" #5802
Comments
Sorry, my fault. I didn't notice the firewall was still enabled during |
Because I'm suffering from the same issue currently, I wonder which firewall you mean, and why it is down when you re-execute the command manually? Thank you! |
I have Little Snitch firewall on my host (Mac OS X). I had to temporary disable the firewall the first time to make the NFS mount. Then, the second time, I recorded the various port used and I placed the correct rules. |
hmmm. i confirmed my firewall is off in OSX.
still searching for the cause |
Maybe something in NFS is still hanging from a previous run. I solved the issue by restarting the NFS server every time before I call "vagrant up". |
Hi there, I no longer had the problem. I checked back my setup and I confirm the settings I already posted in this thread. To help out others, I add there further settings. In OS X firewall settings (stealth mode is ON):
In your guest OS (FreeBSD) make sure that NFS is enabled and the firewall is correctly set up. In my case I have pf and it allow everything as I use Little Snitch on OS X as global firewall. /etc/rc.conf in FreeBSD (relevant parts to NFS and Vagrant only):
/etc/pf.conf in FreeBSD (with a jail nat):
|
@bronger True: every time I changed the firewall settings I had to restart NFS. |
For anyone on OSX check your Firewall preferences Otherwise just disable the OSX Firewall altogether if you don't need it. |
@bradleyflood Actually, I don't have that option enabled and it works fine. In fact I don't think is a good security suggestion. Please look at your settings, it's not necessary to disable the firewall to make NFS working properly with Vagrant. |
Hello, I've just tested on Yosemite and these are the daemons that I had to allow on my firewall so that the shared folder was successfully mounted:
It wasn't necessary to restart nfsd after changing the firewall in order to mount the share. Thank you! |
This issue is far from resolved. It still hangs with different distros, several OSX and Vagrant versions ahead. Here's another thing that sometimes helps: Restart nfsd on the osx hostsudo nfsd restart
|
I'm running into this same issue (hanging on I've been using vagrant (and this particular project VM with an NFS mount) for years, and the latest 1.8.1 version of vagrant since its release. The specific line from my Vagrantfile:
I've tried destroying the vm, emptying the In fact, the only thing that seemed to work was rebooting the entire OS...and the problem appeared again within an hour. |
Never had this problem b4, but suddenly hit by this. It works for the first time you create / recreate a machine. Once the VM reboots, it comes back. - |
I've narrowed down my issue to something altogether different: my vms were becoming unreachable at their private ip addresses when a PIA vpn connection was established...and disconnecting it temporarily fixes the issue, so I suspect it was a network routing problem |
@EvanK +1 It hangs when I am using VPN (Junos Pulse) |
@EvanK @yalcinsurkultay I've noticed that most VPN services (especially ones configured/deployed by your workplace) will by default suck up all connections in your system. For example, if you're on VPN and you spin up a Linux VM and try to SSH to it from your host, you'll see that the traffic gets taken into the VPN. I'm sure this is due to the way they're changing the routing table on your host. At least in my case the routing table gets changed and everything is sent to a different gateway. |
@aaronjwood The VPN I use from my workplace (a Cisco, iirc) doesn't have this same issue, so it really does seem to be hit or miss ¯_(ツ)/¯ |
My 2c for this issue, Had the same problem with my Linux machine running Fedora 24 (using firewalld) and using libvirt as provider, so after reading this thread i enabled the logging option for the FW and start nmap-ing ( |
I had this again, different machine.. I found I had a broken version of virtual box, VirtualBox-5.1.4 just timed out and did nothing... VirtualBox-5.1.6 works fine. |
For anyone on OSX check your Firewall preferences System Preferences -> Security & Privacy -> Firewall -> Firewall Option go to the advanced options and make sure Automatically allow signed software to receive incoming connections is checked. this did work for me and its the simplest solution |
This issue, for me, is usually caused by network connection issues between Host / Guest. If you don't have firewall issues, then make sure your host's vboxnet0 network is both up and configured with an IP. Solution for Ubuntu 17.04:
|
Just an FYI, @chadfurman, as I've noticed your proposed solution in a few different places, that doesn't work to solve the problem for me (hanging on "Mounting NFS shared folders...") in Arch. Not sure why Vagrant isn't working anymore; had previously worked for me for a great number of years until I started having tons of pesky little problems with it like this. |
==> default: Running 'pre-boot' VM customizations... |
Be aware that NFS is not supported on Windows hosts. Reference: https://www.vagrantup.com/docs/synced-folders/nfs.html |
@lordgordon I am MAC os above windows7 operation, this can not it? |
@lordgordon Right, but there is a vagrant plugin existing for Windows which provides NFS: https://github.com/winnfsd/vagrant-winnfsd Unfortunately I've got the same issue, currently. Hang up on "Mounting NFS shared folders". But recently I've increased the harddisk capacity from 40GB to 500GB. Maybe this makes the mounting process incredibly slow. But this is just a guess. Update: Tested with 40GB version. So the size of the virtual hard disk is not the reason. |
A quick note to thank @rabin-io as the issue is still there on Fedora more than one year later. Other Fedora users may be suffering right now :-) |
For those on Fedora running into this issue I was able to resolve doing the following:
The problem for me was that nfs was failing due to the duplicate entry in the export file. Hope this helps. |
@aaronjwood I confirmed VPN is the cause of nfs mount synced_folders issue. I similarly use Juno Pulse. I tried to run vagrant up via VPN in order to access our RPM repo in our office network, at home, and the obvious routing table changes and new NIC routing interfaces created altered the behaviour of vagrant host to guest networking. When I switched of/ disconnect from my VPN, the vagrant NFS mount worked (repeatedly tested using vagrant ver 1.9.2, 1.9.8 and 2.0.3 against Virtualbox 5.1.34). However, I can obviously no longer access our office RPM repo and that caused the provisioner to fail, which our provisioning script is written to point our CentOS7 GuestOS to an internal RPM repo. To get around the above, I disconnect from our VPN, run vagrant up till NFS mount succeeds. At that point, I manually connect to our VPN so that the provisioner can continue to pull in the needed during GuestOS Thanks for the hint. Not the best solution, but it works and allows me to work from home while continue development. |
I've been stuck in same question, and i solved this by disabling the firewall. |
@Thinkscape I think is kind of the same approach but for linux so thanks for the idea! :) |
@EvanK There's an "Allow LAN Traffic" option if you're running the new PIA desktop client that fixes the issue. |
This happens occasionally for me. However when I disable the firewall it normally doesn't help. For me the solution is to restart the host (MacOS) and then everything boots just fine. |
Can confirm this problem still exists on macOS 10.14.3 … |
I had to install Sophos Home virus software on my Mac (macOS 10.14.4) for my current job as it was a VPN requirement and I had this issue. As soon as I uninstalled Sophos Home I had no vagrant issues. |
Same problem still exists on MacOS 10.14.6. I think I have tried most of solutions described here but the problem keeps coming back and back. In addition to the previously given tips doing the following has stopped the problem occurring for once or twice (or maybe it's not related at all- at least after doing this the NFS mount seems to work :) ):
|
Try In debug mode you can see what is the problem. In my case it was with one of shared folder. |
I'm going to lock this issue because it has been closed for 30 days ⏳. This helps our maintainers find and focus on the active issues. If you have found a problem that seems similar to this, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further. |
Hi there,
I'm trying to use NFS with FreeBDS yet every time I run
vagrant up
it hangs at the "Mounting NFS shared folders".Output:
Vagrantfile:
/etc/exports (host):
Host: OS X 10.9.5
Guest: FreeBSD 10.1-p10
Actually, the problems seems in the way vagrant runs the mount command in the guest box. While vagrant up hangs I can access the box with
vagrant ssh
and check the blocking commands:Then if I kill them and re-execute, everything works fine:
I'm unable to understand why the command issued by vagrant get stuck. Could you please investigate?
Thank you for your help!
Regards,
Nicholas
Further reference: wunki/vagrant-freebsd#4
The text was updated successfully, but these errors were encountered: