# 从 2.9.0.beta8 升级导致网站崩溃，无法恢复

**URL:** <https://meta.discourse.org/t/upgrading-from-2-9-0-beta8-broke-the-site-unrecoverable/237660>\
**Category:** Self-hosting\
**Created:** [2022年八月31日 05:49 UTC](https://meta.discourse.org/t/upgrading-from-2-9-0-beta8-broke-the-site-unrecoverable/237660 "2022-08-31T05:49:09Z")\
**Posts on this page:** 12\
**Page:** 1

<div class="post-metadata">

**Author:** ![smileBeda](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/smilebeda/32/272497_2.png) [@smileBeda](https://meta.discourse.org/u/smileBeda)\
**Post date:** [2022年八月31日 05:49 UTC](https://meta.discourse.org/t/upgrading-from-2-9-0-beta8-broke-the-site-unrecoverable/237660/1 "2022-08-31T05:49:09Z")

</div>

你好

我们只是点击了管理员升级按钮。  
没想到会这样：

```plaintext
糟糕
驱动这个讨论论坛的软件遇到了一个意外问题。我们对造成的不便表示歉意。

有关错误的详细信息已被记录，并生成了自动通知。我们会看看的。

无需进一步操作。但是，如果错误状况持续存在，您可以通过在该站点的反馈类别中发布讨论主题来提供更多详细信息，包括重现错误的步骤。

```

现在，虽然这有点令人沮丧（如果网站有几千用户时发生这种情况怎么办？……），但我们还没有用户。幸运。但我们无法恢复它。没有明显的错误，也没有可以采取的步骤来恢复出现的问题……除非是那个不祥的“自动通知已生成”。谁收到了那个通知？它说了什么？为什么简单的软件升级就会让网站陷入瘫痪？我们该如何解决？

---

<div class="post-metadata">

**Author:** ![RGJ](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/rgj/32/523185_2.png) [@RGJ](https://meta.discourse.org/u/RGJ)\
**Post date:** [2022年八月31日 06:08 UTC](https://meta.discourse.org/t/upgrading-from-2-9-0-beta8-broke-the-site-unrecoverable/237660/2 "2022-08-31T06:08:20Z")

</div>

您仍然可以访问论坛上的 `/logs` 吗？通知在那里。

最后两个问题只能在您查看之后才能回答。

---

<div class="post-metadata">

**Author:** ![smileBeda](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/smilebeda/32/272497_2.png) [@smileBeda](https://meta.discourse.org/u/smileBeda)\
**Post date:** [2022年八月31日 07:05 UTC](https://meta.discourse.org/t/upgrading-from-2-9-0-beta8-broke-the-site-unrecoverable/237660/3 "2022-08-31T07:05:39Z")

</div>

不幸的是，什么都不能用了。因此，我们不得不重新实例化一个服务器端备份，现在我们有点担心再次更新。\n\n有没有什么方法可以在安全模式下更新？我很难相信每次软件更新我们都必须冒着完全停机的风险。

---

<div class="post-metadata">

**Author:** ![Jagster](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/jagster/32/192154_2.png) [@Jagster](https://meta.discourse.org/u/Jagster)\
**Post date:** [2022年八月31日 07:59 UTC](https://meta.discourse.org/t/upgrading-from-2-9-0-beta8-broke-the-site-unrecoverable/237660/4 "2022-08-31T07:59:14Z")

</div>

> [@smileBeda](#):
>
> 每次软件更新我们都要承担完全停机的风险

这是包括 Discourse 在内的所有应用程序都存在的实际风险。这就是为什么大公司使用暂存服务器，而我们这些小公司在每次更新之前（至少在任何升级之前）都会进行备份（站点和数据库）。

---

<div class="post-metadata">

**Author:** ![JammyDodger](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/jammydodger/32/254611_2.png) [@JammyDodger](https://meta.discourse.org/u/JammyDodger)\
**Post date:** [2022年八月31日 10:05 UTC](https://meta.discourse.org/t/upgrading-from-2-9-0-beta8-broke-the-site-unrecoverable/237660/5 "2022-08-31T10:05:28Z")

</div>

您好，欢迎您 @smileBeda 🙂

您能否提供更多关于您设置的详细信息？例如，您运行的是哪个版本，是否是标准安装，以及您是否安装了任何插件（官方或第三方）。

通常升级都很顺利，但为了以防万一，在进行升级前备份一个正在运行的网站总是明智的。

---

<div class="post-metadata">

**Author:** ![smileBeda](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/smilebeda/32/272497_2.png) [@smileBeda](https://meta.discourse.org/u/smileBeda)\
**Post date:** [2022年八月31日 10:34 UTC](https://meta.discourse.org/t/upgrading-from-2-9-0-beta8-broke-the-site-unrecoverable/237660/6 "2022-08-31T10:34:30Z")

</div>

我们正在运行 `2.9.0.beta8`  
它要求我们更新的是 `docker_manager 45986ad4` ([Comparing 45986ad40ec642ea617a083aecc75e0078878fb7...90a8a6c6cae0bba01de7fdf340da1ab878bff913 · discourse/docker\_manager · GitHub](https://github.com/discourse/docker_manager/compare/45986ad40ec642ea617a083aecc75e0078878fb7...90a8a6c6cae0bba01de7fdf340da1ab878bff913))

这是通过 Docker 进行的标准安装，但我们运行了几个插件（但真的没什么特别的。到目前为止没有自定义代码）

在这一点上（没有错误日志），我无法提供更多信息，我猜我们只能硬着头皮再来一次，在备份之后，运行更新，如果再次失败，再提交日志……

---

<div class="post-metadata">

**Author:** ![osioke](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/osioke/32/238946_2.png) [@osioke](https://meta.discourse.org/u/osioke)\
**Post date:** [2022年八月31日 10:54 UTC](https://meta.discourse.org/t/upgrading-from-2-9-0-beta8-broke-the-site-unrecoverable/237660/8 "2022-08-31T10:54:44Z")

</div>

> [@smileBeda](#):
>
> 这是通过 Docker 进行的一次[标准安装](https://meta.discourse.org/t/142537)，但是我们运行了几个插件（但真的没什么特别的。到目前为止没有自定义代码）。

你能在此处粘贴你的 app.yml 文件吗？这样更容易了解之前和现在的情况。

---

<div class="post-metadata">

**Author:** ![JammyDodger](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/jammydodger/32/254611_2.png) [@JammyDodger](https://meta.discourse.org/u/JammyDodger)\
**Post date:** [2022年八月31日 11:08 UTC](https://meta.discourse.org/t/upgrading-from-2-9-0-beta8-broke-the-site-unrecoverable/237660/9 "2022-08-31T11:08:07Z")

</div>

此主题中还有一些关于如何手动从服务器更新的要点：

> [@Manually update Discourse and Docker image to latest](https://meta.discourse.org/t/how-do-i-manually-update-discourse-and-docker-image-to-latest/23325):
>
> bookmark This guide provides step-by-step instructions for manually updating Discourse, the Docker container, and the Ubuntu operating system on a self-hosted setup. person_raising_hand Required user level: System Administrator warning SSH access to the server. If you self-host Discourse, you occasionally need to run a manual update via the command line to get the latest security releases newest libraries. These updates are not picked up in admin/update, which is why you’ll occasiona…

`./launcher rebuild app` 通常是一个不错的备选方案，如果在执行此操作时遇到任何错误，可以向上滚动阅读。

---

<div class="post-metadata">

**Author:** ![pfaffman](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/pfaffman/32/120154_2.png) [@pfaffman](https://meta.discourse.org/u/pfaffman)\
**Post date:** [2022年八月31日 11:08 UTC](https://meta.discourse.org/t/upgrading-from-2-9-0-beta8-broke-the-site-unrecoverable/237660/10 "2022-08-31T11:08:20Z")

</div>

您是否运行了

```
 ./launcher rebuild app

```

或者您是从 Web 界面升级的？有时需要完全重建。  
您要查找的日志位于

```
     /var/discourse/shared/log/rails/production.log

```

（如果我用手机输入正确的话）

---

<div class="post-metadata">

**Author:** ![Benjamin\_D](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/benjamin_d/32/277831_2.png) [@Benjamin\_D](https://meta.discourse.org/u/Benjamin_D)\
**Post date:** [2022年八月31日 12:03 UTC](https://meta.discourse.org/t/upgrading-from-2-9-0-beta8-broke-the-site-unrecoverable/237660/11 "2022-08-31T12:03:42Z")

</div>

> [@pfaffman](#):
>
> ```plaintext
> /var/discourse/shared/log/rails/production.log
> 
> ```
> 
> （如果我在手机上输入正确的话）

差不多 😁  
`/var/discourse/shared/standalone/log/rails/production.log`  
还有可能  
`/var/discourse/shared/standalone/log/rails/production_errors.log`

---

<div class="post-metadata">

**Author:** ![merefield](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/merefield/32/176214_2.png) [@merefield](https://meta.discourse.org/u/merefield)\
**Post date:** [2022年八月31日 13:00 UTC](https://meta.discourse.org/t/upgrading-from-2-9-0-beta8-broke-the-site-unrecoverable/237660/12 "2022-08-31T13:00:00Z")

</div>

> [@smileBeda](#):
>
> 然而，我们运行了几个插件

您能详细说明一下吗？是哪些插件？

---

<div class="post-metadata">

**Author:** ![osioke](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/osioke/32/238946_2.png) [@osioke](https://meta.discourse.org/u/osioke)\
**Post date:** [2022年八月31日 14:59 UTC](https://meta.discourse.org/t/upgrading-from-2-9-0-beta8-broke-the-site-unrecoverable/237660/13 "2022-08-31T14:59:29Z")

</div>

这正是我所想的，所以我要求他们粘贴/共享他们的 app.yml 文件。
