Search code examples
vagrantnfs

SSH command responded with a non-zero exit status while vagrant up


I have added debian os to vagrant, then run vagrant up command, but it will throw the following error.

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.56.1:'/u01/ChennaiBox/mage2_vagrant' /vagrant

Stdout from the command:



Stderr from the command:

stdin: is not a tty
mount.nfs: Connection timed out

Next i added /etc/sudoers

   vagrant ALL=(ALL) NOPASSWD:ALL
   Defaults:vagrant !requiretty

This is My Syn_Folder code in vagrantfile:

    if Vagrant::Util::Platform.windows?
    config.vm.synced_folder ".", "/vagrant", :mount_options => ["dmode=777", "fmode=777"]
  else
#    config.vm.synced_folder ".", "/vagrant", :nfs => { :mount_options => ["dmode=777", "fmode=777"] }

     config.vm.synced_folder ".", "/vagrant", type: "nfs", mount_options: ["dmode=777", "fmode=777"]

    #rsync_args = ['--verbose', '--archive', '-z']
    #config.vm.synced_folder ".", "/vagrant",
    #  rsync__args: rsync_args, rsync__exclude: ['.vagrant/'], rsync__auto: true, type: 'rsync'

  end

Now also throw same error, suggest me how to solve this problem.


Solution

  • I solve my Problem to stop firewall

    Using follwing command:

       systemctl stop firewalld
    

    Its worked for me.