Błąd Vagrant: NFS zgłasza, że plik eksportu jest nieprawidłowy

Próbuję skonfigurować środowisko rozwoju dyskursu używając tych instrukcji . Jednak gdy uruchamiam Vagrant dostaję błąd:

NFS informuje, że plik eksportu jest nieprawidłowy. Vagrant robi to sprawdzenie przed dokonaniem jakichkolwiek zmian w pliku. Proszę poprawić poniżej problemy i wykonaj "Vagrant reload":

Nie można otworzyć /etc / exports

Sprawdziłem i nie mam folderu etc/exports, więc utworzyłem go i uruchomiłem vagrant reload. This got 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" from / 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:inblock in call' od /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:incall' od / 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:incall' 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:incall' 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:incall' 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:incall' od / 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:incall' 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:incall' 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:incall' 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:incall' od / 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:incall' 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:inblock 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:incall' z / 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:inblock in run" od / 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:inrun' z /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: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:incall' 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:incall' od / 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" z / 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:incall' 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:inblock 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:incall' od / 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:inblock in run" z / 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:inrun' z /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:incall' z /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:incall' od /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:incall' z /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:incall' od /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:incall' od /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: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:incall' 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:incall' z / 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" od / 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:incall' 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:incall' 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:incall' z / 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" od / 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:inaction" 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:inblock 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:inwith_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 '

Jestem na Mac (OS X 10.6.8). Jak to naprawić? Próbowałem szukać oryginalnego Komunikatu o błędzie i znalazłem tylko kilka repozytoriów zawierających kod źródłowy Vagrant, który go wyrzuca.

Author: Peter Mortensen, 2013-12-22

8 answers

Spróbuj użyć znanych dobrych wersji VirtualBox i Vagrant odnotowanych w dyskurs jako Twoja pierwsza aplikacja Rails:

Miałem ten sam problem na Mac (OS X 10.9 (Mavericks)), ale powrót do tych wersji wydawał się naprawić to dla mnie.

 -27
Author: Lockyer,
Warning: date(): Invalid date.timezone value 'Europe/Kyiv', we selected the timezone 'UTC' for now. in /var/www/agent_stack/data/www/doraprojects.net/template/agent.layouts/content.php on line 54
2016-12-24 23:38:10

W mojej instalacji VirtualBox zainstalowałem kilka poprzednich obrazów/pudełek, więc w /etc/exports było już kilka nieprawidłowych wpisów. Więc musiałem wyczyścić ten plik i ponownie uruchomić moje pudełko Włóczęgów.

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":

Oto co zrobiłem na mojej maszynie Hosta:

sudo rm /etc/exports
sudo touch /etc/exports

vagrant halt
vagrant up --provision
 307
Author: totas,
Warning: date(): Invalid date.timezone value 'Europe/Kyiv', we selected the timezone 'UTC' for now. in /var/www/agent_stack/data/www/doraprojects.net/template/agent.layouts/content.php on line 54
2016-12-24 23:39:32

Natknąłem się na ten problem z Vagrant 1.4.1 i VirtualBox 4.3.6 na OS X 10.9 (13A603). Udało mi się to naprawić za pomocą prostego polecenia, aby utworzyć brakujący plik /etc/exports. Uruchom to na OS X, nie jako gość, Jak wspomniano w komentarzach poniżej.

$ sudo touch /etc/exports

Byłem wtedy w stanie z powodzeniem uruchomić vagrant up. Napotkałem inny błąd, w którym Dodatki gości nie były aktualne, ale naprawiłem ten problem, instalując wtyczkę vagrant-vbguest.

$ vagrant plugin install vagrant-vbguest

A potem szybkie vagrant reload i Byłem gotowy!

 75
Author: colinhoernig,
Warning: date(): Invalid date.timezone value 'Europe/Kyiv', we selected the timezone 'UTC' for now. in /var/www/agent_stack/data/www/doraprojects.net/template/agent.layouts/content.php on line 54
2014-01-09 18:04:31

Dla mnie ten błąd zaczął się pojawiać dla działającego środowiska Włóczęgów.

Zmieniłem nazwę katalogu, z którego działa Vagrant. Aby to naprawić, uruchomiłem 'sudo vi / etc / exports' i naprawiłem ścieżkę tak, aby wskazywała na mój bieżący katalog.

 19
Author: Kevin G.,
Warning: date(): Invalid date.timezone value 'Europe/Kyiv', we selected the timezone 'UTC' for now. in /var/www/agent_stack/data/www/doraprojects.net/template/agent.layouts/content.php on line 54
2016-12-24 23:42:35

Nie chciałem przez to przechodzić. To jest to, co zrobiłem (jeszcze trochę zajęło, ale mniej kłopotów niż obniżenie IMHO):

  1. W VM Vagrantfile, dla dowolnego zsynchronizowanego folderu, wyłączono NFS

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

  2. Usunięte / etc / exports

    sudo mv /etc/exports ~/Desktop/exports

  3. Rewrite / etc / exports

    vagrant up

  4. Włącz ponownie NFS, jeśli chcesz / potrzebujesz go włączyć na maszynie wirtualnej

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

 8
Author: brokenindexfinger,
Warning: date(): Invalid date.timezone value 'Europe/Kyiv', we selected the timezone 'UTC' for now. in /var/www/agent_stack/data/www/doraprojects.net/template/agent.layouts/content.php on line 54
2014-01-17 20:08:28

To samo przytrafiło się mnie. Skopiowałem mój plik Vagrantfile z innego projektu i zapomniałem zmienić ustawienia NFS. To spowodowało, że bieżąca maszyna wirtualna zamontowała folder nadrzędny maszyny Wirtualnej, z której skopiowałem oryginalny plik Vagrantfile. Więc zrobiłem to:

vagrant halt
vagrant up
Wciąż mam ten sam błąd. Więc wyśledziłem mój plik eksportu znajdujący się w / etc / exports , który wygląda tak:
# 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

Dwie ostatnie ścieżki są takie same. Usunąłem więc trzy ostatnie linijki i ran:

vagrant halt && vagrant up
Teraz wszystko wydaje się działać dobrze.

OSX 10.11.1 Vagrant 1.7.4

 8
Author: colefner,
Warning: date(): Invalid date.timezone value 'Europe/Kyiv', we selected the timezone 'UTC' for now. in /var/www/agent_stack/data/www/doraprojects.net/template/agent.layouts/content.php on line 54
2015-11-22 07:47:40

Na Ubuntu 12 host/Ubuntu 12 guest pracowało mi z dyskursem:

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

Uwaga: musiałem również dodać adres IP hosta określony przez Vagranta i adres IP gościa określony przez Vagranta do wyjątków zapory.

 0
Author: niccolox,
Warning: date(): Invalid date.timezone value 'Europe/Kyiv', we selected the timezone 'UTC' for now. in /var/www/agent_stack/data/www/doraprojects.net/template/agent.layouts/content.php on line 54
2016-12-24 23:41:24

Po prostu uruchom następujące polecenie:

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

Nie używaj "vagrant up --provision", jeśli nie jesteś pewien, że nie nadpisze bieżącego stanu Twojego projektu.

 0
Author: MilanG,
Warning: date(): Invalid date.timezone value 'Europe/Kyiv', we selected the timezone 'UTC' for now. in /var/www/agent_stack/data/www/doraprojects.net/template/agent.layouts/content.php on line 54
2018-09-21 06:58:58