3

我在 Laravel 项目上进行了代客设置并运行良好。我可以访问 mysite.test 并按应有的方式加载项目。但是,当我运行命令valet share时,我收到“无法连接到 127.0.0.1 端口 4040:连接被拒绝”错误。

我试过更新作曲家,更新自制软件并重新安装代客,但错误消息仍然存在。如果我运行 brew services list 以下服务都显示为正在运行;

dnsmasq   started root /Library/LaunchDaemons/homebrew.mxcl.dnsmasq.plist
mysql@5.7 started root /Library/LaunchDaemons/homebrew.mxcl.mysql@5.7.plist
nginx     started root /Library/LaunchDaemons/homebrew.mxcl.nginx.plist
php       started root /Library/LaunchDaemons/homebrew.mxcl.php.plist

我不相信 Apache 正在运行。尝试停止该服务时出现以下错误;

/System/Library/LaunchDaemons/org.apache.httpd.plist: Could not find specified service

我在运行代客共享后收到的完整错误如下。

ERROR:  Tunnel 'command_line' specifies invalid address 'Sites.
ERROR:  Warning: Class 'Tightenco\Collect\Support\Debug\Dumper' not found in /Users/darren/.composer/vendor/tightenco/collect/src/Collect/Support/alias.php on line 18
ERROR:  
ERROR:  Warning: Class 'Tightenco\Collect\Support\Debug\HtmlDumper' not found in /Users/darren/.composer/vendor/tightenco/collect/src/Collect/Support/alias.php on line 18
ERROR:  test:80': too many colons in address Sites.
ERROR:  Warning: Class 'Tightenco\Collect\Support\Debug\Dumper' not found in /Users/darren/.composer/vendor/tightenco/collect/src/Collect/Support/alias.php on line 18
ERROR:  
ERROR:  Warning: Class 'Tightenco\Collect\Support\Debug\HtmlDumper' not found in /Users/darren/.composer/vendor/tightenco/collect/src/Collect/Support/alias.php on line 18
ERROR:  test:80
Darrens-MacBook-Pro:Sites darren$ Failed to connect to 127.0.0.1 port 4040: Connection refused
Failed to connect to 127.0.0.1 port 4040: Connection refused
Failed to connect to 127.0.0.1 port 4040: Connection refused
Failed to connect to 127.0.0.1 port 4040: Connection refused
Failed to connect to 127.0.0.1 port 4040: Connection refused
Failed to connect to 127.0.0.1 port 4040: Connection refused
Failed to connect to 127.0.0.1 port 4040: Connection refused
Failed to connect to 127.0.0.1 port 4040: Connection refused
Failed to connect to 127.0.0.1 port 4040: Connection refused
Failed to connect to 127.0.0.1 port 4040: Connection refused
Failed to connect to 127.0.0.1 port 4040: Connection refused
Failed to connect to 127.0.0.1 port 4040: Connection refused
Failed to connect to 127.0.0.1 port 4040: Connection refused
Failed to connect to 127.0.0.1 port 4040: Connection refused
Failed to connect to 127.0.0.1 port 4040: Connection refused
Failed to connect to 127.0.0.1 port 4040: Connection refused
Failed to connect to 127.0.0.1 port 4040: Connection refused
Failed to connect to 127.0.0.1 port 4040: Connection refused
Failed to connect to 127.0.0.1 port 4040: Connection refused
Failed to connect to 127.0.0.1 port 4040: Connection refused
Failed to connect to 127.0.0.1 port 4040: Connection refused

In Request.php line 1028:

  Unable to connect to "http://127.0.0.1:4040/api/tunnels": 7 Failed to conne  
  ct to 127.0.0.1 port 4040: Connection refused                                


fetch-share-url

我相信 PHP 类警告是无关的。任何试图解决此问题的帮助将不胜感激。

编辑:

运行 sudo brew services start --all 以确保所有服务确实已启动导致以下错误;

/Library/LaunchDaemons/homebrew.mxcl.dnsmasq.plist: service already loaded
Error: Failure while executing; `/bin/launchctl bootstrap system /Library/LaunchDaemons/homebrew.mxcl.dnsmasq.plist` exited with 133.
4

1 回答 1

8

经过几个小时的调试,终于解决了这个问题。特别是在此过程中更新了“symfony/polyfill-php72”、“symfony/var-dumper”、“tightenco/collect”,因此问题一定出在其中一个软件包上。其他所有包都是从缓存中加载的。

composer global remove laravel/valet

composer self-update

composer global require laravel/valet

valet install

valet restart

于 2018-09-10T06:16:45.927 回答