Vagrant error: NFS reports that your export file is invalid

I am trying to set up a Discourse development environment using these instructions . However, when I start Vagrant, I get an error message:

NFS reports that your export file is invalid. The tramp does this check before making any changes to the file. Please fix the problems below and perform a "roaming reboot":

Unable to open / etc / exports

I checked and I do not have the etc / exports folder, so I created it and ran vagrant reload . It bothered me:

/Applications/Vagrant/embedded/gems/gems/vagrant-1.4.1/plugins/hosts/bsd/host.rb:146:in read': Is a directory - /etc/exports (Errno::EISDIR) from /Applications/Vagrant/embedded/gems/gems/vagrant-1.4.1/plugins/hosts/bsd/host.rb:146:in nfs_prune 'of / Applications / Vagrant / embedded / gems / gems / vagrant -1.4.1 / plugins / synced_folders / nfs / synced_folder.rb: 68: in cleanup' from /Applications/Vagrant/embedded/gems/gems/vagrant-1.4.1/lib/vagrant/action/builtin/synced_folder_cleanup.rb:24:in block in call' from / Applications / Vagrant / embedded / gems / gems / vagrant -1.4.1 / lib / vagrant / action / builtin / synced_folder_cleanup.rb: 22: in each_key' from /Applications/Vagrant/embedded/gems/gems/vagrant-1.4.1/lib/vagrant/action/builtin/synced_folder_cleanup.rb:22:in call 'from / Applications / Vagrant / embedded / gems / gems / vagrant -1.4.1 / lib / vagrant / action / warden.rb: 34: in call' from /Applications/Vagrant/embedded/gems/gems/vagrant-1.4.1/plugins/providers/virtualbox/action/prepare_nfs_valid_ids.rb:12:in call 'from / Applications / Vagrant / embedded / gems / gems / vagrant -1.4.1 / lib / vagrant / action / warden.rb: 34: in call' from /Applications/Vagrant/embedded/gems/gems/vagrant-1.4.1/lib/vagrant/action/builtin/handle_forwarded_port_collisions.rb:118:in call 'from / Applications / Vagrant / embedded / gems / gems / vagrant -1.4.1 / lib / vagrant / action / warden.rb: 34: in call' from /Applications/Vagrant/embedded/gems/gems/vagrant-1.4.1/plugins/providers/virtualbox/action/prepare_forwarded_port_collision_params.rb:30:in call' from / Applications / Vagrant / embedded / gems / gems / vagrant -1.4.1 / lib / vagrant / action / warden.rb: 34: in call' from /Applications/Vagrant/embedded/gems/gems/vagrant-1.4.1/lib/vagrant/action/builtin/env_set.rb:19:in call 'from / Applications / Vagrant / embedded / gems / gems / vagrant -1.4.1 / lib / vagrant / action / warden.rb: 34: in call' from /Applications/Vagrant/embedded/gems/gems/vagrant-1.4.1/lib/vagrant/action/builtin/provision.rb:52:in call 'from / Applications / Vagrant / embedded / gems / gems / vagrant -1. 4.1 / lib / vagrant / action / warden.rb: 34: in call' from /Applications/Vagrant/embedded/gems/gems/vagrant-1.4.1/plugins/providers/virtualbox/action/clear_forwarded_ports.rb:13:in call 'from / Applications / Vagrant / embedded / gems / gems / vagrant -1.4.1 / lib / vagrant / action / warden.rb: 34: in call' from /Applications/Vagrant/embedded/gems/gems/vagrant-1.4.1/plugins/providers/virtualbox/action/set_name.rb:19:in call 'from / Applications / Vagrant / embedded / gems / gems / vagrant-1.4.1 / lib / vagrant / action / warden.rb: 34: in call' from /Applications/Vagrant/embedded/gems/gems/vagrant-1.4.1/plugins/providers/virtualbox/action/clean_machine_folder.rb:17:in call' from / Applications / Vagrant / embedded / gems / gems / vagrant -1.4.1 / lib / vagrant / action / warden.rb: 34: in call' from /Applications/Vagrant/embedded/gems/gems/vagrant-1.4.1/plugins/providers/virtualbox/action/check_accessible.rb:18:in call 'from / Applications / Vagrant / embedded / gems / gems / vagrant -1.4.1 / lib / vagrant / action / warden.rb: 34: in call' from /Applications/Vagrant/embedded/gems/gems/vagrant-1.4.1/lib/vagrant/action/warden.rb:95:in call' from /Applications/Vagrant/embedded/gems/gems/vagrant-1.4.1/lib/vagrant/action/warden.rb:95:in block in finalize_action 'of / Applications / Vagrant / embedded / gems / gems / vagrant -1.4.1 /lib/vagrant/action/warden.rb:34:in call' from /Applications/Vagrant/embedded/gems/gems/vagrant-1.4.1/lib/vagrant/action/warden.rb:34:in call' of / Applications / Vagrant / embedded / gems / gems / vagrant -1.4.1 / lib / vagrant / action / builder.rb: 116: in call' from /Applications/Vagrant/embedded/gems/gems/vagrant-1.4.1/lib/vagrant/action/runner.rb:69:in block in run 'from / Applications / Vagrant / embedded / gems / gems / vagrant -1.4.1 / lib / vagrant / util / busy.rb: 19: in busy' from /Applications/Vagrant/embedded/gems/gems/vagrant-1.4.1/lib/vagrant/action/runner.rb:69:in run 'from / Applications / Vagrant / embedded / gems / gems / vagrant -1.4.1 /lib/vagrant/action/builtin/call.rb:51:in call' from /Applications/Vagrant/embedded/gems/gems/vagrant-1.4.1/lib/vagrant/action/warden.rb:34:in call 'from / Applications / Vagrant / embed ded / gems / gems / vagrant -1.4.1 / lib / vagrant / action / warden.rb: 95: in block in finalize_action' from /Applications/Vagrant/embedded/gems/gems/vagrant-1.4.1/lib/vagrant/action/warden.rb:34:in call 'from / Applications / Vagrant / embedded / gems / gems / vagrant-1.4.1 / lib / vagrant / action / warden.rb: 34: in call' from /Applications/Vagrant/embedded/gems/gems/vagrant-1.4.1/lib/vagrant/action/builder.rb:116:in call 'from / Applications / Vagrant / embedded / gems / gems / vagrant -1.4.1 / lib / vagrant / action / runner.rb: 69: in block in run' from /Applications/Vagrant/embedded/gems/gems/vagrant-1.4.1/lib/vagrant/util/busy.rb:19:in busy' from / Applications / Vagrant / embedded / gems / gems / vagrant-1.4.1 / lib / vagrant / action / runner.rb: 69: in run' from /Applications/Vagrant/embedded/gems/gems/vagrant-1.4.1/lib/vagrant/action/builtin/call.rb:51:in call 'from / Applications / Vagrant / embedded / gems / gems / vagrant -1.4.1 / lib / vagrant / action / warden.rb: 34: in call' from /Applications/Vagrant/embedded/gems/gems/vagrant-1.4.1/lib/vagrant/action/warden.rb:95:in call' from /Applications/Vagrant/embedded/gems/gems/vagrant-1.4.1/lib/vagrant/action/warden.rb:95:in block in finalize_action 'of / Applications / Vagrant / embedded / gems / gems / vagrant -1.4.1 / lib / vagrant / action / warden.rb: 34: in call' from /Applications/Vagrant/embedded/gems/gems/vagrant-1.4.1/lib/vagrant/action/warden.rb:34:in call 'from / Applications / Vagrant / embedded / gems / gems / vagrant -1.4.1 / lib /vagrant/action/builder.rb:116:in call' from /Applications/Vagrant/embedded/gems/gems/vagrant-1.4.1/lib/vagrant/action/runner.rb:69:in block in run' of / Applications / Vagrant / embedded / gems / gems / vagrant -1.4.1 / lib / vagrant / util / busy.rb: 19: in busy' from /Applications/Vagrant/embedded/gems/gems/vagrant-1.4.1/lib/vagrant/action/runner.rb:69:in run 'from / Applications / Vagrant / embedded / gems / gems / vagrant -1.4.1 / lib / vagrant / action / builtin / call.rb: 51: in call' from /Applications/Vagrant/embedded/gems/gems/vagrant-1.4.1/lib/vagrant/action/warden.rb:34:in call 'from / Applications / Vagrant / embedded / gems / gems / vagrant-1.4.1 / lib / vagrant / action / bui ltin / config_validate.rb: 25: in call' from /Applications/Vagrant/embedded/gems/gems/vagrant-1.4.1/lib/vagrant/action/warden.rb:34:in call' from / Applications / Vagrant / embedded / gems / gems / vagrant -1.4.1 / plugins / providers / virtualbox / action / check_virtualbox.rb: 17: in call' from /Applications/Vagrant/embedded/gems/gems/vagrant-1.4.1/lib/vagrant/action/warden.rb:34:in call 'from / Applications / Vagrant / embedded / gems / gems / vagrant-1.4.1 / lib / vagrant / action / builtin / call.rb: 57: in call' from /Applications/Vagrant/embedded/gems/gems/vagrant-1.4.1/lib/vagrant/action/warden.rb:34:in call 'from / Applications / Vagrant / embedded / gems / gems / vagrant -1.4.1 / plugins / providers / virtualbox / action / check_virtualbox.rb: 17: in call' from /Applications/Vagrant/embedded/gems/gems/vagrant-1.4.1/lib/vagrant/action/warden.rb:34:in call' from / Applications / Vagrant / embedded / gems / gems / vagrant-1.4.1 / lib / vagrant / action / builtin / config_validate.rb: 25: in call' from /Applications/Vagrant/embedded/gems/gems/vagrant-1.4.1/lib/vagrant/action/warden.rb:34:in call' from /Applications/Vagrant/embedded/gems/gems/vagrant-1.4.1/lib/vagrant/action/warden.rb:34:in call 'from / Applications / Vagrant / embedded / gems / gems / vagrant -1.4.1 / lib / vagrant / action / warden.rb: 95: in block in finalize_action' from /Applications/Vagrant/embedded/gems/gems/vagrant-1.4.1/lib/vagrant/action/warden.rb:34:in call' from / Applications / Vagrant / embedded / gems / gems / vagrant-1.4. 1 / lib / vagrant / action / warden.rb: 34: in call' from /Applications/Vagrant/embedded/gems/gems/vagrant-1.4.1/lib/vagrant/action/builder.rb:116:in call' from / Applications / Vagrant / embedded / gems / gems / vagrant -1.4.1 / lib / vagrant / action / runner.rb: 69: in block in run' from /Applications/Vagrant/embedded/gems/gems/vagrant-1.4.1/lib/vagrant/util/busy.rb:19:in busy 'from / Applications / Vagrant / embedded / gems / gems / vagrant-1.4.1 / lib / vagrant / action / runner.rb: 69: in run' from /Applications/Vagrant/embedded/gems/gems/vagrant-1.4.1/lib/vagrant/action/builtin/call.rb:51:in call' from / Applications / Vagrant / embedded / gems / gems / vagrant - 1.4.1 / lib / vagrant / action / warden.r b: 34: in call' from /Applications/Vagrant/embedded/gems/gems/vagrant-1.4.1/plugins/providers/virtualbox/action/check_virtualbox.rb:17:in from / Applications / Vagrant / embedded / / / Applications/Vagrant/embedded/ call' from /Applications/Vagrant/embedded/gems/gems/vagrant-1.4.1/plugins/providers/virtualbox/action/check_virtualbox.rb:17:in / call' from /Applications/Vagrant/embedded/gems/gems/vagrant-1.4.1/plugins/providers/virtualbox/action/check_virtualbox.rb:17:in / call' from /Applications/Vagrant/embedded/gems/gems/vagrant-1.4.1/plugins/providers/virtualbox/action/check_virtualbox.rb:17:in / call' from /Applications/Vagrant/embedded/gems/gems/vagrant-1.4.1/plugins/providers/virtualbox/action/check_virtualbox.rb:17:in / call' from /Applications/Vagrant/embedded/gems/gems/vagrant-1.4.1/plugins/providers/virtualbox/action/check_virtualbox.rb:17:in / call' from /Applications/Vagrant/embedded/gems/gems/vagrant-1.4.1/plugins/providers/virtualbox/action/check_virtualbox.rb:17:in / call' from /Applications/Vagrant/embedded/gems/gems/vagrant-1.4.1/plugins/providers/virtualbox/action/check_virtualbox.rb:17:in / call' from /Applications/Vagrant/embedded/gems/gems/vagrant-1.4.1/plugins/providers/virtualbox/action/check_virtualbox.rb:17:in :in gems / gems / vagrant-1.4.1 / lib / vagrant / action / warden.rb: 34: in call' from /Applications/Vagrant/embedded/gems/gems/vagrant-1.4.1/lib/vagrant/action/builder.rb:116:in call call' from /Applications/Vagrant/embedded/gems/gems/vagrant-1.4.1/lib/vagrant/action/builder.rb:116:in from / Applications / Vagrant / embedded / gems / gems / vagrant -1.4.1 / lib / vagrant / action / runner.rb: 69: in block in run' from /Applications/Vagrant/embedded/gems/gems/vagrant-1.4.1/lib/vagrant/util/busy.rb:19:in busy 'from / Applications / Vagrant / embedded / gems / gems / vagrant -1.4.1 / lib / vagrant / action / runner.rb: 69: in run' from /Applications/Vagrant/embedded/gems/gems/vagrant-1.4.1/lib/vagrant/machine.rb:147:in action' from / Applications / Vagrant / embedded / gems / gems / vagrant -1.4.1 / plugins / commands / reload / command.rb: 37: in block in execute' from /Applications/Vagrant/embedded/gems/gems/vagrant-1.4.1/lib/vagrant/plugin/v2/command.rb:193:in b lock in with_target_vms 'from / Applications / Vagrant / embedded / gems / gems / vagrant -1.4.1 / lib / vagrant / plugin / v2 / command.rb: 191: in each' from /Applications/Vagrant/embedded/gems/gems/vagrant-1.4.1/lib/vagrant/plugin/v2/command.rb:191:in with_target_vms' from / Applications / Vagrant / embedded / gems / gems / vagrant -1.4.1 / plugins / commands / reload / command. rb: 36: in execute' from /Applications/Vagrant/embedded/gems/gems/vagrant-1.4.1/lib/vagrant/cli.rb:38:in execute' from / Applications / Vagrant / embedded / gems / gems / vagrant -1.4.1 / lib / vagrant / environment.rb: 484: in cli' from /Applications/Vagrant/embedded/gems/gems/vagrant-1.4.1/bin/vagrant:127:in ' from / Applications / Vagrant /bin/../embedded/gems/bin/vagrant:23:in load' from /Applications/Vagrant/bin/../embedded/gems/bin/vagrant:23:in '

I am on a Mac (OS X 10.6.8). How to fix it? I tried to find the original error message, and all I found was several repositories containing the Vagrant source code that throws it.

+87
export vagrant nfs discourse
Dec 22 '13 at 4:25
source share
8 answers

Try using the well-known good versions of VirtualBox and Vagrant, noted in Discourse as your first Rails application :

I had the same issue on a Mac (OS X 10.9 (Mavericks)), but rolling back to these versions seems to fix this for me.

-28
Dec 22 '13 at 22:54
source share

I had some previous images / boxes installed in my VirtualBox installation, so there were already several invalid entries in /etc/exports . Therefore, I had to clear this file and restart the boxing box.

 NFS is reporting that your exports file is invalid. Vagrant does this check before making any changes to the file. Please correct the issues below and execute "vagrant reload": 

Here is what I did on my main machine:

 sudo rm /etc/exports sudo touch /etc/exports vagrant halt vagrant up --provision 
+312
Feb 01
source share

I ran into this problem with Vagrant 1.4.1 and VirtualBox 4.3.6 on OS X 10.9 Mavericks (13A603). I was able to fix this with a simple command to create the missing / etc / exports file. Run this on OS X, not away, as mentioned in the comments below.

 $ sudo touch /etc/exports 

Then I was able to successfully launch vagrant up . I encountered another error when the guest add-ons were not updated, but I fixed this problem by installing the vagrant-vbguest plugin.

 $ vagrant plugin install vagrant-vbguest 

and then a quick vagrant reload , and I was running!

+76
Dec 23 '13 at 19:37
source share

For me, this error began to appear for the Vagrant workspace.

I renamed the directory Vagrant worked with. To fix this, I ran "sudo vi / etc / exports" and fixed the path so that it points to my current directory.

+20
Apr. 11
source share

The same thing happened to me. I copied my Vagrantfile from another project and forgot to change the NFS settings. This caused the current virtual machine to mount the parent folder of the virtual machine from which I copied the Vagrant source file. So I did this:

 vagrant halt vagrant up 

Still the same error. So I tracked the export file located in / etc / exports, which looks like this:

 # VAGRANT-BEGIN: 501 64e10d4d-342e-4f55-b69a-97edda35742f "/Users/[username]/vagrant" 192.168.11.12 -alldirs -mapall=501:20 # VAGRANT-END: 501 64e10d4d-342e-4f55-b69a-97edda35742f # VAGRANT-BEGIN: 501 b3c6e7fe-95d4-48db-8876-c89d3e07af8d "/Users/[username]/Sites/molitech-oms" 192.168.11.124 -alldirs -mapall=501:20 # VAGRANT-END: 501 b3c6e7fe-95d4-48db-8876-c89d3e07af8d # VAGRANT-BEGIN: 501 3e2aabfd-ce63-441b-85a2-1b51e8beb863 "/Users/[username]/Sites/app" 192.168.11.125 -alldirs -mapall=501:20 # VAGRANT-END: 501 3e2aabfd-ce63-441b-85a2-1b51e8beb863 # VAGRANT-BEGIN: 501 ff92e353-9f6d-48ee-9d76-e29b33f1dd60 "/Users/[username]/Sites" 192.168.11.126 -alldirs -mapall=501:20 # VAGRANT-END: 501 ff92e353-9f6d-48ee-9d76-e29b33f1dd60 

The last two ways are the same. So I deleted the last three lines and ran:

 vagrant halt && vagrant up 

Now everything is working fine.

OSX 10.11.1 Tramp 1.7.4

+9
Nov 22 '15 at 7:47
source share

I did not want to experience the difficulties of lowering. This is what I did (it still took time, but less hassle than lowering IMHO):

  • In VM Vagrantfile, NFS is disabled for any synchronized folder

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

  • Deleted / etc / exports

    sudo mv /etc/exports ~/Desktop/exports

  • Rewrite / etc / exports

    vagrant up

  • Restart NFS if you want / need to enable it on your virtual machine

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

+8
Jan 17 '14 at 20:08
source share

Just run the following commands:

 sudo rm /etc/exports sudo touch /etc/exports vagrant reload 

DO NOT use "vagrant up --provision" unless you are sure that it will not overwrite the current status of your project.

+1
Sep 21 '18 at 6:58
source share

On a Ubuntu 12 host / Ubuntu 12 guest, the following worked for me with Discourse :

 nfs_setting = RUBY_PLATFORM =~ /darwin/ || RUBY_PLATFORM =~ /linux/ config.vm.synced_folder ".", "/vagrant", id: "vagrant-root", type: "nfs", nfs_udp: "true", nfs_version: "4", :nfs => nfs_setting 

Note. I also had to add the host IP address defined by Vagrant and the guest IP address specified by Vagrant for firewall exceptions.

0
Feb 10 '14 at 21:40
source share



All Articles