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

Upgrade to Virtual Box 5.0.8 causing NFS failure? #6423

Closed
freshleafmedia opened this Issue Oct 21, 2015 · 6 comments

Comments

Projects
None yet
4 participants
@freshleafmedia

freshleafmedia commented Oct 21, 2015

Hello,

Vagrant: v1.7.5
Vagrant Plugins: none
OS: Ubuntu 14.04
Virtual Box: v5.0.8

I recently upgraded Virtual Box to the latest 5.0.8 and running vagrant up now hangs at mounting the NFS directories, if I switch to synced directories it starts work but I require the use of NFS.

When running vagrant up with the VAGRANT_LOG environment variable set to info I get the following, truncated, output:

 INFO ssh: Execute: mkdir -p /var/www/vhosts (sudo=true)
 INFO ssh: Execute: mount -o 'vers=3,udp' 172.28.128.1:'/media/data/Repositories' /var/www/vhosts (sudo=true)
 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!

and then this repeats forever:

mount -o 'vers=3,udp' 172.28.128.1:'/media/data/Repositories' /var/www/vhosts

Stdout from the command:



Stderr from the command:

mount: mount to NFS server '172.28.128.1' failed: timed out (retrying).
mount: mount to NFS server '172.28.128.1' failed: timed out (retrying).
mount: mount to NFS server '172.28.128.1' failed: timed out (retrying).
mount: mount to NFS server '172.28.128.1' failed: timed out (retrying).
mount: mount to NFS server '172.28.128.1' failed: timed out (giving up).
>

I also note that if I bring up the a visualisation of the VM while its booting the following error appears when it trys to mount the NFS directory:

NFSD: Using /var/lib/nfs/v4recovery as the NFSv4 state recovery directory
NFSD: starting 90-second grace period

One other thing to note is that I am using out of date guest additions Version 4.1.6. Could this be it?

@bouche

This comment has been minimized.

bouche commented Oct 21, 2015

This seems to be a kernel problem. I ran into the same problem, after receiving the latest kernel update for ubuntu (3.13.0-65 to 3.13.0-66). Running the old kernel, the nfs-mounts work as intended.
The same goes for current utopic-kernel (3.16.0-51).
Another workaround I found: use nfs_udp: false (optionally in addition to nfs_version: '4') in config.vm.synced_folder definition in your Vagrantfile. The problem occurs only when using nfs over UDP.

@freshleafmedia

This comment has been minimized.

freshleafmedia commented Oct 22, 2015

Thanks @bouche, seems setting the nfs_version to 4 (on its own or with nfs_udp set to false aswell) throws an error, though I suspect this is caused by the guest machine running a really old version of CentOS 5.6:

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

mount -o 'vers=4,udp' 172.28.128.1:'/media/data/Repositories' /var/www/vhosts

Stdout from the command:



Stderr from the command:

'vers=4' is not supported.  Use '-t nfs4' instead

Setting nfs_udp to false works a treat, though i guess this will be a little slower

@bouche

This comment has been minimized.

bouche commented Oct 22, 2015

@freshleafmedia You're welcome, great to hear that it works.

If you would like to upvote or help testing, a launchpad-bug has meanwhile been reported and the probable root of this problem has been traced:
https://bugs.launchpad.net/ubuntu/+source/linux/+bug/1508510

@treb0r

This comment has been minimized.

treb0r commented Oct 23, 2015

Thanks @bouche this nfs problem has been driving me crazy.

Using nfs_udp: false did the trick for me too.

@bouche

This comment has been minimized.

bouche commented Nov 4, 2015

New ubuntu kernel versions (3.13.0-67 and 3.16.0-52) with fixes for this bug have just been released.

@sethvargo

This comment has been minimized.

Contributor

sethvargo commented Nov 8, 2015

Looks like this has been fixed upstream. Thanks everyone! 😄

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment