大家好,
我刚刚将我的 Discourse 实例从 3.4.0 版本升级到 3.4.1 版本(使用 ./launcher rebuild app)。升级过程很顺利——过程中没有出现任何错误,Docker 容器也在运行。但是,网站完全无法访问。
有人遇到过这个问题吗?有什么排查思路吗?我该如何提供更多信息?
提前感谢您的帮助!
大家好,
我刚刚将我的 Discourse 实例从 3.4.0 版本升级到 3.4.1 版本(使用 ./launcher rebuild app)。升级过程很顺利——过程中没有出现任何错误,Docker 容器也在运行。但是,网站完全无法访问。
有人遇到过这个问题吗?有什么排查思路吗?我该如何提供更多信息?
提前感谢您的帮助!
您好,
您是否尝试过第二次重建?
在某些情况下这可能会有所帮助。我会先尝试这个。
您也可以查看 ./launcher logs app 和 /shared/standalone/log/rails/production.log ,看看是否有有趣的内容。
我们正在试验一个人工智能响应器,它在这里提供了一些建议:
您好,看起来您的问题可以通过检查服务器日志来诊断升级后出现的问题。您可以按以下步骤进行:
在管理员界面中检查 Discourse 错误日志:
- 如果您有管理员访问权限并且网站仍然部分可访问,您可以在管理面板中查看日志。导航到
/logs以查找错误消息。检查其他服务器日志:
- 在您的服务器上运行以下命令:
cd /var/discourse ./launcher enter app cd /shared/log/rails less production.log使用
less或类似工具阅读日志并识别潜在的错误。检查 NGINX 日志:
- 您可以使用以下命令检查 NGINX 日志中的 Web 服务器错误:
cd /var/discourse ./launcher enter app cd /var/log/nginx less error.log网络和 DNS 问题:
- 运行测试以确保您的域名的 DNS 解析正确,并且端口(如 443 和 80)可访问。
请告知我们在日志中发现了什么,以便我们提供更具体的帮助来解决问题。
有用的资源:
- Discourse 日志记录指南:提供了 Discourse 中所有类型日志的详细概述。
- 访问服务器日志:一份适合初学者的访问日志指南。
其他背景信息:
如果问题仍然存在,常见原因可能包括:
- 升级后插件不兼容。
- 重建过程中内存/存储不足。
app.yml中的配置更改。
谢谢!
是的,结果一样
这是日志:
[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 日志:
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 的日志:
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! ====================
这些信息能提供更多线索吗?
您好!有人知道该如何修复吗?非常感谢 ![]()
对我来说是有效的。也许是因为我没有登录。所以也许你可以试试安全模式。
你的一个插件是非官方的并且非常旧,它是当前一个插件的分叉:
您好!感谢您的帮助。我继续进行了调查。
背景:
web_only + data 安装)运行一切正常。web_only 以更新到 3.4.1 或现在的 3.4.2 时,网站变得无法访问。测试:
问题可能与 NGINX 日志中的以下内容有关:
这似乎与 SSL 有关,但这个问题看起来不像我的:How to solve error duplicate extension "wasm"
您能看出问题出在哪里吗?
通常,当重建出现问题时,会显示原因。请再次尝试重建,并在完成后向上滚动以查找错误消息。
如果问题仍未解决,您可以启动一个新的 VPS,恢复备份,然后重试。
如果情况紧急,您可以在 Marketplace 发布求助信息(付费)。或者考虑 官方 Discourse 托管!启动试用版后,您可以恢复备份,并迅速恢复社区的运行。