3.4.0에서 3.4.1로 업그레이드 후 사이트 접근 불가

여러분 안녕하세요,

./launcher rebuild app 명령을 사용하여 Discourse 인스턴스를 3.4.0 버전에서 3.4.1 버전으로 업그레이드했습니다. 업데이트 과정은 순조롭게 진행되어 오류가 없었으며, Docker 컨테이너도 실행 중입니다. 그러나 사이트에는 전혀 접근할 수 없는 상태입니다.

혹시 이 문제를 경험해 보신 분 계신가요? 문제를 해결하기 위한 아이디어가 있으신가요? 어떤 정보를 추가로 제공하면 될까요?

도움 주시면 감사하겠습니다!

안녕하세요,

두 번째로 재빌드를 시도해 보셨나요?
그것이 도움이 되는 상황이 있습니다. 먼저 그 방법을 시도해 보시는 것이 좋습니다.

관심 있는 내용이 보인다면 ./launcher logs app와 /shared/standalone/log/rails/production.log를 확인해 보실 수도 있습니다.

AI 응답기를 실험 중인데, 여기로 속삭임을 보내주더라고요. 이번에는 꽤 합리적인 조언을 주었습니다:

안녕하세요, 업그레이드 후 무엇이 잘못되었는지 진단하기 위해 서버 로그를 조사하면 문제가 해결될 수 있을 것 같습니다. 다음 방법으로 진행해 보세요:

  1. 관리자 UI에서 Discourse 오류 로그 확인:

    • 관리자 권한이 있고 사이트가 일부 접근 가능한 상태라면, 관리자 패널에서 로그를 확인할 수 있습니다. /logs 경로로 이동하여 오류 메시지를 찾으세요.
  2. 다른 서버 로그 점검:

    • 서버에서 다음 명령어를 실행하세요:
      cd /var/discourse
      ./launcher enter app
      cd /shared/log/rails
      less production.log
      
      less 또는 유사한 도구를 사용하여 로그를 읽고 잠재적인 오류를 식별하세요.
  3. NGINX 로그 확인:

    • 다음 명령어로 웹 서버 오류에 대한 NGINX 로그를 확인할 수 있습니다:
      cd /var/discourse
      ./launcher enter app
      cd /var/log/nginx
      less error.log
      
  4. 네트워크 및 DNS 문제:

    • 도메인의 DNS가 올바르게 해석되고 443 및 80 포트에 접근할 수 있는지 확인하기 위해 테스트를 실행하세요.

로그에서 발견한 내용을 알려주시면, 문제를 해결하는 데 도움이 될 더 구체적인 정보를 제공할 수 있습니다.

도움이 되는 자료:

추가 배경 정보:
문제가 지속되면 일반적인 원인은 다음과 같을 수 있습니다:

  • 업그레이드 후 플러그인 호환성 문제.
  • 재빌드过程中的 메모리/저장 공간 부족.
  • 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! ====================

이것으로 더 많은 정보를 얻을 수 있을까요?

안녕하세요! 이 문제를 어떻게 수정할 수 있는지 아는 분 계신가요? 정말 감사합니다 :folded_hands:

저에게는 정상적으로 작동합니다. 로그인되어 있지 않아서 그런 것일 수도 있습니다. 따라서 안전 모드(safe mode)를 시도해 보시는 것이 좋겠습니다.

사용 중인 플러그인 중 하나가 비공식이고 매우 오래된 버전입니다. 이 플러그인은 더 최신인 다른 플러그인의 포크(fork)입니다:

안녕하세요! 도움을 주셔서 감사합니다. 계속 조사해 보았습니다.

맥락:

테스트:

  • 필수적이고 공식적인 플러그인만 유지하도록 시도해도 동일한 문제가 발생합니다.
  • 3.4.2는 문제를 해결하지 못하며, 3.4.0과 동일한 결과가 나타납니다.
  • 재빌드 후 웹사이트가 접근할 수 없기 때문에 안전 모드(Safe mode)에 접근할 수 없습니다.
  • 3.4.0 스냅샷을 복원하면 다시 정상 작동합니다.

문제는 아마도 제 NGINX 로그에 다음과 같은 내용이 기록되어 있기 때문일 것입니다:

SSL과 관련이 있는 것으로 보이지만, 이 문제는 제 경우와 같아 보이지 않습니다: How to solve error duplicate extension "wasm"

문제의 원인이 어디인지 확인하시나요?

보통 재구축(rebuild) 중 문제가 발생하면 원인이 표시됩니다. 재구축을 다시 시도한 후 완료되면 위로 스크롤하여 오류 메시지를 찾아보세요.

여전히 문제가 해결되지 않으면, 새로운 VPS를 시작하여 백업을 복원하고 다시 시도해 볼 수 있습니다.

급한 경우라면 Marketplace 채널에 게시글을 올려 유료 도움을 요청할 수도 있습니다. 또는 공식 Discourse 호스팅을 고려해 보세요. 트라이얼을 시작하면 백업을 복원하여 커뮤니티를 바로 다시 가동할 수 있습니다.