Warning: file_get_contents(/data/phpspider/zhask/data//catemap/3/reactjs/26.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Vagrant挂在Ubuntu 14.04上的NFS挂载上_Vagrant_Ubuntu 14.04_Nfs_Nfsclient - Fatal编程技术网

Vagrant挂在Ubuntu 14.04上的NFS挂载上

Vagrant挂在Ubuntu 14.04上的NFS挂载上,vagrant,ubuntu-14.04,nfs,nfsclient,Vagrant,Ubuntu 14.04,Nfs,Nfsclient,直到今天,我的流浪设置工作得很顺利。但是发生了一些事,我不知道是什么 突然,当我执行“漫游”时,它挂起挂载NFS共享文件夹 我的猜测是由于我的主机上的一些更新导致了一些问题。下面是vagrant up--debug命令的输出以及最近两天的最新更新列表 以下是“流浪者”的输出: ==> default: Mounting NFS shared folders... DEBUG ssh: Checking whether SSH is ready... DEBUG ssh: Re-using

直到今天,我的流浪设置工作得很顺利。但是发生了一些事,我不知道是什么

突然,当我执行“漫游”时,它挂起挂载NFS共享文件夹

我的猜测是由于我的主机上的一些更新导致了一些问题。下面是vagrant up--debug命令的输出以及最近两天的最新更新列表

以下是“流浪者”的输出:

==> 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...
==>默认值:装载NFS共享文件夹。。。
调试ssh:正在检查ssh是否已就绪。。。
调试ssh:重新使用ssh连接。
信息ssh:ssh准备好了!
调试ssh:重新使用ssh连接。
infossh:Execute:(sudo=false)
调试ssh:退出状态:0
调试来宾:搜索cap:mount\u nfs\u文件夹
调试来宾:签入:ubuntu
调试来宾:签入:debian
调试来宾:签入:linux
调试来宾:在linux中找到cap:mount\u nfs\u文件夹
信息来宾:执行功能:mount_nfs_folder[#],“192.168.56.1”,{“/home/vagrant”=>{:type=>:nfs,:mount_options=>[“nolock,vers=3,udp,noatime,fsc,actimeo=1”],:guestpath=>“/home/stefan/NetBeansProjects/cargoplanning”,:disabled=>false,:map_-gid=>1000,:map_-gid=>1000,:nfs=>“2352560104”,:linux_uuunfs_options=>[“rw”,“no_子树检查”,“all_squash”,“anonuid=1000”,“anongid=1000”,“fsid=2352560104”]}](ubuntu)
调试ssh:正在检查ssh是否已就绪。。。
调试ssh:重新使用ssh连接。
信息ssh:ssh准备好了!
调试ssh:重新使用ssh连接。
infossh:Execute:(sudo=false)
调试ssh:退出状态:0
调试来宾:搜索cap:shell\u扩展\u来宾\u路径
调试来宾:签入:ubuntu
调试来宾:签入:debian
调试来宾:签入:linux
调试来宾:在linux中找到cap:shell\u expand\u guest\u路径
信息来宾:执行功能:shell_expand_guest_path[#,“/home/vagrant”](ubuntu)
调试ssh:重新使用ssh连接。
infossh:Execute:echo;printf/home/vagrant(sudo=false)
调试ssh:退出状态:0
调试ssh:stdout:
/家庭/流浪者
调试ssh:重新使用ssh连接。
infossh:Execute:mkdir-p/home/vagrant(sudo=true)
调试ssh:stderr:stdin:不是tty
调试ssh:退出状态:0
调试ssh:重新使用ssh连接。
infossh:Execute:mount-o'nolock,vers=3,udp,noatime,fsc,actimeo=1'192.168.56.1:'/home/stefan/NetBeansProjects/cargoplanning'/home/vagrant(sudo=true)
调试ssh:stderr:stdin:不是tty
调试ssh:正在发送ssh保持活动状态。。。
调试ssh:正在发送ssh保持活动状态。。。
调试ssh:正在发送ssh保持活动状态。。。
调试ssh:正在发送ssh保持活动状态。。。
调试ssh:正在发送ssh保持活动状态。。。
调试ssh:正在发送ssh保持活动状态。。。


问题在于udp协议。 我从文件配置行中删除了udp:

:mount_options => ['nolock,vers=3,udp,noatime,fsc,actimeo=1']

此外,即使速度更快,也不建议使用udp。

尝试重新启动nfs服务(在Arch中,sudo systemctl restart nfs-server.service for me)或从/etc/exports中删除Vagrant条目(它们被#Vagrant-BEGIN:…#Vagrant-END:comments包围)然后重新启动服务。

对于仍在四处查看的其他人,在18.04,我在我的案件中找到了罪犯


在我的例子中,尽管安装了nfs内核服务器和nfs common,但nfs服务器包似乎丢失了,我安装了nfs服务器,vagrant up工作正常。vagrant 2.0.3和Virtualbox build 5.2.18_Ubuntu r123745

如果主机是Ubuntu,请执行
服务nfs服务器重启