Skip to content
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 mount error on 1.2.7 #2030

Closed
mconigliaro opened this issue Aug 6, 2013 · 3 comments
Closed

NFS mount error on 1.2.7 #2030

mconigliaro opened this issue Aug 6, 2013 · 3 comments

Comments

@mconigliaro
Copy link

We're still seeing this problem for some users with 1.2.7, but the debug output doesn't show anything useful. We tried running the mount command manually with verbose output (mount -o udp,vers=3 33.33.33.1:'/Users/costi' /vagrant_host_home) and saw this:

mount.nfs: mount(2): Operation not supported
mount.nfs: mount to NFS server '33.33.33.1:/Users/costi' failed: RPC Error: Program not registered

We've tried all the solutions listed in #1744 plus more:

  • Firewall is disabled
  • /etc/exports looks fine
  • sudo nfsd checkexports (no output)
  • nfsd restart
  • Trailing slashes don't matter
  • Removing udp and/or vers=3 has no effect

The relevant debug output is below, though it just seems to be a lot of the same stuff printed over and over:

mount.nfs: an incorrect mount option was specified

INFO warden: Beginning recovery process...
INFO warden: Recovery complete.
INFO warden: Beginning recovery process...
INFO warden: Recovery complete.
INFO warden: Beginning recovery process...
INFO warden: Recovery complete.
INFO warden: Beginning recovery process...
INFO warden: Recovery complete.
INFO warden: Beginning recovery process...
INFO warden: Recovery complete.
INFO warden: Beginning recovery process...
INFO warden: Recovery complete.
INFO warden: Beginning recovery process...
INFO warden: Recovery complete.
INFO warden: Beginning recovery process...
INFO warden: Recovery complete.
INFO warden: Beginning recovery process...
INFO warden: Recovery complete.
INFO warden: Beginning recovery process...
INFO warden: Recovery complete.
INFO warden: Beginning recovery process...
INFO warden: Recovery complete.
INFO warden: Beginning recovery process...
INFO warden: Recovery complete.
ERROR warden: Error occurred: The following SSH command responded with a non-zero exit status.
Vagrant assumes that this means the command failed!

mount -o udp,vers=3 33.33.33.1:'/Users/costi' /vagrant_host_home

Stdout from the command:



Stderr from the command:

stdin: is not a tty
mount.nfs: an incorrect mount option was specified

INFO warden: Beginning recovery process...
INFO warden: Calling recover: #<Vagrant::Action::Builtin::Call:0x00000100d9d6a8>
INFO warden: Beginning recovery process...
INFO warden: Recovery complete.
INFO warden: Recovery complete.
ERROR warden: Error occurred: The following SSH command responded with a non-zero exit status.
Vagrant assumes that this means the command failed!

mount -o udp,vers=3 33.33.33.1:'/Users/costi' /vagrant_host_home

Stdout from the command:



Stderr from the command:

stdin: is not a tty
mount.nfs: an incorrect mount option was specified

INFO warden: Beginning recovery process...
INFO warden: Calling recover: #<Vagrant::Action::Builtin::Call:0x00000103cc0200>
INFO warden: Beginning recovery process...
INFO warden: Recovery complete.
INFO warden: Recovery complete.
ERROR warden: Error occurred: The following SSH command responded with a non-zero exit status.
Vagrant assumes that this means the command failed!

mount -o udp,vers=3 33.33.33.1:'/Users/costi' /vagrant_host_home

Stdout from the command:



Stderr from the command:

stdin: is not a tty
mount.nfs: an incorrect mount option was specified

INFO warden: Beginning recovery process...
INFO warden: Calling recover: #<Vagrant::Action::Builtin::Call:0x00000103d80eb0>
INFO warden: Beginning recovery process...
INFO warden: Recovery complete.
INFO warden: Calling recover: #<Vagrant::Action::Builtin::Call:0x00000103d80f50>
INFO warden: Beginning recovery process...
INFO warden: Calling recover: #<Vagrant::Action::Builtin::Call:0x00000103804bf8>
INFO warden: Beginning recovery process...
INFO warden: Recovery complete.
INFO warden: Calling recover: #<Vagrant::Action::Builtin::Call:0x00000103804d10>
INFO warden: Beginning recovery process...
INFO warden: Recovery complete.
INFO warden: Recovery complete.
INFO warden: Recovery complete.
INFO warden: Beginning recovery process...
INFO warden: Recovery complete.
INFO warden: Beginning recovery process...
INFO warden: Recovery complete.
INFO warden: Beginning recovery process...
INFO warden: Recovery complete.
INFO warden: Beginning recovery process...
INFO warden: Recovery complete.
INFO warden: Beginning recovery process...
INFO warden: Recovery complete.
INFO warden: Beginning recovery process...
INFO warden: Recovery complete.
INFO warden: Beginning recovery process...
INFO warden: Recovery complete.
INFO warden: Beginning recovery process...
INFO warden: Recovery complete.
INFO warden: Beginning recovery process...
INFO warden: Recovery complete.
ERROR warden: Error occurred: The following SSH command responded with a non-zero exit status.
Vagrant assumes that this means the command failed!

mount -o udp,vers=3 33.33.33.1:'/Users/costi' /vagrant_host_home

Stdout from the command:



Stderr from the command:

stdin: is not a tty
mount.nfs: an incorrect mount option was specified

INFO warden: Beginning recovery process...
INFO warden: Calling recover: #<Vagrant::Action::Builtin::Call:0x00000100bcc5b8>
INFO warden: Beginning recovery process...
INFO warden: Recovery complete.
INFO warden: Recovery complete.
INFO warden: Beginning recovery process...
INFO warden: Recovery complete.
INFO environment: Running hook: environment_unload
INFO runner: Running action: #<Vagrant::Action::Builder:0x00000100903b88>
ERROR vagrant: Vagrant experienced an error! Details:
ERROR vagrant: #<Vagrant::Errors::LinuxNFSMountFailed: The following SSH command responded with a non-zero exit status.
Vagrant assumes that this means the command failed!

mount -o udp,vers=3 33.33.33.1:'/Users/costi' /vagrant_host_home

Stdout from the command:



Stderr from the command:

stdin: is not a tty
mount.nfs: an incorrect mount option was specified
>
ERROR vagrant: The following SSH command responded with a non-zero exit status.
Vagrant assumes that this means the command failed!

mount -o udp,vers=3 33.33.33.1:'/Users/costi' /vagrant_host_home

Stdout from the command:



Stderr from the command:

stdin: is not a tty
mount.nfs: an incorrect mount option was specified

ERROR vagrant: /Applications/Vagrant/embedded/gems/gems/vagrant-1.2.7/plugins/communicators/ssh/communicator.rb:84:in `execute'
/Applications/Vagrant/embedded/gems/gems/vagrant-1.2.7/plugins/communicators/ssh/communicator.rb:94:in `sudo'
/Applications/Vagrant/embedded/gems/gems/vagrant-1.2.7/plugins/guests/linux/cap/mount_nfs.rb:24:in `block (2 levels) in mount_nfs_folder'
/Applications/Vagrant/embedded/gems/gems/vagrant-1.2.7/lib/vagrant/util/retryable.rb:17:in `retryable'
/Applications/Vagrant/embedded/gems/gems/vagrant-1.2.7/plugins/guests/linux/cap/mount_nfs.rb:23:in `block in mount_nfs_folder'
/Applications/Vagrant/embedded/gems/gems/vagrant-1.2.7/plugins/guests/linux/cap/mount_nfs.rb:10:in `each'
/Applications/Vagrant/embedded/gems/gems/vagrant-1.2.7/plugins/guests/linux/cap/mount_nfs.rb:10:in `mount_nfs_folder'
/Applications/Vagrant/embedded/gems/gems/vagrant-1.2.7/lib/vagrant/guest.rb:139:in `call'
/Applications/Vagrant/embedded/gems/gems/vagrant-1.2.7/lib/vagrant/guest.rb:139:in `capability'
/Applications/Vagrant/embedded/gems/gems/vagrant-1.2.7/lib/vagrant/action/builtin/nfs.rb:89:in `call'
/Applications/Vagrant/embedded/gems/gems/vagrant-1.2.7/lib/vagrant/action/warden.rb:34:in `call'
/Applications/Vagrant/embedded/gems/gems/vagrant-1.2.7/plugins/providers/virtualbox/action/prune_nfs_exports.rb:15:in `call'
/Applications/Vagrant/embedded/gems/gems/vagrant-1.2.7/lib/vagrant/action/warden.rb:34:in `call'
/Applications/Vagrant/embedded/gems/gems/vagrant-1.2.7/lib/vagrant/action/builtin/handle_forwarded_port_collisions.rb:118:in `call'
/Applications/Vagrant/embedded/gems/gems/vagrant-1.2.7/lib/vagrant/action/warden.rb:34:in `call'
/Applications/Vagrant/embedded/gems/gems/vagrant-1.2.7/plugins/providers/virtualbox/action/prepare_forwarded_port_collision_params.rb:30:in `call'
/Applications/Vagrant/embedded/gems/gems/vagrant-1.2.7/lib/vagrant/action/warden.rb:34:in `call'
/Applications/Vagrant/embedded/gems/gems/vagrant-1.2.7/lib/vagrant/action/builtin/env_set.rb:19:in `call'
/Applications/Vagrant/embedded/gems/gems/vagrant-1.2.7/lib/vagrant/action/warden.rb:34:in `call'
/Users/costi/.vagrant.d/gems/gems/vagrant-berkshelf-1.3.3/lib/berkshelf/vagrant/action/upload.rb:25:in `call'
/Applications/Vagrant/embedded/gems/gems/vagrant-1.2.7/lib/vagrant/action/warden.rb:34:in `call'
/Users/costi/.vagrant.d/gems/gems/vagrant-berkshelf-1.3.3/lib/berkshelf/vagrant/action/install.rb:33:in `call'
/Applications/Vagrant/embedded/gems/gems/vagrant-1.2.7/lib/vagrant/action/warden.rb:34:in `call'
/Applications/Vagrant/embedded/gems/gems/vagrant-1.2.7/lib/vagrant/action/builtin/provision.rb:45:in `call'
/Applications/Vagrant/embedded/gems/gems/vagrant-1.2.7/lib/vagrant/action/warden.rb:34:in `call'
/Applications/Vagrant/embedded/gems/gems/vagrant-1.2.7/plugins/providers/virtualbox/action/clear_forwarded_ports.rb:13:in `call'
/Applications/Vagrant/embedded/gems/gems/vagrant-1.2.7/lib/vagrant/action/warden.rb:34:in `call'
/Applications/Vagrant/embedded/gems/gems/vagrant-1.2.7/plugins/providers/virtualbox/action/set_name.rb:35:in `call'
/Applications/Vagrant/embedded/gems/gems/vagrant-1.2.7/lib/vagrant/action/warden.rb:34:in `call'
/Applications/Vagrant/embedded/gems/gems/vagrant-1.2.7/plugins/providers/virtualbox/action/clean_machine_folder.rb:17:in `call'
/Applications/Vagrant/embedded/gems/gems/vagrant-1.2.7/lib/vagrant/action/warden.rb:34:in `call'
/Applications/Vagrant/embedded/gems/gems/vagrant-1.2.7/plugins/providers/virtualbox/action/check_accessible.rb:18:in `call'
/Applications/Vagrant/embedded/gems/gems/vagrant-1.2.7/lib/vagrant/action/warden.rb:34:in `call'
/Applications/Vagrant/embedded/gems/gems/vagrant-1.2.7/lib/vagrant/action/runner.rb:61:in `block in run'
/Applications/Vagrant/embedded/gems/gems/vagrant-1.2.7/lib/vagrant/util/busy.rb:19:in `busy'
/Applications/Vagrant/embedded/gems/gems/vagrant-1.2.7/lib/vagrant/action/runner.rb:61:in `run'
/Applications/Vagrant/embedded/gems/gems/vagrant-1.2.7/lib/vagrant/action/builtin/call.rb:51:in `call'
/Applications/Vagrant/embedded/gems/gems/vagrant-1.2.7/lib/vagrant/action/warden.rb:34:in `call'
/Applications/Vagrant/embedded/gems/gems/vagrant-1.2.7/lib/vagrant/action/runner.rb:61:in `block in run'
/Applications/Vagrant/embedded/gems/gems/vagrant-1.2.7/lib/vagrant/util/busy.rb:19:in `busy'
/Applications/Vagrant/embedded/gems/gems/vagrant-1.2.7/lib/vagrant/action/runner.rb:61:in `run'
/Applications/Vagrant/embedded/gems/gems/vagrant-1.2.7/lib/vagrant/action/builtin/call.rb:51:in `call'
/Applications/Vagrant/embedded/gems/gems/vagrant-1.2.7/lib/vagrant/action/warden.rb:34:in `call'
/Applications/Vagrant/embedded/gems/gems/vagrant-1.2.7/lib/vagrant/action/runner.rb:61:in `block in run'
/Applications/Vagrant/embedded/gems/gems/vagrant-1.2.7/lib/vagrant/util/busy.rb:19:in `busy'
/Applications/Vagrant/embedded/gems/gems/vagrant-1.2.7/lib/vagrant/action/runner.rb:61:in `run'
/Applications/Vagrant/embedded/gems/gems/vagrant-1.2.7/lib/vagrant/action/builtin/call.rb:51:in `call'
/Applications/Vagrant/embedded/gems/gems/vagrant-1.2.7/lib/vagrant/action/warden.rb:34:in `call'
/Applications/Vagrant/embedded/gems/gems/vagrant-1.2.7/lib/vagrant/action/builtin/config_validate.rb:25:in `call'
/Applications/Vagrant/embedded/gems/gems/vagrant-1.2.7/lib/vagrant/action/warden.rb:34:in `call'
/Applications/Vagrant/embedded/gems/gems/vagrant-1.2.7/plugins/providers/virtualbox/action/check_virtualbox.rb:17:in `call'
/Applications/Vagrant/embedded/gems/gems/vagrant-1.2.7/lib/vagrant/action/warden.rb:34:in `call'
/Applications/Vagrant/embedded/gems/gems/vagrant-1.2.7/lib/vagrant/action/builtin/call.rb:57:in `call'
/Applications/Vagrant/embedded/gems/gems/vagrant-1.2.7/lib/vagrant/action/warden.rb:34:in `call'
/Applications/Vagrant/embedded/gems/gems/vagrant-1.2.7/plugins/providers/virtualbox/action/check_virtualbox.rb:17:in `call'
/Applications/Vagrant/embedded/gems/gems/vagrant-1.2.7/lib/vagrant/action/warden.rb:34:in `call'
/Applications/Vagrant/embedded/gems/gems/vagrant-1.2.7/lib/vagrant/action/builtin/config_validate.rb:25:in `call'
/Applications/Vagrant/embedded/gems/gems/vagrant-1.2.7/lib/vagrant/action/warden.rb:34:in `call'
/Users/costi/.vagrant.d/gems/gems/vagrant-berkshelf-1.3.3/lib/berkshelf/vagrant/action/configure_chef.rb:23:in `call'
/Applications/Vagrant/embedded/gems/gems/vagrant-1.2.7/lib/vagrant/action/warden.rb:34:in `call'
/Users/costi/.vagrant.d/gems/gems/vagrant-berkshelf-1.3.3/lib/berkshelf/vagrant/action/load_shelf.rb:28:in `call'
/Applications/Vagrant/embedded/gems/gems/vagrant-1.2.7/lib/vagrant/action/warden.rb:34:in `call'
/Users/costi/.vagrant.d/gems/gems/vagrant-berkshelf-1.3.3/lib/berkshelf/vagrant/action/set_ui.rb:12:in `call'
/Applications/Vagrant/embedded/gems/gems/vagrant-1.2.7/lib/vagrant/action/warden.rb:34:in `call'
/Applications/Vagrant/embedded/gems/gems/vagrant-1.2.7/lib/vagrant/action/builtin/env_set.rb:19:in `call'
/Applications/Vagrant/embedded/gems/gems/vagrant-1.2.7/lib/vagrant/action/warden.rb:34:in `call'
/Applications/Vagrant/embedded/gems/gems/vagrant-1.2.7/lib/vagrant/action/runner.rb:61:in `block in run'
/Applications/Vagrant/embedded/gems/gems/vagrant-1.2.7/lib/vagrant/util/busy.rb:19:in `busy'
/Applications/Vagrant/embedded/gems/gems/vagrant-1.2.7/lib/vagrant/action/runner.rb:61:in `run'
/Applications/Vagrant/embedded/gems/gems/vagrant-1.2.7/lib/vagrant/action/builtin/call.rb:51:in `call'
/Applications/Vagrant/embedded/gems/gems/vagrant-1.2.7/lib/vagrant/action/warden.rb:34:in `call'
/Applications/Vagrant/embedded/gems/gems/vagrant-1.2.7/plugins/providers/virtualbox/action/check_virtualbox.rb:17:in `call'
/Applications/Vagrant/embedded/gems/gems/vagrant-1.2.7/lib/vagrant/action/warden.rb:34:in `call'
/Applications/Vagrant/embedded/gems/gems/vagrant-1.2.7/lib/vagrant/action/builder.rb:116:in `call'
/Applications/Vagrant/embedded/gems/gems/vagrant-1.2.7/lib/vagrant/action/runner.rb:61:in `block in run'
/Applications/Vagrant/embedded/gems/gems/vagrant-1.2.7/lib/vagrant/util/busy.rb:19:in `busy'
/Applications/Vagrant/embedded/gems/gems/vagrant-1.2.7/lib/vagrant/action/runner.rb:61:in `run'
/Applications/Vagrant/embedded/gems/gems/vagrant-1.2.7/lib/vagrant/machine.rb:147:in `action'
/Applications/Vagrant/embedded/gems/gems/vagrant-1.2.7/plugins/commands/reload/command.rb:29:in `block in execute'
/Applications/Vagrant/embedded/gems/gems/vagrant-1.2.7/lib/vagrant/plugin/v2/command.rb:182:in `block in with_target_vms'
/Applications/Vagrant/embedded/gems/gems/vagrant-1.2.7/lib/vagrant/plugin/v2/command.rb:180:in `each'
/Applications/Vagrant/embedded/gems/gems/vagrant-1.2.7/lib/vagrant/plugin/v2/command.rb:180:in `with_target_vms'
/Applications/Vagrant/embedded/gems/gems/vagrant-1.2.7/plugins/commands/reload/command.rb:28:in `execute'
/Applications/Vagrant/embedded/gems/gems/vagrant-1.2.7/lib/vagrant/cli.rb:46:in `execute'
/Applications/Vagrant/embedded/gems/gems/vagrant-1.2.7/lib/vagrant/environment.rb:478:in `cli'
/Applications/Vagrant/embedded/gems/gems/vagrant-1.2.7/bin/vagrant:84:in `<top (required)>'
/Applications/Vagrant/bin/../embedded/gems/bin/vagrant:23:in `load'
/Applications/Vagrant/bin/../embedded/gems/bin/vagrant:23:in `<main>'
INFO interface: error: The following SSH command responded with a non-zero exit status.
Vagrant assumes that this means the command failed!

mount -o udp,vers=3 33.33.33.1:'/Users/costi' /vagrant_host_home

Stdout from the command:



Stderr from the command:

stdin: is not a tty
mount.nfs: an incorrect mount option was specified

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

mount -o udp,vers=3 33.33.33.1:'/Users/costi' /vagrant_host_home

Stdout from the command:



Stderr from the command:

stdin: is not a tty
@mconigliaro
Copy link
Author

It turns out that the user commented out the 127.0.0.1 localhost line in his /etc/hosts file. Re-adding it fixed his problem.

@alexciarlillo
Copy link

I am seeing this issue with a CentOS 6.4 box and Manjaro (Arch) host. I have checked /etc/hosts on both machines and they have the "localhost" line intact.

Here is the output from 'vagrant up':

┌[ciarlill@odin][0][~/dev/vagrant/centos64] 
└─╼ vagrant up
Bringing machine 'default' up with 'virtualbox' provider...
[default] Setting the name of the VM...
[default] Clearing any previously set forwarded ports...
[default] Creating shared folders metadata...
[default] Clearing any previously set network interfaces...
[default] Preparing network interfaces based on configuration...
[default] Forwarding ports...
[default] -- 22 => 2222 (adapter 1)
[default] -- 80 => 8080 (adapter 1)
[default] -- 443 => 4443 (adapter 1)
[default] Booting VM...
[default] Waiting for VM to boot. This can take a few minutes.
[default] VM booted and ready for use!
GuestAdditions 4.2.16 running --- OK.
[default] Configuring and enabling network interfaces...
[default] Mounting shared folders...
[default] -- /vagrant
[default] -- /tmp/vagrant-puppet/manifests
[default] Exporting NFS shared folders...
Preparing to edit /etc/exports. Administrator privileges will be required...
[sudo] password for ciarlill: 
sudo: /etc/init.d/nfs-kernel-server: command not found
[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 udp,vers=3 192.168.33.1:'/data/vagrant/centos64/sites' /var/www/sites

Stdout from the command:



Stderr from the command:

mount.nfs: requested NFS version or transport protocol is not supported

It looks like there is also another issue with auto detecting the location of the NFS daemon. The actual location is /etc/init.d/nfs (similar to this issue: #1394)

[vagrant@localhost ~]$ cat /etc/redhat-release 
CentOS release 6.4 (Final)
[vagrant@localhost ~]$ uname -a
Linux localhost.localdomain 2.6.32-358.el6.x86_64 #1 SMP Fri Feb 22 00:31:26 UTC 2013 x86_64 x86_64 x86_64 GNU/Linux
[vagrant@localhost ~]$ 

EDIT:

The mis-detection is actually probably on the host side I realized. Here is the appropriate host information:

┌[ciarlill@odin][1][~] 
└─╼ cat /etc/manjaro-release 
Manjaro Linux
┌[ciarlill@odin][1][~] 
└─╼ uname -a
Linux odin 3.10.7-1-MANJARO #1 SMP PREEMPT Thu Aug 15 09:05:43 UTC 2013 x86_64 GNU/Linux

I'm guessing Manjaro linux has not been included since it is not very popular yet. It is based on Arch and makes used of systemd so the proper command to start NFS would be "systemctl start nfsd". In my case this service is enabled so it will start at boot. This is probably not related to the original problem?

EDIT 2:
Well it definitely was related. Makes sense in retrospect that vagrant needs to restart nfs after editing exports on the host. First I tried to manually set the host to "arch" using this: http://docs.vagrantup.com/v2/vagrantfile/vagrant_settings.html but could not set it correctly to get it working. Quick and dirty fix after reading through the plugin file for Arch: 'touch /etc/arch-release'

Working now!

@dadasoz-cuelogic
Copy link

Try -

VAGRANT_USE_VBOXFS=true vagrant up

@hashicorp hashicorp locked and limited conversation to collaborators Apr 7, 2020
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

3 participants