Hun*_*ter 94 nfs export vagrant discourse
我正在尝试使用这些说明设置Discourse开发环境.但是,当我运行Vagrant时,我得到错误:
NFS报告您的导出文件无效.在对文件进行任何更改之前,Vagrant会进行此检查.请更正以下问题并执行"vagrant reload":
无法打开/ etc/exports
我查了一下,而且我没有etc/exports文件夹,所以我创建了一个并运行了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:innfs_prune'来自/Applications/Vagrant/embedded/gems/gems/vagrant-1.4.1/ plugins/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:inblock in call'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来自/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_nfs_valid_ids.rb:12:incall' .1/lib/vagrant/action/warden.rb:34:call' 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来电'来自/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/env_set.rb:19: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/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/plugins/providers/virtualbox/action/clear_forwarded_ports.rb:13:incall'来自/ 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/set_name.rb:19: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/clean_machine_folder.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/plugins/providers/virtualbox/action/check_accessible.rb:18:in来自/ Applications/Vagrant/embedded/gems/gems/vagrant -1.4.1/lib/vagrant/action/warden.rb:34:inizeize_actioncall' from /Applications/Vagrant/embedded/gems/gems/vagrant-1.4.1/lib/vagrant/action/warden.rb:95:in' 中的块来自/Applications/Vagrant/embedded/gems/gems/vagrant-1.4.1/lib/vagrant/action/warden.rb: 34:来自/ Applications/Vagrant/embedded/gems /的call' 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/builder.rb:116:incall' from /Applications/Vagrant/embedded/gems/gems/vagrant-1.4.1/lib/vagrant/action/runner.rb:69:inblock in run' gems/vagrant-1.4.1/lib/vagrant/util/busy.rb:19:in run'frombusy' 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/action/builtin/call .rb:51: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/warden.rb:95:inblock 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/action/warden.rb:34:incall' from /Applications/Vagrant/embedded/gems/gems/vagrant-1.4.1/lib/vagrant/action/builder.rb:116: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:inbusy'来自/Applications/Vagrant/embedded/gems/gems/vagrant-1.4.1/ lib/vagrant/action/runner.rb:69:in call'fromrun' 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:ininizeize_actioncall' from /Applications/Vagrant/embedded/gems/gems/vagrant-1.4.1/lib/vagrant/action/warden.rb:95: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: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在运行中阻止来自/Applications/Vagrant/embedded/gems/gems/vagrant-1.4.1/lib/vagrant/util/busy.rb:19:inbusy' from /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:incall' 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/lib/vagrant/action/builtin/config_validate.rb:25: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/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来自/ Applications/Va的电话 grant/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/Applications/Vagrant/embedded/gems/gems/vagrant-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/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/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:incall'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来自/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:inbusy'来自/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:incall' 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:in电话call' from /Applications/Vagrant/embedded/gems/gems/vagrant-1.4.1/lib/vagrant/action/builder.rb:116:in呼叫"从/Applications/Vagrant/embedded/gems/gems/vagrant-1.4.1/li b/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忙于'from /Applications/Vagrant/embedded/gems/gems/vagrant-1.4.1/lib/vagrant/action/runner.rb:69:in action'fromrun' from /Applications/Vagrant/embedded/gems/gems/vagrant-1.4.1/lib/vagrant/machine.rb:147:in/应用程序/ Vagrant/embedded/gems/gems/vagrant-1.4.1/plugins/commands/reload/command.rb:37:block in execute' from /Applications/Vagrant/embedded/gems/gems/vagrant-1.4.1/lib/vagrant/plugin/v2/command.rb:193:inin_target_vms 中的块,来自/Applications/Vagrant/embedded/gems/gems/vagrant-1.4.1 /lib/vagrant/plugin/v2/command.rb:191:ineach' from /Applications/Vagrant/embedded/gems/gems/vagrant-1.4.1/lib/vagrant/plugin/v2/command.rb:191:inwith_target_vms'来自/Applications/Vagrant/embedded/gems/gems/vagrant-1.4.1/plugins/commands/reload/command.rb:36:inexecute' from /Applications/Vagrant/embedded/gems/gems/vagrant-1.4.1/lib/vagrant/cli.rb:38:in执行'from /Applications/Vagrant/embedded/gems/gems/vagrant-1.4.1/lib/vagrant/environment.rb:484:incli' from /Applications/Vagrant/embedded/gems/gems/vagrant-1.4.1/bin/vagrant:127:in'来自/Applications/Vagrant/bin/../embedded/gems/bin/vagrant: 23:在load' from /Applications/Vagrant/bin/../embedded/gems/bin/vagrant:23:in'
我在Mac上(OS X 10.6.8).我该如何解决?我尝试搜索原始错误消息,我发现的只是一些包含抛出它的Vagrant源代码的存储库.
tot*_*tas 329
我的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":
Run Code Online (Sandbox Code Playgroud)
这是我在主机上做的事情:
sudo rm /etc/exports
sudo touch /etc/exports
vagrant halt
vagrant up --provision
Run Code Online (Sandbox Code Playgroud)
col*_*nig 79
我在OS X 10.9 Mavericks(13A603)上遇到了Vagrant 1.4.1和VirtualBox 4.3.6这个问题.我能够通过一个简单的命令来修复它,以创建缺少的/ etc/exports文件.在OS X上运行,而不是guest,如下面的评论所述.
$ sudo touch /etc/exports
Run Code Online (Sandbox Code Playgroud)
然后我才能成功运行vagrant up.我确实遇到了另一个错误,其中Guest Additions不是最新的,但我通过安装vagrant-vbguest插件修复了这个问题.
$ vagrant plugin install vagrant-vbguest
Run Code Online (Sandbox Code Playgroud)
然后一个快速的vagrant reload我开始运行!
Kev*_* G. 23
对我来说,这个错误开始出现在一个有效的Vagrant环境中.
我已经重命名了Vagrant运行的目录.为了修复它,我运行'sudo vi/etc/exports'并修复了路径名,使其指向我当前的目录.
这样的事情我也经历过.我从另一个项目复制了我的Vagrantfile,忘了更改NFS设置.这导致当前VM挂载我复制原始Vagrantfile的VM的父文件夹.所以我这样做了:
vagrant halt
vagrant up
Run Code Online (Sandbox Code Playgroud)
仍然有同样的错误.所以我跟踪了位于/ 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
Run Code Online (Sandbox Code Playgroud)
最后两条路径是相同的.所以我删除了最后三行并运行:
vagrant halt && vagrant up
Run Code Online (Sandbox Code Playgroud)
现在一切似乎都运转正常.
OSX 10.11.1 Vagrant 1.7.4
我不想经历降级的麻烦.这就是我所做的(仍然需要一段时间,但比降级恕我直言的麻烦更少):
在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
只需运行以下命令:
sudo rm /etc/exports
sudo touch /etc/exports
vagrant reload
Run Code Online (Sandbox Code Playgroud)
请不要使用vagrant up --provision,如果你不知道,这将您的项目不覆盖当前状态。
Loc*_*yer -33
尝试使用 Discourse 中提到的 VirtualBox 和 Vagrant 的已知良好版本作为您的第一个 Rails 应用程序:
我在 Mac (OS X 10.9 (Mavericks)) 上遇到了同样的问题,但回滚到这些版本似乎解决了我的问题。