突然间,当我进行流浪时,它会在挂载NFS共享文件夹时挂起。
我的猜测是由于主机上的某些更新而导致某些内容破裂。以下是vagrant up --debug命令的输出以及过去2天内最新更新的列表。
这是来自流浪汉的输出:
==> default: Mounting NFS shared folders...
DEBUG ssh: Checking whether SSH is ready...
DEBUG ssh: Re-using SSH connection.
INFO ssh: SSH is ready!
DEBUG ssh: Re-using SSH connection.
INFO ssh: Execute: (sudo=false)
DEBUG ssh: Exit status: 0
DEBUG guest: Searching for cap: mount_nfs_folder
DEBUG guest: Checking in: ubuntu
DEBUG guest: Checking in: debian
DEBUG guest: Checking in: linux
DEBUG guest: Found cap: mount_nfs_folder in linux
INFO guest: Execute capability: mount_nfs_folder [#<Vagrant::Machine: default (VagrantPlugins::ProviderVirtualBox::Provider)>, "192.168.56.1", {"/home/vagrant"=>{:type=>:nfs, :mount_options=>["nolock,vers=3,udp,noatime,fsc,actimeo=1"], :guestpath=>"/home/vagrant", :hostpath=>"/home/stefan/NetBeansProjects/cargoplanning", :disabled=>false, :map_uid=>1000, :map_gid=>1000, :nfs_udp=>true, :nfs_version=>3, :uuid=>"2352560104", :linux__nfs_options=>["rw", "no_subtree_check", "all_squash", "anonuid=1000", "anongid=1000", "fsid=2352560104"]}}] (ubuntu)
DEBUG ssh: Checking whether SSH is ready...
DEBUG ssh: Re-using SSH connection.
INFO ssh: SSH is ready!
DEBUG ssh: Re-using SSH connection.
INFO ssh: Execute: (sudo=false)
DEBUG ssh: Exit status: 0
DEBUG guest: Searching for cap: shell_expand_guest_path
DEBUG guest: Checking in: ubuntu
DEBUG guest: Checking in: debian
DEBUG guest: Checking in: linux
DEBUG guest: Found cap: shell_expand_guest_path in linux
INFO guest: Execute capability: shell_expand_guest_path [#<Vagrant::Machine: default (VagrantPlugins::ProviderVirtualBox::Provider)>, "/home/vagrant"] (ubuntu)
DEBUG ssh: Re-using SSH connection.
INFO ssh: Execute: echo; printf /home/vagrant (sudo=false)
DEBUG ssh: Exit status: 0
DEBUG ssh: stdout:
/home/vagrant
DEBUG ssh: Re-using SSH connection.
INFO ssh: Execute: mkdir -p /home/vagrant (sudo=true)
DEBUG ssh: stderr: stdin: is not a tty
DEBUG ssh: Exit status: 0
DEBUG ssh: Re-using SSH connection.
INFO ssh: Execute: mount -o 'nolock,vers=3,udp,noatime,fsc,actimeo=1' 192.168.56.1:'/home/stefan/NetBeansProjects/cargoplanning' /home/vagrant (sudo=true)
DEBUG ssh: stderr: stdin: is not a tty
DEBUG ssh: Sending SSH keep-alive...
DEBUG ssh: Sending SSH keep-alive...
DEBUG ssh: Sending SSH keep-alive...
DEBUG ssh: Sending SSH keep-alive...
DEBUG ssh: Sending SSH keep-alive...
DEBUG ssh: Sending SSH keep-alive...
答案 0 :(得分:5)
尝试重新启动nfs服务(在Arch中为我提供sudo systemctl restart nfs-server.service)或从/ etc / exports中删除Vagrant条目(它们被#VAGRANT-BEGIN包围:...#VAGRANT-END :comments)然后重启服务。
答案 1 :(得分:1)
问题是udp协议。 我从VagrantFile配置行中删除了udp:
:mount_options => ['nolock,vers=3,udp,noatime,fsc,actimeo=1']
此外,即使速度更快,也不建议使用udp。 https://github.com/mitchellh/vagrant/issues/2304
答案 2 :(得分:0)
对于还在18.04左右仍在四处寻找的任何人,我发现了本案的罪魁祸首。
在我的情况下,即使安装了nfs-kernel-server和nfs-common,nfs-server软件包也似乎丢失了,我安装了nfs-server,并且无所事事地工作了。 Vagrant 2.0.3和Virtualbox build 5.2.18_Ubuntu r123745