웹 UI를 통해 업그레이드하는 과정에서 다음 오류가 발생했습니다:
INFO -- : > cd /var/www/discourse && su discourse -c 'bundle exec rake db:migrate'
discourse@discourse ERROR: permission denied to create extension "unaccent"
discourse@discourse HINT: Must be superuser to create this extension.
discourse@discourse STATEMENT: CREATE EXTENSION IF NOT EXISTS unaccent
rake aborted!
PG::InsufficientPrivilege: ERROR: permission denied to create extension "unaccent"
HINT: Must be superuser to create this extension.
오래전에 app.yml 파일을 수정했는데, 이것이 문제를 일으키고 있을 수 있습니다:
templates:
# commented out to ix disk space issue
#- "templates/postgres.template.yml"
- "templates/postgres.10.template.yml"
이 변경 사항을 아주 오래전에 했기 때문에, 해당 주석 외에 당시 상황에 대해 기억이 나지 않습니다.
그 부분은 그대로 두었고, 업데이트 오류가 발생하기 전의 discourse 버전으로 되돌리기 위해 app.yml의 버전을 v2.8.0beta8으로 수정하여 시도해 보았지만, 다음과 같이 실패했습니다.
Pups::ExecError: cd /var/www/discourse && git checkout v2.8.0.beta8 failed with return #<Process::Status: pid 1843 exit 1>
Location of failure: /usr/local/lib/ruby/gems/2.7.0/gems/pups-1.1.1/lib/pups/exec_command.rb:117:in `spawn'
exec failed with the params {"cd"=>"$home", "hook"=>"code", "cmd"=>["git reset --hard", "git clean -f", "git remote set-branches --add origin main", "git remote set-branches origin $version", "git fetch --depth 1 origin $version", "git checkout $version", "mkdir -p tmp", "chown discourse:www-data tmp", "mkdir -p tmp/pids", "mkdir -p tmp/sockets", "touch tmp/.gitkeep", "mkdir -p /shared/log/rails", "bash -c \"touch -a /shared/log/rails/{production,production_errors,unicorn.stdout,unicorn.stderr,sidekiq}.log\"", "bash -c \"ln -s /shared/log/rails/{production,production_errors,unicorn.stdout,unicorn.stderr,sidekiq}.log $home/log\"", "bash -c \"mkdir -p /shared/{uploads,backups}\"", "bash -c \"ln -s /shared/{uploads,backups} $home/public\"", "bash -c \"mkdir -p /shared/tmp/{backups,restores}\"", "bash -c \"ln -s /shared/tmp/{backups,restores} $home/tmp\"", "chown -R discourse:www-data /shared/log/rails /shared/uploads /shared/backups /shared/tmp", "find public/plugins/ -maxdepth 1 -xtype l -delete"]}
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.
5b66f706de1a3ce8d78f0ed886669095c1a356efd916cb2ae8b02171367b0a01
따라서 postgres를 10에서 업그레이드하거나, discourse를 2.8.0beta8으로 다운그레이드해야 하는 것 같은데, 두 가지 모두 실패합니다. 어떻게 해야 할까요?