502 Bad Gateway

모두 좋은 아침입니다!

약 일주일 전쯤 제 Discourse 설치 환경이 업데이트되었을 수 있습니다. 100% 확신은 없지만, 제가 아는 한 사이트를 방문할 때마다 nginx에서 502 오류가 발생했습니다.

이것은 전형적인 Docker 설치 환경이었습니다.

이후 "./launcher rebuild app"을 실행해 보았지만 오류가 발생했습니다.

그리고 "./discourse-setup"을 실행해 보았지만 이것도 오류가 발생했습니다.

저는 전문가가 아니고 Discourse를 막 시작한 초보자가 필요한 경우 재빌드 결과를 여기에 게시할 수 있습니다.

약 일주일 동안 여기저기 검색하고 해결책을 찾아보았지만, 결국 VPS에서 완전히 새로 설치하는 것이 나을 것 같습니다. 다만, 사용자 계정과 데이터베이스를 백업하고 복원하는 방법에 대해서는 잘 모르겠습니다.

어떤 조언이든 감사하겠습니다!
시간 내어 주셔서 감사합니다!

안녕하세요, @stokedcrf 님을 환영합니다 :slight_smile:

재구축(rebuild) 로그를 공유해 주시면 문제를 정확히 파악할 수 있을지도 모릅니다. :crossed_fingers:

지연으로 인해 죄송합니다.

리빌드 로그가 꽤 긴 것 같지만, 실패하는 시점은 대략 다음과 같습니다:

Tasks: TOP => db:migrate => db:load_config => environment
(See full trace by running task with --trace)
I, [2024-01-29T18:40:10.599024 #1]  INFO -- :
I, [2024-01-29T18:40:10.627958 #1]  INFO -- : Terminating async processes
I, [2024-01-29T18:40:10.629723 #1]  INFO -- : Sending INT to HOME=/var/lib/postgresql USER=postgres exec chpst -u postgres:postgres:ssl-cert -U postgres:postgres:ssl-cert /usr/lib/postgresql/13/bin/postmaster -D /etc/postgresql/13/main pid: 42
2024-01-29 18:40:10.630 UTC [42] LOG:  received fast shutdown request
2024-01-29 18:40:10.644 UTC [42] LOG:  aborting any active transactions
2024-01-29 18:40:10.651 UTC [42] LOG:  background worker "logical replication launcher" (PID 51) exited with exit code 1
2024-01-29 18:40:10.654 UTC [46] LOG:  shutting down
2024-01-29 18:40:10.811 UTC [42] LOG:  database system is shut down


FAILED
--------------------
Pups::ExecError: cd /var/www/discourse && su discourse -c 'bundle exec rake db:migrate' failed with return #<Process::Status: pid 3290 exit 1>
Location of failure: /usr/local/lib/ruby/gems/3.2.0/gems/pups-1.2.1/lib/pups/exec_command.rb:132:in `spawn'
exec failed with the params {"cd"=>"$home", "hook"=>"db_migrate", "cmd"=>["su discourse -c 'bundle exec rake db:migrate'"]}
bootstrap failed with exit code 1
** FAILED TO BOOTSTRAP ** please scroll up and look for earlier error messages, there may be more than one.
./discourse-doctor may help diagnose the problem.
963d90233930c09a993e084bf1e858d7486ddb797bd5743e6073f4563db0777a

로그에 나와 있는 대로 다음을 수행해 주세요:

여러분의 팁에 감사드립니다.
결국 새 설치를 진행한 뒤 백업 디렉터리에서 백업 파일을 복원했습니다. 이제 모두 잘 작동합니다! :slight_smile: