Fresh Valet安装未ping.测试



我正在尝试让Valet在运行macOS 12.3的新MacBook Pro上运行。Homebrew、PHP和Composer都安装得很好,运行良好(据我所知(。

然而,一旦我安装了Valet并尝试使用ping foobar.test,它就不会返回127.0.0.1(它是某种198.#.#.#IP(,我也无法在浏览器中访问它。我收到一条ERR_CONNECTION_RESET消息。

如果我直接在浏览器中转到127.0.0.1localhost;404-未找到";我期待代客泊车信息。

运行brew services list,我得到以下内容:

Name    Status     User File
dnsmasq error  512 root ~/Library/LaunchAgents/homebrew.mxcl.dnsmasq.plist
mariadb started    root ~/Library/LaunchAgents/homebrew.mxcl.mariadb.plist
nginx   error  256 root ~/Library/LaunchAgents/homebrew.mxcl.nginx.plist
php     started    root ~/Library/LaunchAgents/homebrew.mxcl.php.plist
unbound error  256 root ~/Library/LaunchAgents/homebrew.mxcl.unbound.plist

";错误";状态似乎可疑,但我多年来一直在与Valet工作的以前的机器上的状态作斗争。

我已尝试重新启动MacBook,重新启动代客泊车(也称为sudo(,并删除/重新安装代客泊车。似乎没有什么帮助。

不确定该尝试什么,因为在安装过程中没有出现任何错误。所有的社区帖子似乎都指向重新安装代客泊车,如前所述,这似乎没有帮助。

有什么想法吗?

卸载FortiClient,问题就消失了。查看您是否安装了VPN客户端或。

我以前遇到过这个问题,发现使用FortiClient的根本原因是它在OSX中启用了pf防火墙,并具有NAT DNS重定向。

为了验证我在运行sudo pfctl -s nat时看到的内容,给了我一行包含以下内容的代码:
rdr pass inet proto udp from any to any port = 53 -> 127.0.0.1 port 53535

如果您需要拥有FortiClient并在本地开发中使用代客泊车,可以找到以下几种解决方法:

  • 重置pf的配置
  • 编辑/etc/hosts以静态添加主机(尽管这不会扩展到多个主机,也不会更改主机(

要重置PF,我将执行以下操作:

# reset the rules based off the on-disk version
sudo pfctl -N -f /etc/pf.conf
# clear the DNS cache on system
sudo dscacheutil -flushcache
sudo killall -HUP mDNSResponder

在检查了pf中的NAT规则后,我得到了默认响应:

$ sudo pfctl -s nat
No ALTQ support in kernel
ALTQ related functions disabled
nat-anchor “com.apple/*” all
rdr-anchor “com.apple/*” all

注意:重置pf的配置可能会有一些其他副作用,尽管根据我过去一个月使用它的经验,它似乎对我的设置没有任何问题

最新更新