我第一次尝试运行vagrant up
,但收到此错误:
==> default: 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 xxx.xxx.xx.x:/home/erick/... (path)
Stdout from the command:
Stderr from the command:
mount.nfs: Connection timed out
如何修复它?
谢谢
最佳答案
你的 nfs 守护进程正在运行吗?您可以使用nfsd status
进行检查,它应该返回nfsd服务已启用
。如果它没有运行,您可以启用并启动它:
sudo nfsd enable
sudo nfsd start
我最近遇到了同样的问题,并注意到启用默认的 macOS 防火墙会阻止 NFS,并且它会超时而不会出现任何错误。如果您启用了防火墙,我会先尝试禁用它,然后重试。如果有效,您可以添加规则以允许 nfs 流量通过防火墙。
如果仍然无法正常工作:
- 确保文件
/etc/exports
存在 - 使用
nfsd checkexports
检查导出文件 - 检查系统日志中是否有 nfsd 错误
您可以在这里找到 nfsd 人员:https://developer.apple.com/legacy/library/documentation/Darwin/Reference/ManPages/man8/nfsd.8.html
(编辑:不幸的是,手册页已关闭,我无法再找到它 - 这是一个替代品,但您可能应该检查是否可以从苹果检索正确的版本。https://www.unix.com/man-page/osx/8/nfsd/)
关于vagrant - Mount.nfs : Connection timed out . .. - Vagrant - 格子,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/45330620/