# 升级从3.4.0到3.4.1后网站无法访问

**URL:** <https://meta.discourse.org/t/site-inaccessible-after-upgrading-from-3-4-0-to-3-4-1/356185>\
**Category:** Support\
**Tags:** docker, docker-manager\
**Created:** [2025年三月7日 00:48 UTC](https://meta.discourse.org/t/site-inaccessible-after-upgrading-from-3-4-0-to-3-4-1/356185 "2025-03-07T00:48:17Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![CamilleRoux](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/camilleroux/32/119575_2.png) [@CamilleRoux](https://meta.discourse.org/u/CamilleRoux)\
**Post date:** [2025年三月7日 00:48 UTC](https://meta.discourse.org/t/site-inaccessible-after-upgrading-from-3-4-0-to-3-4-1/356185/1 "2025-03-07T00:48:17Z")

</div>

大家好，

我刚刚将我的 Discourse 实例从 3.4.0 版本升级到 3.4.1 版本（使用 `./launcher rebuild app`）。升级过程很顺利——过程中没有出现任何错误，Docker 容器也在运行。但是，网站完全无法访问。

有人遇到过这个问题吗？有什么排查思路吗？我该如何提供更多信息？

提前感谢您的帮助！

---

<div class="post-metadata">

**Author:** ![Arkshine](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/arkshine/32/298682_2.png) [@Arkshine](https://meta.discourse.org/u/Arkshine)\
**Post date:** [2025年三月7日 01:05 UTC](https://meta.discourse.org/t/site-inaccessible-after-upgrading-from-3-4-0-to-3-4-1/356185/3 "2025-03-07T01:05:33Z")

</div>

您好，

您是否尝试过第二次重建？  
在某些情况下这可能会有所帮助。我会先尝试这个。

您也可以查看 `./launcher logs app` 和 `/shared/standalone/log/rails/production.log` ，看看是否有有趣的内容。

---

<div class="post-metadata">

**Author:** ![sam](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/sam/32/102149_2.png) [@sam](https://meta.discourse.org/u/sam)\
**Post date:** [2025年三月7日 01:21 UTC](https://meta.discourse.org/t/site-inaccessible-after-upgrading-from-3-4-0-to-3-4-1/356185/4 "2025-03-07T01:21:36Z")

</div>

我们正在试验一个人工智能响应器，它在这里提供了一些建议：

> 您好，看起来您的问题可以通过检查服务器日志来诊断升级后出现的问题。您可以按以下步骤进行：
> 
> 1. **在管理员界面中检查 Discourse 错误日志：**
> 
> 2. **检查其他服务器日志：**
> 
> 3. **检查 NGINX 日志：**
> 
> 4. **网络和 DNS 问题：**
> 
> 请告知我们在日志中发现了什么，以便我们提供更具体的帮助来解决问题。
> 
> **有用的资源：**
> 
> - [Discourse 日志记录指南](https://meta.discourse.org/t/where-does-discourse-store-and-show-logs/58022)：提供了 Discourse 中所有类型日志的详细概述。
> - [访问服务器日志](https://meta.discourse.org/t/how-to-check-error-logs/55588)：一份适合初学者的访问日志指南。
> 
> **其他背景信息：**  
> 如果问题仍然存在，常见原因可能包括：
> 
> - 升级后插件不兼容。
> - 重建过程中内存/存储不足。
> - `app.yml` 中的配置更改。

---

<div class="post-metadata">

**Author:** ![CamilleRoux](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/camilleroux/32/119575_2.png) [@CamilleRoux](https://meta.discourse.org/u/CamilleRoux)\
**Post date:** [2025年三月7日 22:17 UTC](https://meta.discourse.org/t/site-inaccessible-after-upgrading-from-3-4-0-to-3-4-1/356185/5 "2025-03-07T22:17:20Z")

</div>

谢谢！

> [@Arkshine](#):
>
> Did you try to rebuild a second time?

是的，结果一样

> [@sam](#):
>
> ```plaintext
> cd /shared/log/rails
> less production.log
> 
> ```

这是日志：

```plaintext
[default] start
[default] done
[default] Shutting down
[default] Terminating quiet threads
[default] Scheduler exiting...
[default] Pausing to allow jobs to finish...
[default] Bye!
[default] [PrettyText] Deprecation notice: `registerOption() from `pretty-text` is deprecated. Use `helper.registerOptions()` instead. [deprecated since Discourse 2.8.0.beta9] [removal in Discourse 2.9.0.beta1] [deprecation id: discourse.pretty-text.registerOption]
[default] Booting Sidekiq 6.5.12 with Sidekiq::RedisConnection::RedisAdapter options {:host=>"data", :port=>6379, :namespace=>"sidekiq"}
[default] [PrettyText] Deprecation notice: `registerOption() from `pretty-text` is deprecated. Use `helper.registerOptions()` instead. [deprecated since Discourse 2.8.0.beta9] [removal in Discourse 2.9.0.beta1] [deprecation id: discourse.pretty-text.registerOption]
[default] [PrettyText] Deprecation notice: `registerOption() from `pretty-text` is deprecated. Use `helper.registerOptions()` instead. [deprecated since Discourse 2.8.0.beta9] [removal in Discourse 2.9.0.beta1] [deprecation id: discourse.pretty-text.registerOption]
[default] [PrettyText] Deprecation notice: `registerOption() from `pretty-text` is deprecated. Use `helper.registerOptions()` instead. [deprecated since Discourse 2.8.0.beta9] [removal in Discourse 2.9.0.beta1] [deprecation id: discourse.pretty-text.registerOption]
[default] [PrettyText] Deprecation notice: `registerOption() from `pretty-text` is deprecated. Use `helper.registerOptions()` instead. [deprecated since Discourse 2.8.0.beta9] [removal in Discourse 2.9.0.beta1] [deprecation id: discourse.pretty-text.registerOption]
[default] Booted Rails 7.2.2.1 application in production environment
[default] Running in ruby 3.3.6 (2024-11-05 revision 75015d4c1f) [x86_64-linux]
[default] See LICENSE and the LGPL-3.0 for licensing details.
[default] Upgrade to Sidekiq Pro for more features and support: https://sidekiq.org
[default] start
[default] done
root@forum-web-only:/shared/log/rails#

```

这是 NGINX 日志：

```plaintext
2025/03/07 22:13:42 [warn] 2195#2195: duplicate extension "wasm", content type: "application/wasm", previous content type: "application/wasm" in /etc/nginx/conf.d/discourse.conf:4
2025/03/07 22:13:42 [emerg] 2195#2195: unknown "public" variable
2025/03/07 22:13:43 [warn] 2198#2198: duplicate extension "wasm", content type: "application/wasm", previous content type: "application/wasm" in /etc/nginx/conf.d/discourse.conf:4
2025/03/07 22:13:43 [emerg] 2198#2198: unknown "public" variable
2025/03/07 22:13:44 [warn] 2200#2200: duplicate extension "wasm", content type: "application/wasm", previous content type: "application/wasm" in /etc/nginx/conf.d/discourse.conf:4
2025/03/07 22:13:44 [emerg] 2200#2200: unknown "public" variable
2025/03/07 22:13:45 [warn] 2202#2202: duplicate extension "wasm", content type: "application/wasm", previous content type: "application/wasm" in /etc/nginx/conf.d/discourse.conf:4
2025/03/07 22:13:45 [emerg] 2202#2202: unknown "public" variable
2025/03/07 22:13:46 [warn] 2204#2204: duplicate extension "wasm", content type: "application/wasm", previous content type: "application/wasm" in /etc/nginx/conf.d/discourse.conf:4
2025/03/07 22:13:46 [emerg] 2204#2204: unknown "public" variable

```

这是 discourse-doctor 的日志：

```plaintext
DISCOURSE DOCTOR Fri 07 Mar 2025 10:15:28 PM UTC
OS: Linux forum 5.4.0-208-generic #228-Ubuntu SMP Fri Feb 7 19:41:33 UTC 2025 x86_64 x86_64 x86_64 GNU/Linux

YML=web_only.yml
Found containers/web_only.yml

==================== YML SETTINGS ====================
DISCOURSE_HOSTNAME=forum.pragmaticentrepreneurs.com
SMTP_ADDRESS=smtp.eu.mailgun.org
DEVELOPER_EMAILS=REDACTED

==================== YML SETTINGS ====================
DISCOURSE_HOSTNAME=forum.pragmaticentrepreneurs.com
SMTP_ADDRESS=smtp.eu.mailgun.org
DEVELOPER_EMAILS=REDACTED
SMTP_PASSWORD=REDACTED
SMTP_PORT=587
SMTP_USER_NAME=postmaster@mg.pragmaticentrepreneurs.com
LETSENCRYPT_ACCOUNT_EMAIL=REDACTED

==================== DOCKER INFO ====================
DOCKER VERSION: Docker version 27.3.1, build ce12230

DOCKER PROCESSES (docker ps -a)

CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
d5a81b9154f4 local_discourse/web_only "/sbin/boot" 6 minutes ago Up 6 minutes 0.0.0.0:80->80/tcp, :::80->80/tcp, 0.0.0.0:443->443/tcp, :::443->443/tcp web_only
0b49a4b64386 local_discourse/data "/sbin/boot" 19 months ago Up 22 hours data

Discourse container web_only is running

==================== PLUGINS ====================
          - git clone https://github.com/discourse/docker_manager.git
          - git clone https://github.com/discourse/discourse-akismet.git
          - git clone https://github.com/discourse/discourse-data-explorer.git
          - git clone https://github.com/camilleroux/discourse-affiliate.git
          - git clone https://github.com/somoza/discourse-xorigin.git
          - git clone https://github.com/discourse/discourse-chat-integration.git

WARNING:
You have what appear to be non-official plugins.
If you are having trouble, you should disable them and try rebuilding again.

See https://github.com/discourse/discourse/blob/main/lib/plugin/metadata.rb for the official list.

========================================
Discourse version at forum.pragmaticentrepreneurs.com: NOT FOUND
Discourse version at localhost: NOT FOUND

==================== MEMORY INFORMATION ====================
OS: Linux
RAM (MB): 2067

              total used free shared buff/cache available
Mem: 1971 988 101 178 881 627
Swap: 2047 190 1857

==================== DISK SPACE CHECK ====================
---------- OS Disk Space ----------
Filesystem Size Used Avail Use% Mounted on
/dev/vda1 49G 39G 11G 80% /

==================== DISK INFORMATION ====================
Disk /dev/loop0: 55.37 MiB, 58052608 bytes, 113384 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes

Disk /dev/loop1: 63.76 MiB, 66842624 bytes, 130552 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes

Disk /dev/loop2: 55.37 MiB, 58052608 bytes, 113384 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes

Disk /dev/loop3: 91.85 MiB, 96292864 bytes, 188072 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes

Disk /dev/loop4: 91.9 MiB, 96346112 bytes, 188176 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes

Disk /dev/loop5: 63.71 MiB, 66789376 bytes, 130448 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes

Disk /dev/loop6: 44.45 MiB, 46596096 bytes, 91008 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes

Disk /dev/loop7: 44.46 MiB, 46604288 bytes, 91024 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes

Disk /dev/vda: 50 GiB, 53687091200 bytes, 104857600 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disklabel type: gpt
Disk identifier: 603625F3-7AE2-40CB-B05E-0BD7EA2D57E4

Device Start End Sectors Size Type
/dev/vda1 227328 104857566 104630239 49.9G Linux filesystem
/dev/vda14 2048 10239 8192 4M BIOS boot
/dev/vda15 10240 227327 217088 106M Microsoft basic data

Partition table entries are not in disk order.

==================== END DISK INFORMATION ====================

==================== MAIL TEST ====================
For a robust test, get an address from http://www.mail-tester.com/
Sending mail to REDACTED . .
Testing sending to using smtp.eu.mailgun.org:587, username:*** with plain auth.
SMTP server connection successful.
Sending to . . .
Mail was not sent.

Reason: 501 Invalid command or cannot parse to address

==================== DONE! ====================

```

这些信息能提供更多线索吗？

---

<div class="post-metadata">

**Author:** ![CamilleRoux](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/camilleroux/32/119575_2.png) [@CamilleRoux](https://meta.discourse.org/u/CamilleRoux)\
**Post date:** [2025年三月27日 21:29 UTC](https://meta.discourse.org/t/site-inaccessible-after-upgrading-from-3-4-0-to-3-4-1/356185/6 "2025-03-27T21:29:16Z")

</div>

您好！有人知道该如何修复吗？非常感谢 🙏

---

<div class="post-metadata">

**Author:** ![Ed\_S](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/ed_s/32/134015_2.png) [@Ed\_S](https://meta.discourse.org/u/Ed_S)\
**Post date:** [2025年三月27日 21:57 UTC](https://meta.discourse.org/t/site-inaccessible-after-upgrading-from-3-4-0-to-3-4-1/356185/7 "2025-03-27T21:57:11Z")

</div>

> [@CamilleRoux](#):
>
> ```plaintext
> Discourse version at forum.pragmaticentrepreneurs.com: NOT FOUND
> 
> ```

对我来说是有效的。也许是因为我没有登录。所以也许你可以试试安全模式。

你的一个插件是非官方的并且非常旧，它是当前一个插件的分叉：

> [@CamilleRoux](#):
>
> ```plaintext
> - git clone https://github.com/camilleroux/discourse-affiliate.git
> 
> ```

---

<div class="post-metadata">

**Author:** ![CamilleRoux](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/camilleroux/32/119575_2.png) [@CamilleRoux](https://meta.discourse.org/u/CamilleRoux)\
**Post date:** [2025年四月6日 17:46 UTC](https://meta.discourse.org/t/site-inaccessible-after-upgrading-from-3-4-0-to-3-4-1/356185/8 "2025-04-06T17:46:01Z")

</div>

您好！感谢您的帮助。我继续进行了调查。

**背景：**

- 3.4.0 版本（`web_only` + `data` 安装）运行一切正常。
- 当我重建 `web_only` 以更新到 3.4.1 或现在的 3.4.2 时，网站变得无法访问。  
 ![Capture d’écran 2025-04-06 à 16.51.13](https://global.discourse-cdn.com/meta/original/4X/f/d/8/fd80f2a5ad847b58363f42f5c37a95e6a57ad4da.png)

**测试：**

- 当我尝试只保留必要的官方插件时，问题相同。
- 3.4.2 并没有解决问题；结果与 3.4.0 相同。
- 我无法访问安全模式，因为重建后网站无法访问。
- 当我恢复 3.4.0 的快照时，它又能正常工作了。

问题可能与 NGINX 日志中的以下内容有关：

> [@CamilleRoux](#):
>
> ```plaintext
> 2025/03/07 22:13:42 [warn] 2195#2195: duplicate extension "wasm", content type: "application/wasm", previous content type: "application/wasm" in /etc/nginx/conf.d/discourse.conf:4
> 2025/03/07 22:13:42 [emerg] 2195#2195: unknown "public" variable
> 
> ```

这似乎与 SSL 有关，但这个问题看起来不像我的：[How to solve error duplicate extension "wasm"](https://meta.discourse.org/t/how-to-solve-error-duplicate-extension-wasm/346411/)

您能看出问题出在哪里吗？

---

<div class="post-metadata">

**Author:** ![tobiaseigen](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/tobiaseigen/32/539204_2.png) [@tobiaseigen](https://meta.discourse.org/u/tobiaseigen)\
**Post date:** [2025年四月8日 15:49 UTC](https://meta.discourse.org/t/site-inaccessible-after-upgrading-from-3-4-0-to-3-4-1/356185/9 "2025-04-08T15:49:39Z")

</div>

通常，当重建出现问题时，会显示原因。请再次尝试重建，并在完成后向上滚动以查找错误消息。

如果问题仍未解决，您可以启动一个新的 VPS，恢复备份，然后重试。

如果情况紧急，您可以在 #Marketplace 发布求助信息（付费）。或者考虑 [官方 Discourse 托管](https://discourse.org/pricing)！启动试用版后，您可以恢复备份，并迅速恢复社区的运行。
