您好,Discourse 社区,
我在 Google Cloud Platform (GCP) 虚拟机(Ubuntu 22.04,16GB RAM,8 个 CPU 核心)上重建 Discourse 实例时遇到问题。重建因 GitHub 连接错误而失败,并且我还遇到了端口 443 可访问性问题。我已经尝试了几个步骤,但仍然卡住了,希望得到您的帮助。
重建期间的 GitHub 连接错误
运行 ./launcher rebuild app 或 ./discourse-setup 时,重建会因日志中的以下错误而失败:
fatal: unable to access ’ https://github.com/discourse/discourse.git/ ': Failed to connect to github.com port 443 after 3 ms: Couldn’t connect to server
Pups::ExecError: cd /var/www/discourse && sudo -H -E -u discourse bash -c ‘… git fetch …’ failed with return #<Process::Status: pid 145 exit 128>
但是,从主机测试 GitHub 连接正常:
curl -I https://github.com
HTTP/2 200
但在以 discourse 用户身份运行时失败:
sudo -u discourse -H git ls-remote https://github.com/discourse/discourse.git
fatal: unable to access ’ https://github.com/discourse/discourse.git/ ': Failed to connect to github.com port 443 after 3 ms: Couldn’t connect to server
github.com 的 DNS 解析正常:
sudo -u discourse -H nslookup github.com 8.8.8.8
Server: 8.8.8.8
Address: 8.8.8.8#53
Name: github.com
Address: 192.30.255.113