端口 443 不可访问

你好。我尝试在 Ubuntu 服务器(确切地说是 Ubuntu 20)上安装 Discourse,但每次都会收到“警告:计算机的 443 端口似乎无法通过主机名访问”的错误。我尝试了多种解决方案,也查阅了很多资料,但仍未找到解决办法。这是我第一次设置 Discourse 服务器,所以不太确定自己哪里做错了或问题出在哪里。完整错误信息如下:

root@vps-zap581523-2:/opt/discourse# ./discourse-setup
Ports 80 and 443 are free for use
'samples/standalone.yml' -> 'containers/app.yml'
Found 4GB of memory and 20 physical CPU cores
setting db_shared_buffers = 1024MB
setting UNICORN_WORKERS = 8
containers/app.yml memory parameters updated.

Hostname for your Discourse? [discourse.example.com]: forum.mayflowerleti.org

Checking your domain name . . .
./discourse-setup: line 36: curl: command not found
WARNING: Port 443 of computer does not appear to be accessible using hostname:  forum.mayflowerleti.org.
./discourse-setup: line 36: curl: command not found
WARNING: Connection to http://forum.mayflowerleti.org (port 80) also fails.

This suggests that forum.mayflowerleti.org resolves to some IP address that does not reach this
machine where you are installing discourse.

The first thing to do is confirm that forum.mayflowerleti.org resolves to the IP address of this server.
You usually do this at the same place you purchased the domain.

If you are sure that the IP address resolves correctly, it could be a firewall issue.
A web search for "open ports YOUR CLOUD SERVICE" might help.

This tool is designed only for the most standard installations. If you cannot resolve
the issue above, you will need to edit containers/app.yml yourself and then type

./launcher rebuild app

root@vps-zap581523-2:/opt/discourse#

目前我不知该如何继续。VPS 所有者已将 DNS 指向我们运行 Discourse 的 VPS IP 地址,但问题仍未解决。他还告诉我没有防火墙阻止连接,因此我不太清楚为什么无法正常工作。如果能得到一些帮助,那就太好了。抱歉又创建了这样一个主题,但目前我确实没有其他选择。感谢您的时间和帮助。

您应添加的域名记录尚未可用或配置不正确。

forum.domain 应指向运行 Discourse 的 Ubuntu 服务器。

请检查后重试。

我认为它指向的是 Ubuntu 服务器。


从这里可以看出,它确实指向了 Ubuntu 服务器。不确定是否应该以其他方式进行配置,但就目前来看,它是直接指向 Ubuntu 服务器的。不过还是感谢您的帮助。

如果那是正确的 IP 地址,那么您应该可以正常使用了

https://www.whatsmydns.net/#A/forum.mayflowerleti.org

1 个赞

IP 地址是正确的,但它无法正常工作。它仍然报出上述错误,我不知道原因。不过,感谢您的时间和帮助。

你使用的是哪份安装手册?

如果使用标准安装,路径应为 /var/discourse/

discourse/docs/INSTALL-cloud.md at main · discourse/discourse · GitHub

1 个赞

这看起来是个问题;curl 是否已安装?如果没有,请安装它:apt install curl

1 个赞

@IAmGav,将其放入 var 目录似乎让问题解决了。我猜是因为它需要放在那里,同时我也需要安装/修复 curl,这是 @danb35 建议的。不确定是因为改到了 var 目录、安装了 curl、仅仅是时间推移最终注册成功,还是这些因素共同作用的结果。非常感谢你们两位。我不确定应该在这里标记哪个答案为解决方案。等我完成设置后,可能会标记你们其中一位的答案为解决方案。如果设置失败,你们可能会看到我再次回复。与此同时,它似乎已经连接成功了。再次非常感谢你们两位!

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.