流浪汉向上时,SSH命令以非零退出状态响应

时间:2016-05-21 09:26:44

标签: vagrant nfs

我已将debian操作系统添加到vagrant,然后运行vagrant up命令,但它会抛出以下错误。

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

接下来我添加了/ etc / sudoers

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

这是vagrantfile中的我的Syn_Folder代码:

    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

现在也抛出相同的错误,建议我如何解决这个问题。

2 个答案:

答案 0 :(得分:1)

我解决了我的问题以阻止防火墙

使用follwing命令:

   systemctl stop firewalld

它为我工作。

答案 1 :(得分:0)

我遇到了同样的问题suddelny vagrant up不再起作用,并且错误消息味精“ mount.nfs:连接超时”。被显示 我只是删除了旧版本的vagrant并下载了新版本“ 2.2.4”