# Ubuntu 20.04.3 LTS 新安装失败

**URL:** <https://meta.discourse.org/t/new-install-fails-on-ubuntu-20-04-3-lts/203778>\
**Category:** Self-hosting\
**Created:** [2021 年9 月 16 日 22:50 UTC](https://meta.discourse.org/t/new-install-fails-on-ubuntu-20-04-3-lts/203778 "2021-09-16T22:50:04Z")\
**Posts on this page:** 1\
**Showing post:** 1

<div class="post-metadata">

作者： ![AndreTechExec](https://avatars.discourse-cdn.com/v4/letter/a/6a8cbe/32.png) [@AndreTechExec](https://meta.discourse.org/u/AndreTechExec)\
发布日期： [2021 年9 月 16 日 22:50 UTC](https://meta.discourse.org/t/new-install-fails-on-ubuntu-20-04-3-lts/203778/1 "2021-09-16T22:50:04Z")

</div>

在新 EC2 实例上采用标准配置进行全新安装失败。我在 AWS 上启动了一台运行 Ubuntu 20.04.3 的 EC2 实例，并执行了所有最新的 Ubuntu 更新。随后运行了位于 [此处](https://github.com/discourse/discourse/blob/main/docs/INSTALL-cloud.md) 的简单标准安装脚本：

```plaintext
sudo -s
git clone https://github.com/discourse/discourse_docker.git /var/discourse
cd /var/discourse

./discourse-setup

```

唯一的小插曲是，在运行 setup 时，由于我忘记在 AWS 上开放两个入站端口，导致无法通过 HTTP(S) 连接到服务器。因此，我在 AWS 安全组中开放了端口后，手动配置了 app.yml 文件，并运行了 `./launcher rebuild app`。

现在浏览器无法连接，生产日志显示如下错误：

```plaintext
/var/www/discourse/vendor/bundle/ruby/2.7.0/gems/message_bus-3.3.6/lib/message_bus.rb:729:in `block in new_subscriber_thread'
Job exception: Error connecting to Redis on localhost:6379 (Errno::EADDRNOTAVAIL)

Job exception: Error connecting to Redis on localhost:6379 (Errno::EADDRNOTAVAIL)

Job exception: Error connecting to Redis on localhost:6379 (Errno::EADDRNOTAVAIL)

Job exception: Error connecting to Redis on localhost:6379 (Errno::EADDRNOTAVAIL)

Job exception: Error connecting to Redis on localhost:6379 (Errno::EADDRNOTAVAIL)

Job exception: Error connecting to Redis on localhost:6379 (Errno::EADDRNOTAVAIL)

Error connecting to Redis on localhost:6379 (Errno::EADDRNOTAVAIL) subscribe failed, reconnecting in 1 second. Call stack /var/www/discourse/vendor/bundle/ruby/2.7.0/gems/redis-4.4.0/lib/redis/client.rb:384:in `rescue in establish_connection'

```

我之所以启动新的 EC2 实例，是因为之前使用的一台重新配置的服务器（同样运行 Ubuntu 20.04.3）在安装 Discourse 时遇到了完全相同的问题，生产日志中也出现了相同的错误。因此，我想从头开始，确保过程简单顺利。

---

_[View the full topic](https://meta.discourse.org/t/new-install-fails-on-ubuntu-20-04-3-lts/203778)._
