Skip to content
This repository has been archived by the owner on Oct 31, 2023. It is now read-only.

NFS shared folder mounting hangs #64

Open
mdarse opened this issue Sep 18, 2014 · 5 comments
Open

NFS shared folder mounting hangs #64

mdarse opened this issue Sep 18, 2014 · 5 comments

Comments

@mdarse
Copy link

mdarse commented Sep 18, 2014

Hi,

I tried to create a simple VM using $ vagrant init mitchellh/boot2docker and adding a shared folder, but it hangs during mounting:

$ vagrant up
==> default: Checking if box 'mitchellh/boot2docker' is up to date...
==> default: Verifying vmnet devices are healthy...
==> default: Preparing network adapters...
==> default: Fixed port collision for 22 => 2222. Now on port 2200.
==> default: Starting the VMware VM...
==> default: Waiting for machine to boot. This may take a few minutes...
    default: SSH address: 192.168.151.147:22
    default: SSH username: docker
    default: SSH auth method: private key
    default: Warning: Connection timeout. Retrying...
    default: Warning: Authentication failure. Retrying...
==> default: Machine booted and ready!
==> default: Checking for host entries
==> default: Forwarding ports...
    default: -- 2375 => 2375
    default: -- 22 => 2200
==> default: Configuring network adapters within the VM...
==> default: Exporting NFS shared folders...
==> default: Preparing to edit /etc/exports. Administrator privileges will be required...
Password:
==> default: Mounting NFS shared folders...

The shared folder is defined like this:

config.vm.synced_folder ".", "/vagrant", type: "nfs"

I'm running OS X 10.9.3 with Vagrant 1.6.3.

Any ideas ?

Thanks,
M.

@tricon
Copy link

tricon commented Oct 2, 2014

👍

@sebnash
Copy link

sebnash commented Oct 16, 2014

👍

I think this has something to do with vagrantfile.tpl:

# Disable synced folders because guest additions aren't available
config.vm.synced_folder ".", "/vagrant", disabled: true

As I understand it (but I’m new to this!), the guest additions are required for all synced folder types. It’s not clear to me whether adding them should be requested here, or with @boot2docker (it downloads their image).

@jmreicha
Copy link

👍

Same issue. FWIW I was able to get NFS synced folders working with this fork - https://vagrantcloud.com/yungsang/boxes/boot2docker

@jmreicha
Copy link

I have a little bit more info to add if it helps. After the mount fails it hangs because it keeps sending SSH keep alives.

...
DEBUG ssh: Sending SSH keep-alive...
DEBUG ssh: Sending SSH keep-alive...
DEBUG ssh: Sending SSH keep-alive...
...

Here is what Vagrant is presumably choking on.

DEBUG ssh: Re-using SSH connection.
 INFO ssh: Execute: mkdir -p /vagrant (sudo=true)
DEBUG ssh: Exit status: 0
DEBUG ssh: Re-using SSH connection.
 INFO ssh: Execute: mount -o 'vers=3,udp' 192.168.33.1:'/Users/jmreicha/about.me/main' /vagrant (sudo=true)
DEBUG ssh: stderr: mount: RPC: Unable to receive; errno = Connection refused
mount: mounting 192.168.33.1:/Users/jmreicha/about.me/main on /vagrant failed: Bad file descriptor

DEBUG ssh: Exit status: 110
 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' 192.168.33.1:'/Users/jmreicha/about.me/main' /vagrant

Stdout from the command:

@Freyskeyd
Copy link

Hey,

if you take a look at:

dduportal/boot2docker-vagrant-box and this PR: boot2docker-vagrant-box#5.

You need to start nfs-client before mounting any folder.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants