로컬 네트워크 안에서 PostgreSQL이 실행 중인 다소 게으른 데이터베이스 서버가 하나 있습니다. 이 서버를 Discourse에도 사용하려고 했습니다. 그 이유는 웹 서버가 앞서 언급한 데이터베이스 서버보다 훨씬 더 부하가 높고, 데이터베이스 서버에는 아직 많은 미사용 리소스/여력이 있기 때문입니다. Discourse의 PostgreSQL을 재지정하는 것은 이 포럼의 몇 가지 스레드(예시)를 따라가면 꽤 쉬웠습니다. 하지만 Redis에 대해 동일한 작업을 시도할 때는 다음과 같은 문제를 겪고 있습니다:
- "templates/redis.template.yml" 주석 처리
DISCOURSE_REDIS_HOST 설정
이렇게 하면 항상 다음과 같은 오류가 발생합니다:
Pups::ExecError: cd /var/www/discourse && su discourse -c 'bundle exec rake db:migrate' failed with return #<Process::Status: pid 582 exit 1>
Location of failure: /usr/local/lib/ruby/gems/3.2.0/gems/pups-1.1.1/lib/pups/exec_command.rb:117: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
launcher rebuild app을 실행하여 재빌드하려고 할 때마다 항상 이 오류가 나옵니다.
이것은 알려진 문제인가요? 컨테이너화되지 않은 Redis를 사용하여 Discourse를 성공적으로 실행해 본 분이 계신가요?
warning " > @mixer/parallel-prettier@2.0.3" has unmet peer dependency "prettier@^2.0.0".
warning "eslint-config-discourse > eslint-plugin-lodash@7.1.0" has unmet peer dependency "lodash@>=4".
warning " > babel-plugin-debug-macros@0.4.0-pre1" has unmet peer dependency "@babel/core@^7.0.0".
warning "workspace-aggregator-3fff36d0-9fd8-4d1a-ac4c-d10694a59627 > discourse > @uppy/aws-s3@3.0.6" has incorrect peer dependency "@uppy/core@^3.1.2".
warning "workspace-aggregator-3fff36d0-9fd8-4d1a-ac4c-d10694a59627 > discourse > @uppy/aws-s3-multipart@3.1.3" has incorrect peer dependency "@uppy/core@^3.1.2".
warning "workspace-aggregator-3fff36d0-9fd8-4d1a-ac4c-d10694a59627 > discourse > @uppy/xhr-upload@3.1.1" has incorrect peer dependency "@uppy/core@^3.1.2".
하지만 컨테이너화된 Redis로 다시 빌드해도 이 경고들은 여전히 존재합니다.
FAILED
--------------------
Pups::ExecError: cd /var/www/discourse && su discourse -c 'bundle exec rake db:migrate' failed with return #<Process::Status: pid 581 exit 1>
Location of failure: /usr/local/lib/ruby/gems/3.2.0/gems/pups-1.1.1/lib/pups/exec_command.rb:117: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.
2533af220cc44d8c77bc12c17ed7635dee49ba7f280[…]
업데이트:
오류가 아니라 INFO로 표시된 줄을 발견했는데, 이것이 원인이 아닐까 싶습니다:
I, [2023-04-06T18:44:02.460059 #1] INFO -- : > cd /var/www/discourse && su discourse -c 'LOAD_PLUGINS=0 bundle exec rake plugin:pull_compatible_all'
I, [2023-04-06T18:44:04.581741 #1] INFO -- : docker_manager is already at latest compatible version
I, [2023-04-06T18:44:04.581929 #1] INFO -- : > cd /var/www/discourse && su discourse -c 'bundle exec rake db:migrate'
Discourse requires Redis 6.2.0 or up
I, [2023-04-06T18:44:05.937604 #1] INFO -- :