stream浪汉错误:NFS报告您的导出文件无效
我正在尝试使用这些指令来build立话语开发环境。 但是,当我运行stream浪汉,我得到的错误:
NFS正在报告您的导出文件无效。 Vagrant会在对文件进行任何更改之前进行检查。 请更正以下问题并执行“stream浪者重新加载”:
无法打开/ etc / exports
我检查了,我没有一个etc / exports文件夹,所以我创build了一个并运行vagrant reload
。 这让我:
/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'from /Applications/Vagrant/embedded/gems/gems/vagrant-1.4.1/plugins/cleanup' from /Applications/Vagrant/embedded/gems/gems/vagrant-1.4.1/lib/vagrant/action/builtin/synced_folder_cleanup.rb:24:in
块中调用synced_folders / nfs / synced_folder.rb:68:incleanup' from /Applications/Vagrant/embedded/gems/gems/vagrant-1.4.1/lib/vagrant/action/builtin/synced_folder_cleanup.rb:24:in
' from /Applications/Vagrant/embedded/gems/gems/vagrant-1.4.1/lib/vagrant/action/builtin/synced_folder_cleanup.rb:22:ineach_key' from /Applications/Vagrant/embedded/gems/gems/vagrant-1.4.1/lib/vagrant/action/builtin/synced_folder_cleanup.rb:22:in
从/Applications/Vagrant/embedded/gems/gems/vagrant-1.4.1/lib/vagrant/action/warden.rb:34:从/应用程序调用call' from /Applications/Vagrant/embedded/gems/gems/vagrant-1.4.1/plugins/providers/virtualbox/action/prepare_nfs_valid_ids.rb:12:in
call' s / Vagrant / embedded / gems / gems / vagrant-1.4.1 / lib / vagrant / action / warden.rb:34:in call'fromcall' from /Applications/Vagrant/embedded/gems/gems/vagrant-1.4.1/lib/vagrant/action/builtin/handle_forwarded_port_collisions.rb:118:in
:从/Applications/Vagrant/embedded/gems/gems/vagrant-1.4.1/lib/vagrant/action/warden.rb:34:incall' from /Applications/Vagrant/embedded/gems/gems/vagrant-1.4.1/plugins/providers/virtualbox/action/prepare_forwarded_port_collision_params.rb:30:in
call。 1 / lib / vagrant / action / warden.rb:34:call' from /Applications/Vagrant/embedded/gems/gems/vagrant-1.4.1/lib/vagrant/action/builtin/env_set.rb:19:in
从/Applications/Vagrant/embedded/gems/gems/vagrant-1.4call' from /Applications/Vagrant/embedded/gems/gems/vagrant-1.4.1/lib/vagrant/action/builtin/provision.rb:52:in
/Applications/Vagrant/embedded/gems/gems/vagrant-1.4.1/lib/vagrant/action/warden.rb:34:incall' from /Applications/Vagrant/embedded/gems/gems/vagrant-1.4.1/lib/vagrant/action/builtin/provision.rb:52:in
从/Applications/Vagrant/embedded/gems/gems/vagrant-1.4.1/lib/vagrant/action/warden.rb:34:在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/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/plugins/providers/virtualbox/action/clean_machine_folder.rb:17:in
call' from /Applications/Vagrant/embedded/gems/gems/vagrant-1.4.1/plugins/providers/virtualbox/action/set_name.rb:19:in
调用'from /Applications/Vagrant/embedded/gems/gems/vagrant-1.4.1/lib/vagrant/action/warden.rb:34:incall' from /Applications/Vagrant/embedded/gems/gems/vagrant-1.4.1/plugins/providers/virtualbox/action/clean_machine_folder.rb:17:in
从/Applications/Vagrant/embedded/gems/gems/vagrant-1.4.1/lib/vagrant/action/warden.rb:34 :call' from /Applications/Vagrant/embedded/gems/gems/vagrant-1.4.1/plugins/providers/virtualbox/action/check_accessible.rb:18:in
/ Applications / Vagrant / embedded / gems / gems /vagrant-1.4.1/lib/vagrant/action/warden.rb:34:incall' 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
call' from /Applications/Vagrant/embedded/gems/gems/vagrant-1.4.1/lib/vagrant/action/warden.rb:34:in
/Applications/Vagrant/embedded/gems/gems/vagrant-1.4.1/lib/vagrant/action/builder .rb:116:call' from /Applications/Vagrant/embedded/gems/gems/vagrant-1.4.1/lib/vagrant/action/runner.rb:69:in
incall' from /Applications/Vagrant/embedded/gems/gems/vagrant-1.4.1/lib/vagrant/action/runner.rb:69:in
/ Applications / Vagrant / embedded /gems/gems/vagrant-1.4.1/lib/vagrant/util/busy.rb:19:busy' from /Applications/Vagrant/embedded/gems/gems/vagrant-1.4.1/lib/vagrant/action/runner.rb:69:in
call' from /Applications/Vagrant/embedded/gems/gems/vagrant-1.4.1/lib/vagrant/action/warden.rb:34:in
从/Applications/Vagrant/embedded/gems/gems/vagrant-1.4.1/lib/vagrant/action/builtin/call.rb:51:incall' from /Applications/Vagrant/embedded/gems/gems/vagrant-1.4.1/lib/vagrant/action/warden.rb:34:in
/Applications/Vagrant/embedded/gems/gems/vagrant-1.4.1/lib/vagrant/action /warden.rb:95:block in finalize_action' from /Applications/Vagrant/embedded/gems/gems/vagrant-1.4.1/lib/vagrant/action/warden.rb:34:in
block in finalize_action' from /Applications/Vagrant/embedded/gems/gems/vagrant-1.4.1/lib/vagrant/action/warden.rb:34:in
/Applications/Vagrant/embedded/gems/gems/vagrant-1.4.1/lib/vagrant /应用程序/恶作剧/ /embedded/gems/gems/vagrant-1.4.1/lib/vagrant/action/runner.rb:69:inblock in run' from /Applications/Vagrant/embedded/gems/gems/vagrant-1.4.1/lib/vagrant/util/busy.rb:19:in
忙于/Applications/Vagrant/embedded/gems/gems/vagrant-1.4.1/lib/vagrant/action/runner.rb:69:inblock in run' from /Applications/Vagrant/embedded/gems/gems/vagrant-1.4.1/lib/vagrant/util/busy.rb:19:in
run' from /Applications/Vagrant/embedded/gems/gems/vagrant-1.4.1/lib/vagrant/action/builtin/call.rb:51:in
/Applications/Vagrant/embedded/gems/gems/vagrant-1.4.1/lib /vagrant/action/warden.rb:34:incall' 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:call' from /Applications/Vagrant/embedded/gems/gems/vagrant-1.4.1/lib/vagrant/action/warden.rb:34:in
/ Applications / Vagrant / embedded / gems /gems/vagrant-1.4.1/lib/vagrant/action/builder.rb:116:incall' from /Applications/Vagrant/embedded/gems/gems/vagrant-1.4.1/lib/vagrant/action/runner.rb:69:in
busy' from /Applications/Vagrant/embedded/gems/gems/vagrant-1.4.1/lib/vagrant/action/runner.rb:69:in
call' from /Applications/Vagrant/embedded/gems/gems/vagrant-1.4.1/lib/vagrant/action/runner.rb:69:in
从/Applications/Vagrant/embedded/gems/gems/vagrant-1.4.1/lib/vagrant/util/busy.rb:19busy' 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:从/ Applications / Vagrant / embeddedcall' from /Applications/Vagrant/embedded/gems/gems/vagrant-1.4.1/lib/vagrant/action/warden.rb:34:in
call' /gems/gems/vagrant-1.4.1/lib/vagrant/action/builtin/config_validate.rb:25:incall' from /Applications/Vagrant/embedded/gems/gems/vagrant-1.4.1/lib/vagrant/action/warden.rb:34:in
/ from / Applications / Vagrant / embedded / gems / gems / v agrant-1.4.1 / plugins / providers / virtualbox / action / check_virtualbox.rb:17:incall' from /Applications/Vagrant/embedded/gems/gems/vagrant-1.4.1/lib/vagrant/action/warden.rb:34:in
从/Applications/Vagrant/embedded/gems/gems/vagrant-1.4.1/lib/vagrant/action/builtin/call.rb:57:in call'fromcall' 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: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'fromcall' from /Applications/Vagrant/embedded/gems/gems/vagrant-1.4.1/lib/vagrant/action/warden.rb:34:in
block in finalize_action' from /Applications/Vagrant/embedded/gems/gems/vagrant-1.4.1/lib/vagrant/action/warden.rb:34:in
调用'from /Applications/Vagrant/embedded/gems/gems/vagrant-1.4.1/lib/vagrant/action/warden.rb:95:inblock in finalize_action' from /Applications/Vagrant/embedded/gems/gems/vagrant-1.4.1/lib/vagrant/action/warden.rb:34: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:call' from /Applications/Vagrant/embedded/gems/gems/vagrant-1.4.1/lib/vagrant/action/builder.rb:116:in
call from / Applications / Vagrant / embedded / gems / gemsblock in run' from /Applications/Vagrant/embedded/gems/gems/vagrant-1.4.1/lib/vagrant/util/busy.rb:19:in
/vagrant-1.4.1/lib/vagrant/action/runner.rb:69:inblock in run' from /Applications/Vagrant/embedded/gems/gems/vagrant-1.4.1/lib/vagrant/util/busy.rb:19:in
忙于/Applications/Vagrant/embedded/gems/gems/vagrant-1.4.1/lib/vagrant/action/runner.rb:69:inrun' from /Applications/Vagrant/embedded/gems/gems/vagrant-1.4.1/lib/vagrant/action/builtin/call.rb:51:in
/Applications/Vagrant/embedded/gems/gems/vagrant-1.4.1/lib/vagrant/action/warden .rb:34:call' from /Applications/Vagrant/embedded/gems/gems/vagrant-1.4.1/plugins/providers/virtualbox/action/check_virtualbox.rb:17:in
/ Applications / Vagrant / embedded /gems/gems/vagrant-1.4.1/lib/vagrant/action/warden.rb:34:incall' 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/builder.rb:116:in
call' .1 / lib / vagrant / action / runner.rb:69:block in run' from /Applications/Vagrant/embedded/gems/gems/vagrant-1.4.1/lib/vagrant/util/busy.rb:19:in
run' from /Applications/Vagrant/embedded/gems/gems/vagrant-1.4.1/lib/vagrant/machine.rb:147:in
/Applications/Vagrant/embedded/gems/gems/vagrant-1.4.1/lib/vagrant/action/runner.rb:69:run' from /Applications/Vagrant/embedded/gems/gems/vagrant-1.4.1/lib/vagrant/machine.rb:147:in
从/Applications/Vagrant/embedded/gems/gems/vagrant-1.4.1/plugins/commands/reload/command.rb:37:in从/ Applications / Vagrant / embedded / gems / gemsblock in execute' from /Applications/Vagrant/embedded/gems/gems/vagrant-1.4.1/lib/vagrant/plugin/v2/command.rb:193:in
with_target_vms块/vagrant-1.4.1/lib/vagrant/plugin/v2/command.rb:191:each' from /Applications/Vagrant/embedded/gems/gems/vagrant-1.4.1/lib/vagrant/plugin/v2/command.rb:191:in
来自/ Applicationseach' from /Applications/Vagrant/embedded/gems/gems/vagrant-1.4.1/lib/vagrant/plugin/v2/command.rb:191:in
with_target_vms /Vagrant/embedded/gems/gems/vagrant-1.4.1/plugins/commands/reload/command.rb:36:in execute'fromexecute' from /Applications/Vagrant/embedded/gems/gems/vagrant-1.4.1/lib/vagrant/cli.rb:38:in
执行中/Applications/Vagrant/embedded/gems/gems/vagrant-1.4.1/lib/vagrant/environment.rb:484:inexecute' from /Applications/Vagrant/embedded/gems/gems/vagrant-1.4.1/lib/vagrant/cli.rb:38:in
cli' from /Applications/Vagrant/embedded/gems/gems/vagrant-1.4.1/bin/vagrant:127:in
load' from /Applications/Vagrant/bin/../embedded/gems/bin/vagrant:23:in
cli' from /Applications/Vagrant/embedded/gems/gems/vagrant-1.4.1/bin/vagrant:127:in
/Applications/Vagrant/bin/../embedded/gems/bin/vagrant:23:inload' from /Applications/Vagrant/bin/../embedded/gems/bin/vagrant:23:in
'
我在Mac(OS X 10.6.8)上。 我该如何解决? 我试图寻找原始的错误消息,而我发现的只是一些包含引发它的Vagrant源代码的存储库。
尝试使用已知好的版本的VirtualBox和Vagrant在Discourse中logging为您的第一次Rails应用程序 :
- stream浪者 1.1.2
- VirtualBox 4.2.10
我在Mac(OS X 10.9(Mavericks))上遇到了同样的问题,但是回滚到这些版本似乎为我解决了这个问题。
我有一些以前的图像/盒安装在我的VirtualBox安装,所以已经在/etc/exports
中有一些无效的条目。 所以我不得不清理那个文件并重新启动我的Vagrant框。
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":
这是我在主机上做的事情:
sudo rm /etc/exports sudo touch /etc/exports vagrant halt vagrant up --provision
我在OS X 10.9 Mavericks(13A603)上遇到了Vagrant 1.4.1和VirtualBox 4.3.6这个问题。 我能够用一个简单的命令来修复它,以创build缺less的/ etc / exports文件。 在OS X上运行这个,而不是在下面的注释中指出的客人。
$ sudo touch /etc/exports
那时我才能够成功地逃跑vagrant up
。 我遇到了Guest Additions不是最新的另一个错误,但我通过安装vagrant-vbguest插件来解决这个问题。
$ vagrant plugin install vagrant-vbguest
然后一个快速的vagrant reload
,我起身运行!
对我来说,这个错误开始出现在一个工作的stream浪者环境。
我已经重命名Vagrant运行的目录。 为了解决这个问题,我运行了“sudo vi / etc / exports”,并修复了path名,使其指向我的当前目录。
我不想经历降级的麻烦。 这就是我所做的(仍然花了一段时间,但比降级IMHO更less麻烦):
-
在VM Vagrantfile中,对于任何已同步的文件夹,禁用NFS
config.vm.synced_folder ".", "/vagrant", nfs: false
-
删除了/ etc / exports
sudo mv /etc/exports ~/Desktop/exports
-
重写/ etc / exports
vagrant up
-
如果您希望/需要在您的VM上启用NFS,请重新启用NFS
config.vm.synced_folder ".", "/vagrant", nfs: true
这样的事情我也经历过。 我从另一个项目中复制了我的Vagrant文件,并忘记更改NFS设置。 这导致当前VM挂载我复制原始Vagrantfile的VM的父文件夹。 所以我这样做了:
vagrant halt vagrant up
仍然有同样的错误。 所以我追踪了位于/ etc / exports的出口文件,如下所示:
# 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
最后两条path是相同的。 所以我删除了最后三行,跑了:
vagrant halt && vagrant up
现在一切似乎都工作正常。
OSX 10.11.1stream浪者1.7.4
在Ubuntu 12主机/ Ubuntu 12的客人下面为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
注意:我还必须添加由Vagrant确定的主机IP地址和由Vagrant确定的访客IP地址,以防止防火墙exception。