fgrehm / vagrant-cachier

Caffeine reducer
http://fgrehm.viewdocs.io/vagrant-cachier
MIT License
1.08k stars 111 forks source link

OSX El Capitan update broke my config #161

Closed kornushkin closed 8 years ago

kornushkin commented 8 years ago

Hi! Right after update from OSX Yosemite to OSX El Capitan i've got a vagrant starting issue. Here is a part of my previous config:

config.vm.synced_folder ".", "/vagrant", id: "application", :nfs => true
  if Vagrant.has_plugin?("vagrant-cachier")
      config.cache.scope = :machine

      config.cache.synced_folder_opts = {
        type: :nfs,
        mount_options: ['rw', 'vers=3', 'tcp', 'nolock'],
        mount_options: ['tcp', 'nolock']
      }

      config.cache.enable :generic, {
        "cache"  => { cache_dir: "/vagrant/var/cache" },
        "logs"   => { cache_dir: "/vagrant/var/logs" },
        "vendor" => { cache_dir: "/vagrant/vendor" },
      }
   end

And the error (after "vagrant up" command):

==> machine1: Preparing to edit /etc/exports. Administrator privileges will be required...
Password:
==> machine1: Mounting NFS shared folders...
The following SSH command responded with a non-zero exit status.
Vagrant assumes that this means the command failed!

mount -o 'vers=3,udp' 192.168.33.1:'/Users/apple/PhpstormProjects/hansa' /vagrant

Stdout from the command:

Stderr from the command:

stdin: is not a tty
mount.nfs: requested NFS version or transport protocol is not supported

If I comment some rows, error disapears, but application starts to work very slow. Here is the working config:

config.vm.synced_folder ".", "/vagrant", id: "application"
#, :nfs => true
  if Vagrant.has_plugin?("vagrant-cachier")
      config.cache.scope = :machine

#     config.cache.synced_folder_opts = {
#     type: :nfs,
#     mount_options: ['rw', 'vers=3', 'tcp', 'nolock'],
#     mount_options: ['tcp', 'nolock']
#     }

      config.cache.enable :generic, {
        "cache"  => { cache_dir: "/vagrant/var/cache" },
        "logs"   => { cache_dir: "/vagrant/var/logs" },
        "vendor" => { cache_dir: "/vagrant/vendor" },
      }
   end

Help me please to handle this problem.

andreiduca commented 8 years ago

Check this: https://github.com/mitchellh/vagrant/issues/6360

kornushkin commented 8 years ago

This solved my problem: "check your /etc/hosts. I just add "127.0.0.1 localhost" (it was removed previously from /etc/host) and restart my machine - everything is working now."

fgrehm commented 8 years ago

Good to know. Thanks for the follow up! :beers: