Discourse 버전: v3.2.0 stable
현재 새로운 이메일 서비스 제공업체로 이전하고 있습니다. 이 전환을 완료하려면 app.yaml 파일의 SMTP 자격 증명을 업데이트해야 합니다. 자격 증명을 업데이트한 후에는 변경 사항을 적용하려면 컨테이너를 다시 빌드해야 합니다.
cd /var/discourse/
./launcher rebuild app
문제는 재빌드가 실패한다는 것입니다.
FAILED
--------------------
Pups::ExecError: cd /var/www/discourse && su discourse -c 'bundle install --jobs $(($(nproc) - 1)) --retry 3' failed with return #<Process::Status: pid 530 exit 5>
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", "hook"=>"bundle_exec", "cmd"=>["su discourse -c 'bundle install --jobs $(($(nproc) - 1)) --retry 3'"]}
bootstrap failed with exit code 5
** 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.
b0b1f4d0ed01a9bf5b9037585a4b0416b4b4efa2b8e67557ced3d7507380ad0d
root:/#
로그를 바탕으로 두 가지 잠재적인 원인을 파악했습니다.
1
2024-10-14 12:39:33.606 UTC [55] postgres@postgres ERROR: database "discourse" already exists
2024-10-14 12:39:33.606 UTC [55] postgres@postgres STATEMENT: CREATE DATABASE discourse;
createdb: error: database creation failed: ERROR: database "discourse" already exists
2024-10-14 12:39:33.728 UTC [58] postgres@discourse ERROR: role "discourse" already exists
2024-10-14 12:39:33.728 UTC [58] postgres@discourse STATEMENT: create user discourse;
ERROR: role "discourse" already exists
- 다른 스레드에서 이 오류는 무시해도 된다고 보았습니다. 실제 문제는 아닙니다.
2
I, [2024-10-14T12:41:56.391691 #1] INFO -- : > cd /var/www/discourse && su discourse -c 'bundle install --jobs $(($(nproc) - 1)) --retry 3'
google-protobuf-3.25.2-x86_64-linux requires ruby version < 3.3.dev, >= 2.7,
which is incompatible with the current version, 3.3.4
- 현재 필요한 Ruby 버전을 사용하지 않는 것으로 보입니다.
더 자세히 살펴보시려면 전체 로그를 첨부했습니다.
AWS Emails Restart Discourse VM Log 1.txt (39.8 KB)
가능한 해결책 중 하나는 최신 안정 버전으로 이전하는 것이지만, 현재로서는 이것이 실행 불가능합니다.
버전 업그레이드가 불가능한 상황에서 다른 선택지는 무엇일까요? 설정 스크립트를 업데이트하지 않고 재빌드하는 것이 가능한가요? 이것이 문제를 해결할지 확신할 수 없습니다.
SMTP 자격 증명을 환경 변수로 설정하는 것이 가능한가요?
도움을 주시면 감사하겠습니다.
감사합니다