Error Vagrant: NFS informa que el archivo de exportación no es válido


Estoy tratando de establecer el entorno de desarrollo del Discurso usando estas instrucciones . Sin embargo, cuando corro Vagrant obtengo el error:

NFS informa que el archivo de exportación no es válido. El vagabundo lo hace esta comprobación antes de realizar cualquier cambio en el archivo. Por favor corrija los problemas a continuación y ejecutar "vagrant reload":

No se puede abrir/etc / exports

Revisé, y no tengo una carpeta etc/exports, así que creé una y corrí vagrant reload. Esto me atrapó:

/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' desde /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" de / 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" de / 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" de / 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" 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:inblock in run' de / 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' 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: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" de / Applications/Vagrant/embedded/gems/gems/vagrant-1.4.1/lib/vagrant/action / runner.rb: 69: en block in run' from /Applications/Vagrant/embedded/gems/gems/vagrant-1.4.1/lib/vagrant/util/busy.rb:19:in ocupado' 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: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" de / 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' 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:inrun' 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:incall" 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:incall" de /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" 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:incall" desde /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" de / 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" from / Applications/Vagrant/embedded/gems/gems/vagrant-1.4.1/lib/vagrant/action / runner.rb: 69: en block in run' from /Applications/Vagrant/embedded/gems/gems/vagrant-1.4.1/lib/vagrant/util/busy.rb:19:in ocupado' de / 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" from / Applications/Vagrant/embedded/gems/gems/vagrant-1.4.1/lib/vagrant/action / runner.rb: 69: en block in run' from /Applications/Vagrant/embedded/gems/gems/vagrant-1.4.1/lib/vagrant/util/busy.rb:19:in ocupado' de / Applications/Vagrant/embedded/gems/gems/vagrant-1.4.1/lib/vagrant/action / runner.rb: 69: en run' from /Applications/Vagrant/embedded/gems/gems/vagrant-1.4.1/lib/vagrant/machine.rb:147:inacción" 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 bloquear en 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" desde / Aplicaciones / Vagrant / bin/../ embedded / gems / bin / vagrant:23: in load' from /Applications/Vagrant/bin/../embedded/gems/bin/vagrant:23:in '

Estoy en un Mac (OS X 10.6.8). ¿Cómo arreglo esto? Intenté buscar el mensaje de error original, y todo lo que encontré fueron algunos repositorios que contenían el código fuente Vagrant que lo lanzaba.

Author: Peter Mortensen, 2013-12-22

8 answers

Intente usar las versiones buenas conocidas de VirtualBox y Vagrant indicadas en Discourse como Tu Primera Aplicación Rails:

Estaba teniendo el mismo problema en Mac (OS X 10.9 (Mavericks)), pero volver a estas versiones parecía solucionarlo para mí.

 -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/ajaxhispano.com/template/agent.layouts/content.php on line 61
2016-12-24 23:38:10

Tenía algunas imágenes/cajas anteriores instaladas en mi instalación de VirtualBox, por lo que ya había algunas entradas no válidas en /etc/exports. Así que tuve que limpiar ese archivo y reiniciar mi caja de Vagabundos.

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

Esto es lo que hice en mi máquina host:

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/ajaxhispano.com/template/agent.layouts/content.php on line 61
2016-12-24 23:39:32

Me encontré con este problema con Vagrant 1.4.1 y VirtualBox 4.3.6 en OS X 10.9 Mavericks (13A603). Pude arreglarlo con un simple comando para crear el archivo /etc/exports que faltaba. Ejecute esto en OS X, no invitado, como se indica en los comentarios a continuación.

$ sudo touch /etc/exports

Entonces pude ejecutar con éxito vagrant up. Me encontré con otro error donde las Adiciones de invitados no estaban actualizadas, pero arreglé ese problema instalando el complemento vagrant-vbguest.

$ vagrant plugin install vagrant-vbguest

Y luego un rápido vagrant reload y ¡Estaba en marcha!

 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/ajaxhispano.com/template/agent.layouts/content.php on line 61
2014-01-09 18:04:31

Para mí, este error comenzó a aparecer para un entorno Vagrant de trabajo.

Había renombrado el directorio desde el que se estaba ejecutando Vagrant. Para arreglarlo, corrí 'sudo vi / etc / exports' y arreglé el nombre de ruta para que apuntara a mi directorio actual.

 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/ajaxhispano.com/template/agent.layouts/content.php on line 61
2016-12-24 23:42:35

No quería pasar por la molestia de degradar. Esto es lo que hice (todavía tomó un tiempo, pero menos molestia que degradar en mi Humilde opinión):

  1. En el Vagrantfile de VM, para cualquier carpeta sincronizada, NFS

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

  2. Eliminado/etc / exports

    sudo mv /etc/exports ~/Desktop/exports

  3. Reescribir/etc / exports

    vagrant up

  4. Vuelva a habilitar NFS si desea/necesita habilitarlo en su VM

    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/ajaxhispano.com/template/agent.layouts/content.php on line 61
2014-01-17 20:08:28

Lo mismo me pasó a mí. Copié mi Vagrantfile de otro proyecto y olvidé cambiar la configuración de NFS. Esto provocó que la máquina virtual actual montara la carpeta principal de la máquina virtual desde la que copié el Vagrantfile original. Así que hice esto:

vagrant halt
vagrant up

Todavía tiene el mismo error. Así que rastreé mi archivo de exportaciones ubicado en / etc / exports que se ve así:

# 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

Los dos últimos caminos son los mismos. Así que borré las últimas tres líneas y ran:

vagrant halt && vagrant up

Ahora todo parece estar funcionando bien.

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/ajaxhispano.com/template/agent.layouts/content.php on line 61
2015-11-22 07:47:40

En Ubuntu 12 host / Ubuntu 12 guest lo siguiente funcionó para mí con 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

Nota: También tuve que agregar una dirección IP de host determinada por Vagrant y una dirección IP de invitado determinada por Vagrant a las excepciones del firewall.

 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/ajaxhispano.com/template/agent.layouts/content.php on line 61
2016-12-24 23:41:24

Simplemente ejecute el siguiente comando:

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

NO use "vagrant up provision provision" si no está seguro de que no sobrescribirá el estado actual de su proyecto.

 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/ajaxhispano.com/template/agent.layouts/content.php on line 61
2018-09-21 06:58:58