I know there are other issues around this problem, but perhaps my situation is a little different.
So I'm hitting errors on mounting a shared directory. The funny thing is, it WORKS when I create a new VM, though it seems to hit a bunch of errors before somehow finally working. See below:
DEBUG ssh: Exit status: 0
DEBUG ssh: Re-using SSH connection.
INFO ssh: Execute: mount -o vers=3 10.98.0.1:'/Users/nivlac/work/nucleus' /home/vagrant/work (sudo=true)
DEBUG ssh: stderr: stdin: is not a tty
DEBUG ssh: stderr: mount.nfs: requested NFS version or transport protocol is not supported
DEBUG ssh: Exit status: 32
INFO retryable: Retryable exception raised: #<Vagrant::Errors::LinuxNFSMountFailed: The following SSH command responded with a non-zero exit status.
Vagrant assumes that this means the command failed!
mount -o vers=3 10.98.0.1:'/Users/nivlac/work/nucleus' /home/vagrant/work>
DEBUG ssh: Re-using SSH connection.
INFO ssh: Execute: mount -o vers=3 10.98.0.1:'/Users/nivlac/work/nucleus' /home/vagrant/work (sudo=true)
DEBUG ssh: stderr: stdin: is not a tty
DEBUG ssh: stderr: mount.nfs: requested NFS version or transport protocol is not supported
DEBUG ssh: Exit status: 32
INFO retryable: Retryable exception raised: #<Vagrant::Errors::LinuxNFSMountFailed: The following SSH command responded with a non-zero exit status.
Vagrant assumes that this means the command failed!
mount -o vers=3 10.98.0.1:'/Users/nivlac/work/nucleus' /home/vagrant/work>
DEBUG ssh: Re-using SSH connection.
INFO ssh: Execute: mount -o vers=3 10.98.0.1:'/Users/nivlac/work/nucleus' /home/vagrant/work (sudo=true)
DEBUG ssh: stderr: stdin: is not a tty
DEBUG ssh: stderr: mount.nfs: requested NFS version or transport protocol is not supported
DEBUG ssh: Exit status: 32
INFO retryable: Retryable exception raised: #<Vagrant::Errors::LinuxNFSMountFailed: The following SSH command responded with a non-zero exit status.
Vagrant assumes that this means the command failed!
mount -o vers=3 10.98.0.1:'/Users/nivlac/work/nucleus' /home/vagrant/work>
DEBUG ssh: Re-using SSH connection.
INFO ssh: Execute: mount -o vers=3 10.98.0.1:'/Users/nivlac/work/nucleus' /home/vagrant/work (sudo=true)
DEBUG ssh: stderr: stdin: is not a tty
DEBUG ssh: Exit status: 0
DEBUG ssh: Checking whether SSH is ready...
DEBUG ssh: Re-using SSH connection.
INFO ssh: SSH is ready!
INFO guest: Execute capability: shell_expand_guest_path (ubuntu)
But once it's created, on any subsequent vagrant up commands (after I do a halt), it just fails.
mount -o vers=3 10.98.0.1:'/Users/nivlac/work/nucleus' /home/vagrant/work>
DEBUG ssh: Re-using SSH connection.
INFO ssh: Execute: mount -o vers=3 10.98.0.1:'/Users/nivlac/work/nucleus' /home/vagrant/work (sudo=true)
DEBUG ssh: stderr: stdin: is not a tty
DEBUG ssh: stderr: mount.nfs: requested NFS version or transport protocol is not supported
DEBUG ssh: Exit status: 32
INFO retryable: Retryable exception raised: #<Vagrant::Errors::LinuxNFSMountFailed: The following SSH command responded with a non-zero exit status.
Vagrant assumes that this means the command failed!
mount -o vers=3 10.98.0.1:'/Users/nivlac/work/nucleus' /home/vagrant/work>
DEBUG ssh: Re-using SSH connection.
INFO ssh: Execute: mount -o vers=3 10.98.0.1:'/Users/nivlac/work/nucleus' /home/vagrant/work (sudo=true)
DEBUG ssh: stderr: stdin: is not a tty
DEBUG ssh: stderr: mount.nfs: access denied by server while mounting 10.98.0.1:/Users/nivlac/work/nucleus
The following SSH command responded with a non-zero exit status.
Vagrant assumes that this means the command failed!
mount -o vers=3 10.98.0.1:'/Users/nivlac/work/nucleus' /home/vagrant/work
I've been using Vagrant for several months now... this error just started happening yesterday.
Vagrant version 1.2.4
Addtl info: From /var/log/syslog:
Jul 18 00:58:58 dev-02 kernel: [ 324.707810] RPC: server 10.98.0.1 requires stronger authentication.
Jul 18 00:59:00 dev-02 kernel: [ 326.743088] RPC: server 10.98.0.1 requires stronger authentication.
Jul 18 00:59:26 dev-02 kernel: [ 352.926302] RPC: server 10.98.0.1 requires stronger authentication.
Jul 18 00:59:38 dev-02 kernel: [ 364.570143] RPC: server 10.98.0.1 requires stronger authentication.
I can confirm this problem. Originally thought my NFS problems were fixed by upgrading from 1.2.2 to 1.2.3, only to see the volume fail to mount after the 'up' command was run for the first time. Running Vagrant on OS X 10.8.4 using a precise32 box.
I can't reproduce this problem, although I clearly believe it is happening due to the many comments here.
To explain the "errors repeateadly" problem (I realize thats not the bug being reported): Vagrant has to restart the host NFS server. So while exit status 32 happens with mount.nfs, Vagrant retries continuously. So _that_ part is working as expected.
But I'm not seeing this problem right now. Any more info to help me?
Thanks for the reply @mitchellh. I'm not sure what other info I should give. If you google the error "rpc server requires strong auth", there's lots of hits but I can't find a solution.
I'll keep digging.
I still haven't been able to figure this out. I'm going to need help in order to reproduce this. Have people still been having this problem often? If I can't reproduce this I can't really fix it unfortunately. :(
I've run into this issue as well, but im getting a different error. My log message is as follows:
"mount.nfs: mount to NFS server '192.168.56.1:/Users/user/mount' failed: timed out, giving up"
Running OSX 10.8.5 with vagrant 1.3.4 and virtualbox 4.2.18.
I am unable to connect to my virtualbox to my host.
+1
Having the same issue running vagrant 1.3.5, VirtualBox 4.2.18 and Mac OS X 10.9.
DEBUG ssh: stderr: mount.nfs: requested NFS version or transport protocol is not supported
DEBUG ssh: Exit status: 32
INFO retryable: Retryable exception raised: #<Vagrant::Errors::LinuxNFSMountFailed: The following SSH command responded with a non-zero exit status.
Vagrant assumes that this means the command failed!
mount -o 'vers=3,udp' 172.84.98.1:'/path/to/shared/folder' /vagrant
Stdout from the command:
Stderr from the command:
mount.nfs: requested NFS version or transport protocol is not supported
Same for me
I can't get it to work on two different machines. Both VirtaulBox 4.3.2, Vagrant 1.3.5 and OSX 10.9
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.240.1:'/Volumes/Media/Code/code/unity/share' /srv/httpd
Stdout from the command:
Stderr from the command:
stdin: is not a tty
mount.nfs: access denied by server while mounting 192.168.240.1:/Volumes/Media/Code/code/unity/share
Edit: Got it working. I completely removed everything Vagrant and VirtualBox and re-installed both. But I guess the trick was to remove any old exports in /etc/exports and restart nfsd.
For the recent commets here: I increased the retry timeout in core and it seems to have gotten rid of these issues for people. It looks like NFS server takes a bit longer to restart sometimes on Mavericks, oddly.
When will this be released? Or is there another way to get this fix?
To be clear, the issue is that Mavericks takes longer to start the NFS server resulting in a timeout of mounting those drives?
Just so I understand this better, does vagrant start the NFS server on vagrant up with Mac OS X hosts?
Getting the same problem after apt-get upgrade in my Vagrant box (running on Mac OSX Mavericks) any tips would be welcome.
Please ignore, updating to the latest vagrant and virtualbox solved the problem.
Solution for ubuntu 12.04 LTS 64bit _as the host machine_, nfs common and nfs server both needed to install, also using vagrant 1.3.5 and 4.3.2 of virtualbox (newer version combinations may work)
( faviouz commented in https://github.com/mitchellh/vagrant/issues/1534 )
$ sudo apt-get install nfs-common nfs-kernel-server worked for me on Ubuntu 13.10.
therobyouknow commented:
@faviouz - this worked for me too on Ubuntu 12.04 LTS 64bit - thanks both are needed, not just nfs-common. When I had only installed nfs-common, I got this 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' 33.33.33.1:'/home/hostmachinevagrantfolder/sites' /var/www
Stdout from the command:
Stderr from the command:
stdin: is not a tty
mount.nfs: requested NFS version or transport protocol is not supported
Once I installed nfs-kernel-server too, this error did not occur
So yes, use:
sudo apt-get install nfs-common nfs-kernel-server
I am using VirtualBox 4.3.2 with Vagrant 1.3.5
Yes I know there are later versions of both but from experience with Mac and Windows, certain version combinations don't work (fatal errors) but I will try the later versions at some point. Sometimes I find that the latest and greatest virtualbox sometimes has regression.
For completeness, a few folks here are going on about repairing /etc/hosts file BUT don't actually say what the repair actually is. OK then, here's what my whole complete /etc/hosts file looks like, here you go! :-
127.0.0.1 localhost
127.0.1.1 rob-ThinkPad-X201s
# The following lines are desirable for IPv6 capable hosts
::1 ip6-localhost ip6-loopback
fe00::0 ip6-localnet
ff00::0 ip6-mcastprefix
ff02::1 ip6-allnodes
ff02::2 ip6-allrouters
+1 vagrant version: 1.5.1 VirtualBox version: 4.3.10
Exit status: 32 on mount.nfs
+1 on vagrant version: 1.5.1 VirtualBox version: 4.3.10
For me it was broken /etc/hosts file as well. Accidentally commented line 127.0.0.1 localhost which caused the problem. Uncommenting it was the solution.
For me it was host only network. vboxnet0
To fix this on mac. Run following on your host (outside of vagrant)
$ sudo ifconfig vboxnet0 down
$ sudo ifconfig vboxnet0 up
adding the line 127.0.0.1 localhost to the /etc/hosts file worked for me as well
I'm with vagrant 1.6.2 and vbox 4.3.10
can confirm @therobyouknow 's answer works on 14.04 x64 as well.
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.33.1:'/Users/mogetutu/Projects/platform' /var/www
Stdout from the command:
Stderr from the command:
stdin: is not a tty
mount.nfs: Connection timed out
For me unblocking all incoming connections in my firewall settings - OS X did the trick.
Tried everything above and could not get mounting to work. Changing the private network ip address seemed to somehow fix it, although not sure why as there shouldn't be any network conflicts.
@tommcquarrie thanks - glad that worked for you. The following may be of interest, https://github.com/mitchellh/vagrant/issues/1744#issuecomment-53476824
Doesn't have correlation with firewall because I powered off mine and it still occur. @mogetutu
@mogetutu Thanks, I had exactly the same issue on Ubuntu 14.04, I switched off firewall and installation went well, everything works now.
But how to change firewall settings ?
In the firewall, I'm using gufw, first I added predefined rule for NFS from the list. Everytime when NFS is started it's working on custom port, it change port, so if we want add rule for NFS to our firewall we need first set custom port in NFS config file:
$ sudo nano /etc/default/nfs-kernel-server
Find line beggining with RPCMOUNTDOPTS and change to:
RPCMOUNTDOPTS="-p <our custom port here>"
Our custom port have to be any port which is not used already by other services in our system.
Save that file, than we have to restart NFS:
$ sudo /etc/init.d/nfs-kernel-server restart
I found more on:
http://askubuntu.com/questions/103910/nfs-is-blocked-by-ufw-even-though-ports-are-opened
Now you can include that custom port of NFS in your firewall rules so NFS will always work.
@shishirsharma : Your solution worked for me. I halted all running VM's, ran "sudo ifconfig ... down" for all the vboxnet networks, and "vagrant up" worked. Previously, I rebooted my host machine, but I did not like that "solution".
Just experienced the same ('mount.nfs: requested NFS version or transport protocol is not supported') on OS X Yosemite 10.10.2, vagrant 1.7.2, VirtualBox 4.3.20
After disabling UDP for the nfs connection it worked again: config.vm.synced_folder ".", "/vagrant", type: "nfs", nfs_udp: false
Not sure whats the NFS-UDP status on OS X is right now.
For what it's worth
Quote @fnordfish Just experienced the same ('mount.nfs: requested NFS version or transport
protocol is not supported') on OS X Yosemite 10.10.2, vagrant 1.7.2, VirtualBox 4.3.20
Same exact configuration - works on my box, doesn't work on my colleague's box. We cannot seem to figure out any differences between our two MacbookPro's after 8 hours of scouring each other's configs, caches, and googling the errors, uninstalling and reinstalling everything. To no avail. He gets asked for [email protected]'s password and I don't (it's tcuser). NFS mounts work fine on my box but not on his. Even ran disk utility to see if there were bad folder permissions. It's truly mind-boggling.
Never thought this would be the problem but i fixed it by setting my /etc/hosts to the default.
Thanks @therobyouknow !
Hope somebody else is helped by this
Thanks @shishirsharma Your solution worked for me
$ sudo ifconfig vboxnet0 down
$ sudo ifconfig vboxnet0 up
For me the problems was also caused by the /etc/hosts file of my OSX: I have two vagrant boxes, on different ip-addresses (192.168.56.x and 192.168.55.x). Initially, the both worked, but after restart of my system, I had disable one of these ip-addresses in my hosts file to run a 'vagrant up'.
Can someone explain what is the relation between the hosts file and the mounting of external paths by NFS?
I'm facing the same problem (@phpguru) :
('mount.nfs: requested NFS version or transport protocol is not supported')
With:
Vagrant 1.7.2
VirtualBox 4.3.28
OSX 10.10.3
Plugins:
vagrant-cachier (1.2.0)
vagrant-hostmanager (1.5.0)
vagrant-share (1.1.3, system)
I tried on a macbook air with OSX 10.10.3 and it worked with the same settings/versions that on my macbook pro that doesn't. I can't figure out why it's happening to me :/
installing these
sudo apt-get install nfs-common nfs-kernel-server
fixed it for me.
For me it was a malformed PATH variable. Fixing it in the bash config files, then exiting and restarting the shell completely (sourcing will just append) fixed it.
Vagrant used to work fine... now "vagrant up" is prompting for a sudo password -- I suspect that might be related to HFS timing out. Concerned that the user on the host system needs sudo...
I am having the same issue with @tristanbes . I have sudo apt-get install nfs-common nfs-kernel-server run in my guest ubuntu machine, but vagrant reload still spits mount.nfs: requested NFS version or transport protocol is not supported.
i have a Mac and had the same problem, the solution for me was changing all the synced_folder in Vagrantfile to nfs_udp:false and nfs: true, everything works in TCP protocol and the default for vagrant is UDP.
Same problem on a Mac since Monday december 14, 2015 after a system reboot. I thought it had to do with installing VMware 8.0.2, but restoring 8.0.0 did not fix the issue. The issue appears with all my VM's. None of the suggestions listed here helped so far. I also tried to issue the command manually from within the VM, also with tcp, but it did not help. Any mismatch between nfs on the guest and nfs on the host (such as a wrong /etc/hosts file) can trigger the error. The same error could come from a port mismatch for nfs (default is 2049). Just in my case, I wasn't lucky enough to find the cause and I am stuck with machines that do not properly sync their files, because I have to turn off nfs to be able to share any files at all. I re-installed Vagrant, I updated the plugins, I reinstalled VMware, I destroyed and rebuilt the boxes, I installed the nfs server inside the box, nothing helped.
I think it has not so much to do with Vagrant itself, but something seems to have changed in the configuration of nfs on the mac that is now conflicting with the box.
Output from netstat:
tcp6 0 0 _.2049 *._ LISTEN
tcp4 0 0 _.2049 *._ LISTEN
udp6 0 0 _.2049 *._
udp4 0 0 _.2049 *._
Looks like the mac is not listening for udp connections on the default nfs port, but it does not help to connect with tcp from the guest machine.
Edit [May 18, 2016]:
After a long time and lots of similar problems, all related to sharing a file system with a vagrant box with either vboxfs, HGFS or nfs, which all failed with similar errors, I realized the cause might be that I installed sshfs on top of OSX FUSE, as explained here: https://github.com/osxfuse/osxfuse/wiki/SSHFS
I followed their instructions to remove sshfs and straight after that, I could use nfs again with a vagrant box.
It seems to me that many solutions provided on this page may work in some situations, but not in others. As soon as file sharing over ssh fails, you get this weird error message, pointing one in the wrong direction, as if nfs wasn't supported. It may be supported allright, but not working for any of many reasons.
Also, if VMware tools aren't (properly) installed, HGFS will fail because of that. If a synced folder other than default is used, nfs might work, but HGFS will still fail on the default folder. This can be solved by explicitly disabling the default folder like so:
mymachine.vm.synced_folder ".", "/vagrant", disabled: true
If you forget this, but are using a custom synced folder AND VMware tools aren't properly installed, you might see a confusing output like this:
==> mymachine: Exporting NFS shared folders...
==> mymachine: Preparing to edit /etc/exports. Administrator privileges will be required...
==> mymachine: Mounting NFS shared folders...
==> mymachine: Waiting for HGFS kernel module to load...
The HGFS kernel module was not found on the running virtual machine.
This must be installed for shared folders to work properly. Please
install the VMware tools within the guest and try again. Note that
the VMware tools installation will succeed even if HGFS fails
to properly install. Carefully read the output of the VMware tools
installation to verify the HGFS kernel modules were installed properly.
Edit[May 23, 2016] And once more, after a reboot of my MacBook Pro, the same error occurs, and this time, there is no sshfs to uninstall, so I am back to where I started...
Same day:
I finally realized I had to fix the hosts file on the host machine. Indeed, there was no entry 127.0.0.1 locahost After I added it, nfs worked for me too, however, I am still a bit sceptical, since this error just comes and goes as it pleases.
@c-castillo solution works for me. :+1:
For me it's similar to @lambertb: with 2 VMs, I had to remove the mapping of the VMs' IP to localhost from /etc/hosts (OS X Yosemite).
Installing nfs-common and nfs-kernel-service wasn't enough for me. I had to start up both services in debian.
Just ran into this issue myself, with macOS Sierra as the host OS. Restarting the host seems to have done the trick to fix it for me, but I haven't the slightest clue why.
Had nfs timoeout while trying to mount from guest to ubuntu 16.04.01 host.
After disabling ufw, it worked! :-)
https://github.com/mitchellh/vagrant/issues/1941#issuecomment-43098597 fixed it for me. adding 127.0.0.1 to the hosts file and
$ sudo ifconfig vboxnet0 down
$ sudo ifconfig vboxnet0 up
@fengler-it's solution worked for me:
$ sudo ufw disable
$ vagrant up --provision
$ sudo ufw enable
For Mac OS Sierra this solve my day! (Vagrant 1.9.2)
https://github.com/mitchellh/vagrant/issues/5424#issuecomment-284816293
I had a similar problem in Ubuntu, Vagrant version 1.9.3, VB version 5.1.22
The problem was that my host's OS has changed the ifconfig to the ip command, and vboxnet0 did not have an ip address.
I had to run:
ip a add 192.168.33.1/255.255.255.0 dev vboxnet0 before Vagrant could start the NFS share
There were many other things I tried: starting/stopping the firewall (ufw, iptables, both, neither); adding specific rules to the firewall to allow all traffic to this IP; service start for each of nfs-common, nfs-kernel-server, nfs-server, nfs-client; and clearing out my /etc/exports
It wasn't until I made sure my vboxnet0 had an IP on the host machine that everything worked.
For another take on this: in current debian it seems that nfs-kernel-server is not sufficient for vagrant any more. I had to remove that in favour of the userland implementation of nfs-server, which made it run happily.
$ vagrant --version
Vagrant 1.9.8
Would like to add if you're using OSX 10.14 and running this issue, please follow this simple step would help https://github.com/hashicorp/vagrant/issues/10234
The Mojave upgrade removes/disables NFS, resulting the /etc/exports being renamed to #/etc/exportsbak
I updated Vagrant to the latest version and it solved it for me (macOS 10.13.6)
Had the same issue after i tried to upgrade in virtualbox vagrant (stupid). I tried almost everything from above and pretty much from any other forum out there. I the end i got it working half way, but the project files from the vagrant project were not piped in the new environment(still not sure why...). What worked in the end:
~/'VirtualBox' and ~./.config/VirtualBox./opt/ and /usr/bin/etc/hosts and /etc/exports all listings which are dependent to your virtualbox/vagrant environment.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.
Most helpful comment
For me it was host only network.
vboxnet0To fix this on mac. Run following on your host (outside of vagrant)