Discourse 업그레이드: 여러 오류 발생

현재 업그레이드를 시도하고 있습니다. 실패했고 이제 discourse에 접근할 수 없습니다.
여러 오류가 발생하고 있습니다. 모든 도움이 감사하겠습니다.

# 502 Bad Gateway
---
nginx

로그 첨부했습니다.

cap.txt (58.3 KB)

I, [2024-12-19T13:12:37.802755 #1]  INFO -- : > /usr/local/bin/create_db
createdb: error: could not connect to database template1: connection to server on socket "/var/run/postgresql/.s.PGSQL.5432" failed: No such file or directory
	Is the server running locally and accepting connections on that socket?
psql: error: connection to server on socket "/var/run/postgresql/.s.PGSQL.5432" failed: No such file or directory
	Is the server running locally and accepting connections on that socket?
psql: error: connection to server on socket "/var/run/postgresql/.s.PGSQL.5432" failed: No such file or directory
	Is the server running locally and accepting connections on that socket?
psql: error: connection to server on socket "/var/run/postgresql/.s.PGSQL.5432" failed: No such file or directory
	Is the server running locally and accepting connections on that socket?
psql: error: connection to server on socket "/var/run/postgresql/.s.PGSQL.5432" failed: No such file or directory
	Is the server running locally and accepting connections on that socket?
psql: error: connection to server on socket "/var/run/postgresql/.s.PGSQL.5432" failed: No such file or directory
	Is the server running locally and accepting connections on that socket?
psql: error: connection to server on socket "/var/run/postgresql/.s.PGSQL.5432" failed: No such file or directory
	Is the server running locally and accepting connections on that socket?
psql: error: connection to server on socket "/var/run/postgresql/.s.PGSQL.5432" failed: No such file or directory
	Is the server running locally and accepting connections on that socket?
psql: error: connection to server on socket "/var/run/postgresql/.s.PGSQL.5432" failed: No such file or directory
	Is the server running locally and accepting connections on that socket?
psql: error: connection to server on socket "/var/run/postgresql/.s.PGSQL.5432" failed: No such file or directory
	Is the server running locally and accepting connections on that socket?
psql: error: connection to server on socket "/var/run/postgresql/.s.PGSQL.5432" failed: No such file or directory
	Is the server running locally and accepting connections on that socket?
psql: error: connection to server on socket "/var/run/postgresql/.s.PGSQL.5432" failed: No such file or directory
	Is the server running locally and accepting connections on that socket?
psql: error: connection to server on socket "/var/run/postgresql/.s.PGSQL.5432" failed: No such file or directory
	Is the server running locally and accepting connections on that socket?
.
.
.
1353:C 19 Dec 2024 13:13:56.951 # oO0OoO0OoO0Oo Redis is starting oO0OoO0OoO0Oo
1353:C 19 Dec 2024 13:13:56.951 # Redis version=7.0.7, bits=64, commit=00000000, modified=0, pid=1353, just started
1353:C 19 Dec 2024 13:13:56.951 # Configuration loaded
1353:M 19 Dec 2024 13:13:56.951 * monotonic clock: POSIX clock_gettime
1353:M 19 Dec 2024 13:13:56.952 # Warning: Could not create server TCP listening socket *:6379: bind: Address already in use
1353:M 19 Dec 2024 13:13:56.952 # Failed listening on port 6379 (TCP), aborting.
.
.
.
Pups::ExecError: cd /var/www/discourse && su discourse -c 'bundle exec rake db:migrate' failed with return #<Process::Status: pid 1356 exit 1>
Location of failure: /usr/local/lib/ruby/gems/3.3.0/gems/pups-1.2.1/lib/pups/exec_command.rb:132:in `spawn'
exec failed with the params {"cd"=>"$home", "tag"=>"migrate", "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.
d7e3c61c9189308cfa984b4f73baf5bece2cdb0ce5ff4034396a0440ae3d7594

이것이 표준 설치인가요? app.yml 파일 하나만 있는 건가요 (별도의 web_only와 data 컨테이너는 없나요)?

어떤 이유로든 데이터베이스에 연결할 수 없습니다.

표준 설치. app.yml 파일 하나만 있습니다.

Docker를 업그레이드해 보세요. 다음 명령어의 결과는 무엇인가요?

 docker --version

Discourse가 먼저 Docker 업그레이드를 하라고 했습니다. 그렇게 했습니다.
서버를 다시 운영 환경으로 돌리기 위해 되돌려야 했기 때문에, 지금은 버전을 확인할 수 없습니다. 모든 변경 사항이 원복되었습니다.

그렇다면 디버깅할 방법이 없습니다.

제가 추천하는 방법은 새로운 VM을 생성하고 거기서 Discourse를 설치한 후 백업을 복원하는 것입니다. 정상적으로 작동하면 기존 사이트를 읽기 전용 모드로 전환하고, 백업 후 복원하며, DNS를 전환합니다(접근 권한이 있다면 정적 IP를 사용해도 됩니다).

Move a Discourse site to another VPS with rsync를 사용하면 새 사이트에 유효한 인증서가 적용되며, 로컬 DNS를 새 IP 주소로 변경하여 미리 확인해 볼 수 있습니다.