マイグレーション失敗: "user_required_fields_versions" という名前のリレーションは既に存在します

こんにちは、誰か手伝ってくれませんか?

管理ダッシュボードからサイトをアップデートしたところ、エラー 500 が発生しました。
その後、このトピック Manually update Discourse and Docker image to latest に記載されている手順に従い、コンソールからアプリを手動でアップデート・再構築しました。

しかし、現在では「サイトに接続できません」という表示になっています(以下にコードを記載)。

6a2d56837370: Pull complete 
933885f686e0: Pull complete 
aecf6df6a6bb: Pull complete 
33fcdcfe61e2: Pull complete 
12726a4d34c8: Pull complete 
Digest: sha256:6de68cb49198b5281f79ed9401b3fe818c854d220dcf0238549fe2f2adb19146
Status: Downloaded newer image for discourse/base:2.0.20240825-0027
docker.io/discourse/base:2.0.20240825-0027
Ensuring launcher is up to date
Fetching origin
Launcher is up-to-date
Stopping old container
+ /usr/bin/docker stop -t 600 app
app
2.0.20240825-0027: Pulling from discourse/base
Digest: sha256:6de68cb49198b5281f79ed9401b3fe818c854d220dcf0238549fe2f2adb19146
Status: Image is up to date for discourse/base:2.0.20240825-0027
docker.io/discourse/base:2.0.20240825-0027
/usr/local/lib/ruby/gems/3.3.0/gems/pups-1.2.1/lib/pups.rb
/usr/local/bin/pups --stdin
I, [2024-09-06T21:09:11.924233 #1]  INFO -- : Reading from stdin
I, [2024-09-06T21:09:11.948135 #1]  INFO -- : File > /etc/service/postgres/run  chmod: +x  chown: 
I, [2024-09-06T21:09:11.954933 #1]  INFO -- : File > /etc/service/postgres/log/run  chmod: +x  chown: 
I, [2024-09-06T21:09:11.962398 #1]  INFO -- : File > /etc/runit/3.d/99-postgres  chmod: +x  chown: 
I, [2024-09-06T21:09:11.970316 #1]  INFO -- : File > /root/install_postgres  chmod: +x  chown: 
I, [2024-09-06T21:09:11.977886 #1]  INFO -- : File > /root/upgrade_postgres  chmod: +x  chown: 
I, [2024-09-06T21:09:11.978953 #1]  INFO -- : Replacing data_directory = '/var/lib/postgresql/13/main' with data_directory = '/shared/postgres_data' in /etc/postgresql/13/main/postgresql.conf
I, [2024-09-06T21:09:11.979881 #1]  INFO -- : Replacing (?-mix:#?listen_addresses *=.*) with listen_addresses = '*' in /etc/postgresql/13/main/postgresql.conf
I, [2024-09-06T21:09:11.980742 #1]  INFO -- : Replacing (?-mix:#?synchronous_commit *=.*) with synchronous_commit = $db_synchronous_commit in /etc/postgresql/13/main/postgresql.conf
I, [2024-09-06T21:09:11.981529 #1]  INFO -- : Replacing (?-mix:#?shared_buffers *=.*) with shared_buffers = $db_shared_buffers in /etc/postgresql/13/main/postgresql.conf
I, [2024-09-06T21:09:11.982197 #1]  INFO -- : Replacing (?-mix:#?work_mem *=.*) with work_mem = $db_work_mem in /etc/postgresql/13/main/postgresql.conf
I, [2024-09-06T21:09:11.982796 #1]  INFO -- : Replacing (?-mix:#?default_text_search_config *=.*) with default_text_search_config = '$db_default_text_search_config' in /etc/postgresql/13/main/postgresql.conf
I, [2024-09-06T21:09:11.983436 #1]  INFO -- : Replacing (?-mix:#?checkpoint_segments *=.*) with checkpoint_segments = $db_checkpoint_segments in /etc/postgresql/13/main/postgresql.conf
I, [2024-09-06T21:09:11.984111 #1]  INFO -- : Replacing (?-mix:#?logging_collector *=.*) with logging_collector = $db_logging_collector in /etc/postgresql/13/main/postgresql.conf
I, [2024-09-06T21:09:11.989137 #1]  INFO -- : Replacing (?-mix:#?log_min_duration_statement *=.*) with log_min_duration_statement = $db_log_min_duration_statement in /etc/postgresql/13/main/postgresql.conf
I, [2024-09-06T21:09:11.990088 #1]  INFO -- : Replacing (?-mix:^#local +replication +postgres +peer$) with local replication postgres  peer in /etc/postgresql/13/main/pg_hba.conf
I, [2024-09-06T21:09:11.990775 #1]  INFO -- : Replacing (?-mix:^host.*all.*all.*127.*$) with host all all 0.0.0.0/0 md5 in /etc/postgresql/13/main/pg_hba.conf
I, [2024-09-06T21:09:11.991225 #1]  INFO -- : Replacing (?-mix:^host.*all.*all.*::1\/128.*$) with host all all ::/0 md5 in /etc/postgresql/13/main/pg_hba.conf
I, [2024-09-06T21:09:11.991785 #1]  INFO -- : > if [ -f /root/install_postgres ]; then
  /root/install_postgres && rm -f /root/install_postgres
elif [ -e /shared/postgres_run/.s.PGSQL.5432 ]; then
  socat /dev/null UNIX-CONNECT:/shared/postgres_run/.s.PGSQL.5432 || exit 0 && echo postgres already running stop container ; exit 1
fi

I, [2024-09-06T21:09:14.358212 #1]  INFO -- : Generating locales (this might take a while)...
Generation complete.

I, [2024-09-06T21:09:14.358757 #1]  INFO -- : > 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
I, [2024-09-06T21:09:14.368506 #1]  INFO -- : File > /usr/local/bin/create_db  chmod: +x  chown: 
I, [2024-09-06T21:09:14.379487 #1]  INFO -- : File > /var/lib/postgresql/take-database-backup  chmod: +x  chown: postgres:postgres
I, [2024-09-06T21:09:14.383790 #1]  INFO -- : File > /var/spool/cron/crontabs/postgres  chmod:   chown: 
I, [2024-09-06T21:09:14.384318 #1]  INFO -- : > sleep 5
2024-09-06 21:09:14.499 UTC [36] LOG:  starting PostgreSQL 13.16 (Debian 13.16-1.pgdg120+1) on x86_64-pc-linux-gnu, compiled by gcc (Debian 12.2.0-14) 12.2.0, 64-bit
2024-09-06 21:09:14.501 UTC [36] LOG:  listening on IPv4 address "0.0.0.0", port 5432
2024-09-06 21:09:14.501 UTC [36] LOG:  listening on IPv6 address "::", port 5432
2024-09-06 21:09:14.507 UTC [36] LOG:  listening on Unix socket "/var/run/postgresql/.s.PGSQL.5432"
2024-09-06 21:09:14.520 UTC [45] LOG:  database system was shut down at 2024-09-06 21:09:02 UTC
2024-09-06 21:09:14.536 UTC [36] LOG:  database system is ready to accept connections
I, [2024-09-06T21:09:19.389587 #1]  INFO -- : 
I, [2024-09-06T21:09:19.390196 #1]  INFO -- : > /usr/local/bin/create_db
2024-09-06 21:09:19.488 UTC [55] postgres@postgres ERROR:  database "discourse" already exists
2024-09-06 21:09:19.488 UTC [55] postgres@postgres STATEMENT:  CREATE DATABASE discourse;
createdb: error: database creation failed: ERROR:  database "discourse" already exists
2024-09-06 21:09:19.562 UTC [58] postgres@discourse ERROR:  role "discourse" already exists
2024-09-06 21:09:19.562 UTC [58] postgres@discourse STATEMENT:  create user discourse;
ERROR:  role "discourse" already exists
NOTICE:  extension "hstore" already exists, skipping
NOTICE:  extension "pg_trgm" already exists, skipping
NOTICE:  extension "vector" already exists, skipping
NOTICE:  extension "hstore" already exists, skipping
NOTICE:  extension "pg_trgm" already exists, skipping
NOTICE:  extension "vector" already exists, skipping
I, [2024-09-06T21:09:20.325777 #1]  INFO -- : GRANT
ALTER SCHEMA
CREATE EXTENSION
CREATE EXTENSION
CREATE EXTENSION
ALTER EXTENSION
CREATE EXTENSION
CREATE EXTENSION
CREATE EXTENSION
ALTER EXTENSION
UPDATE 0

I, [2024-09-06T21:09:20.326007 #1]  INFO -- : > echo postgres installed!
I, [2024-09-06T21:09:20.330120 #1]  INFO -- : postgres installed!

I, [2024-09-06T21:09:20.337776 #1]  INFO -- : File > /etc/service/redis/run  chmod: +x  chown: 
I, [2024-09-06T21:09:20.344536 #1]  INFO -- : File > /etc/service/redis/log/run  chmod: +x  chown: 
I, [2024-09-06T21:09:20.351809 #1]  INFO -- : File > /etc/runit/3.d/10-redis  chmod: +x  chown: 
I, [2024-09-06T21:09:20.352682 #1]  INFO -- : Replacing daemonize yes with  in /etc/redis/redis.conf
I, [2024-09-06T21:09:20.353953 #1]  INFO -- : Replacing (?-mix:^pidfile.*$) with  in /etc/redis/redis.conf
I, [2024-09-06T21:09:20.355364 #1]  INFO -- : > install -d -m 0755 -o redis -g redis /shared/redis_data
I, [2024-09-06T21:09:20.362199 #1]  INFO -- : 
I, [2024-09-06T21:09:20.363404 #1]  INFO -- : Replacing (?-mix:^logfile.*$) with logfile "" in /etc/redis/redis.conf
I, [2024-09-06T21:09:20.364252 #1]  INFO -- : Replacing (?-mix:^bind .*$) with  in /etc/redis/redis.conf
I, [2024-09-06T21:09:20.365811 #1]  INFO -- : Replacing (?-mix:^dir .*$) with dir /shared/redis_data in /etc/redis/redis.conf
I, [2024-09-06T21:09:20.366936 #1]  INFO -- : Replacing (?-mix:^protected-mode yes) with protected-mode no in /etc/redis/redis.conf
I, [2024-09-06T21:09:20.368067 #1]  INFO -- : Replacing # io-threads 4 with io-threads $redis_io_threads in /etc/redis/redis.conf
I, [2024-09-06T21:09:20.369481 #1]  INFO -- : > echo redis installed
I, [2024-09-06T21:09:20.372856 #1]  INFO -- : redis installed

I, [2024-09-06T21:09:20.373572 #1]  INFO -- : > cat /etc/redis/redis.conf | grep logfile
I, [2024-09-06T21:09:20.379893 #1]  INFO -- : logfile ""

I, [2024-09-06T21:09:20.380212 #1]  INFO -- : > exec chpst -u redis -U redis /usr/bin/redis-server /etc/redis/redis.conf
I, [2024-09-06T21:09:20.382757 #1]  INFO -- : > sleep 10
104:C 06 Sep 2024 21:09:20.400 # oO0OoO0OoO0Oo Redis is starting oO0OoO0OoO0Oo
104:C 06 Sep 2024 21:09:20.401 # Redis version=7.0.7, bits=64, commit=00000000, modified=0, pid=104, just started
104:C 06 Sep 2024 21:09:20.401 # Configuration loaded
104:M 06 Sep 2024 21:09:20.402 * monotonic clock: POSIX clock_gettime
104:M 06 Sep 2024 21:09:20.404 * Running mode=standalone, port=6379.
104:M 06 Sep 2024 21:09:20.404 # Server initialized
104:M 06 Sep 2024 21:09:20.405 # WARNING Memory overcommit must be enabled! Without it, a background save or replication may fail under low memory condition. Being disabled, it can can also cause failures without low memory condition, see https://github.com/jemalloc/jemalloc/issues/1328. To fix this issue add 'vm.overcommit_memory = 1' to /etc/sysctl.conf and then reboot or run the command 'sysctl vm.overcommit_memory=1' for this to take effect.
104:M 06 Sep 2024 21:09:20.406 * Loading RDB produced by version 7.0.7
104:M 06 Sep 2024 21:09:20.406 * RDB age 19 seconds
104:M 06 Sep 2024 21:09:20.406 * RDB memory usage when created 16.25 Mb
104:M 06 Sep 2024 21:09:20.464 * Done loading RDB, keys loaded: 3363, keys expired: 2.
104:M 06 Sep 2024 21:09:20.465 * DB loaded from disk: 0.059 seconds
104:M 06 Sep 2024 21:09:20.465 * Ready to accept connections
I, [2024-09-06T21:09:30.386531 #1]  INFO -- : 
I, [2024-09-06T21:09:30.387145 #1]  INFO -- : > thpoff echo "thpoff is installed!"
I, [2024-09-06T21:09:30.392326 #1]  INFO -- : thpoff is installed!

I, [2024-09-06T21:09:30.392856 #1]  INFO -- : > /usr/local/bin/ruby -e 'if ENV["DISCOURSE_SMTP_ADDRESS"] == "smtp.example.com"; puts "Aborting! Mail is not configured!"; exit 1; end'
I, [2024-09-06T21:09:30.507128 #1]  INFO -- : 
I, [2024-09-06T21:09:30.507386 #1]  INFO -- : > /usr/local/bin/ruby -e 'if ENV["DISCOURSE_HOSTNAME"] == "discourse.example.com"; puts "Aborting! Domain is not configured!"; exit 1; end'
I, [2024-09-06T21:09:30.595075 #1]  INFO -- : 
I, [2024-09-06T21:09:30.595318 #1]  INFO -- : > /usr/local/bin/ruby -e 'if (ENV["DISCOURSE_CDN_URL"] || "")[0..1] == "//"; puts "Aborting! CDN must have a protocol specified. Once fixed you should rebake your posts now to correct all posts."; exit 1; end'
I, [2024-09-06T21:09:30.680859 #1]  INFO -- : 
I, [2024-09-06T21:09:30.681407 #1]  INFO -- : > rm -f /etc/cron.d/anacron
I, [2024-09-06T21:09:30.684425 #1]  INFO -- : 
I, [2024-09-06T21:09:30.687845 #1]  INFO -- : File > /etc/cron.d/anacron  chmod:   chown: 
I, [2024-09-06T21:09:30.693618 #1]  INFO -- : File > /etc/runit/1.d/copy-env  chmod: +x  chown: 
I, [2024-09-06T21:09:30.699134 #1]  INFO -- : File > /etc/service/unicorn/run  chmod: +x  chown: 
I, [2024-09-06T21:09:30.704312 #1]  INFO -- : File > /etc/service/nginx/run  chmod: +x  chown: 
I, [2024-09-06T21:09:30.709358 #1]  INFO -- : File > /etc/runit/3.d/01-nginx  chmod: +x  chown: 
I, [2024-09-06T21:09:30.713986 #1]  INFO -- : File > /etc/runit/3.d/02-unicorn  chmod: +x  chown: 
I, [2024-09-06T21:09:30.714205 #1]  INFO -- : Replacing # postgres with if [ -f /root/install_postgres ]; then
  /root/install_postgres
  rm /root/install_postgres
fi
sv start postgres || exit 1
 in /etc/service/unicorn/run
I, [2024-09-06T21:09:30.715803 #1]  INFO -- : > cd /var/www/discourse && sudo -H -E -u discourse git reset --hard
Updating files: 100% (34680/34680), done.
I, [2024-09-06T21:09:34.830734 #1]  INFO -- : HEAD is now at 274e18622 FIX: Video uploads sometimes hang indefinitely (#28523)

I, [2024-09-06T21:09:34.831387 #1]  INFO -- : > cd /var/www/discourse && sudo -H -E -u discourse git clean -f
I, [2024-09-06T21:09:35.010034 #1]  INFO -- : 
I, [2024-09-06T21:09:35.010752 #1]  INFO -- : > cd /var/www/discourse && sudo -H -E -u discourse bash -c '
  set -o errexit
  if [ $(git rev-parse --is-shallow-repository) == "true" ]; then
      git remote set-branches --add origin main
      git remote set-branches origin tests-passed
      git fetch --depth 1 origin tests-passed
  else
      git fetch --tags --prune-tags --prune --force origin
  fi
'
From https://github.com/discourse/discourse
 - [deleted]             (none)     -> origin/0-a-gjs-ace
 - [deleted]             (none)     -> origin/better-respect-End-key-in-topics
 - [deleted]             (none)     -> origin/category-experts-approved-webhook-event
 - [deleted]             (none)     -> origin/chat-sound-respects-indicator-pref
 - [deleted]             (none)     -> origin/dependabot/bundler/omniauth-google-oauth2-1.1.2
 - [deleted]             (none)     -> origin/dependabot/bundler/sass-embedded-1.77.8
 - [deleted]             (none)     -> origin/dependabot/bundler/sassc-embedded-1.77.8
 - [deleted]             (none)     -> origin/dependabot/npm_and_yarn/ember-cli-deprecation-workflow-3.0.2
 - [deleted]             (none)     -> origin/dependabot/npm_and_yarn/ember/test-helpers-4.0.1
 - [deleted]             (none)     -> origin/dependabot/npm_and_yarn/eslint-9.7.0
 - [deleted]             (none)     -> origin/dependabot/npm_and_yarn/sass-1.77.8
 - [deleted]             (none)     -> origin/detect-default-readonly
 - [deleted]             (none)     -> origin/dev/remove-header-widgets
 - [deleted]             (none)     -> origin/feature/site-text-result-selected-lang
 - [deleted]             (none)     -> origin/fix/add-user-to-user-directory-when-activated
 - [deleted]             (none)     -> origin/issue/fix-bookmark-clearing-reminder
 - [deleted]             (none)     -> origin/native-class-components-2
 - [deleted]             (none)     -> origin/native-class-components-3
 - [deleted]             (none)     -> origin/notifications_id_bigint
 - [deleted]             (none)     -> origin/prevent-desktop-notifications-on-mobile
 - [deleted]             (none)     -> origin/ux/admin-plugins-ui-guidelines
   274e18622..deb751dfe  main                    -> origin/main
 * [new branch]          0-a-testem              -> origin/0-a-testem
 * [new branch]          add-about-config-description -> origin/add-about-config-description
 * [new branch]          add-tag-group-log       -> origin/add-tag-group-log
 * [new branch]          burning-uppy-mixins     -> origin/burning-uppy-mixins
 * [new branch]          change-text-for-approved-post-webhook-event -> origin/change-text-for-approved-post-webhook-event
   7f254be61..488081d93  coco/generic-importer   -> origin/coco/generic-importer
 * [new branch]          dependabot/bundler/omniauth-google-oauth2-1.1.3 -> origin/dependabot/bundler/omniauth-google-oauth2-1.1.3
 * [new branch]          dependabot/bundler/sass-embedded-1.78.0 -> origin/dependabot/bundler/sass-embedded-1.78.0
 * [new branch]          dependabot/bundler/sassc-embedded-1.78.0 -> origin/dependabot/bundler/sassc-embedded-1.78.0
 * [new branch]          dependabot/bundler/test-prof-1.4.2 -> origin/dependabot/bundler/test-prof-1.4.2
 * [new branch]          dependabot/npm_and_yarn/sass-1.78.0 -> origin/dependabot/npm_and_yarn/sass-1.78.0
 * [new branch]          dev-faster-tests        -> origin/dev-faster-tests
 * [new branch]          dev-migrate-user-password -> origin/dev-migrate-user-password
 * [new branch]          dev/add-outlet-to-categories-only -> origin/dev/add-outlet-to-categories-only
 * [new branch]          dev/bulk-import-chats   -> origin/dev/bulk-import-chats
 * [new branch]          dev/clear-trackers-for-uninstalled-checks -> origin/dev/clear-trackers-for-uninstalled-checks
 * [new branch]          dev/glimmer-post-menu   -> origin/dev/glimmer-post-menu
 * [new branch]          dev/port-outlet-wrapper-to-stable -> origin/dev/port-outlet-wrapper-to-stable
 * [new branch]          dev/remove-deprecated-respect-plugin-positional-argument -> origin/dev/remove-deprecated-respect-plugin-positional-argument
 * [new branch]          drop-old-notification-id-columns -> origin/drop-old-notification-id-columns
 * [new branch]          ember-native-class      -> origin/ember-native-class
 * [new branch]          feature/add-user-to-topic_tags_changed-event -> origin/feature/add-user-to-topic_tags_changed-event
 * [new branch]          fontawesome-6-framework -> origin/fontawesome-6-framework
 * [new branch]          fontawesome-6-upgrade   -> origin/fontawesome-6-upgrade
 * [new branch]          full-width-login-modal-mobile -> origin/full-width-login-modal-mobile
 * [new branch]          getting-started-fixes   -> origin/getting-started-fixes
 * [new branch]          glint                   -> origin/glint
 * [new branch]          issue/hide-historical-bpv-data -> origin/issue/hide-historical-bpv-data
 * [new branch]          loic-refactor-services  -> origin/loic-refactor-services
 + a25ac32bc...97bd38cf4 mt/converter            -> origin/mt/converter  (forced update)
 * [new branch]          revert-28587-revert-28321-dev/remove-create_post_for_category_and_tag_changes-setting -> origin/revert-28587-revert-28321-dev/remove-create_post_for_category_and_tag_changes-setting
   d3ad2ecda..381cf8548  stable                  -> origin/stable
   274e18622..deb751dfe  tests-passed            -> origin/tests-passed
 * [new branch]          ux-1pw-ignore           -> origin/ux-1pw-ignore
 * [new branch]          ux/convert-chat-plugin-ui -> origin/ux/convert-chat-plugin-ui
 * [new branch]          ux/getting-started-link-fix -> origin/ux/getting-started-link-fix
 t [tag update]          beta                    -> beta
 t [tag update]          latest-release          -> latest-release
 * [new tag]             v3.3.1                  -> v3.3.1
 * [new tag]             v3.4.0.beta1            -> v3.4.0.beta1
I, [2024-09-06T21:09:35.920328 #1]  INFO -- : 
I, [2024-09-06T21:09:35.920932 #1]  INFO -- : > cd /var/www/discourse && sudo -H -E -u discourse bash -c '
  set -o errexit
  if [[ $(git symbolic-ref --short HEAD) == tests-passed ]] ; then
      git pull
  else
      git -c advice.detachedHead=false checkout tests-passed
  fi
'
Switched to a new branch 'tests-passed'
I, [2024-09-06T21:09:40.293928 #1]  INFO -- : branch 'tests-passed' set up to track 'origin/tests-passed'.

I, [2024-09-06T21:09:40.294182 #1]  INFO -- : > cd /var/www/discourse && sudo -H -E -u discourse git config user.discourse-version tests-passed
I, [2024-09-06T21:09:40.307374 #1]  INFO -- : 
I, [2024-09-06T21:09:40.307665 #1]  INFO -- : > cd /var/www/discourse && mkdir -p tmp
I, [2024-09-06T21:09:40.313403 #1]  INFO -- : 
I, [2024-09-06T21:09:40.313653 #1]  INFO -- : > cd /var/www/discourse && chown discourse:www-data tmp
I, [2024-09-06T21:09:40.317917 #1]  INFO -- : 
I, [2024-09-06T21:09:40.318150 #1]  INFO -- : > cd /var/www/discourse && mkdir -p tmp/pids
I, [2024-09-06T21:09:40.323052 #1]  INFO -- : 
I, [2024-09-06T21:09:40.323368 #1]  INFO -- : > cd /var/www/discourse && mkdir -p tmp/sockets
I, [2024-09-06T21:09:40.328389 #1]  INFO -- : 
I, [2024-09-06T21:09:40.328931 #1]  INFO -- : > cd /var/www/discourse && touch tmp/.gitkeep
I, [2024-09-06T21:09:40.333819 #1]  INFO -- : 
I, [2024-09-06T21:09:40.334031 #1]  INFO -- : > cd /var/www/discourse && mkdir -p                    /shared/log/rails
I, [2024-09-06T21:09:40.338273 #1]  INFO -- : 
I, [2024-09-06T21:09:40.338499 #1]  INFO -- : > cd /var/www/discourse && bash -c "touch -a           /shared/log/rails/{production,production_errors,unicorn.stdout,unicorn.stderr,sidekiq}.log"
I, [2024-09-06T21:09:40.344500 #1]  INFO -- : 
I, [2024-09-06T21:09:40.345175 #1]  INFO -- : > cd /var/www/discourse && bash -c "ln    -s           /shared/log/rails/{production,production_errors,unicorn.stdout,unicorn.stderr,sidekiq}.log /var/www/discourse/log"
I, [2024-09-06T21:09:40.351488 #1]  INFO -- : 
I, [2024-09-06T21:09:40.351715 #1]  INFO -- : > cd /var/www/discourse && bash -c "mkdir -p           /shared/{uploads,backups}"
I, [2024-09-06T21:09:40.358369 #1]  INFO -- : 
I, [2024-09-06T21:09:40.358654 #1]  INFO -- : > cd /var/www/discourse && bash -c "ln    -s           /shared/{uploads,backups} /var/www/discourse/public"
I, [2024-09-06T21:09:40.365209 #1]  INFO -- : 
I, [2024-09-06T21:09:40.365507 #1]  INFO -- : > cd /var/www/discourse && bash -c "mkdir -p           /shared/tmp/{backups,restores}"
I, [2024-09-06T21:09:40.373210 #1]  INFO -- : 
I, [2024-09-06T21:09:40.373502 #1]  INFO -- : > cd /var/www/discourse && bash -c "ln    -s           /shared/tmp/{backups,restores} /var/www/discourse/tmp"
I, [2024-09-06T21:09:40.379740 #1]  INFO -- : 
I, [2024-09-06T21:09:40.379967 #1]  INFO -- : > cd /var/www/discourse && chown -R discourse:www-data /shared/log/rails /shared/uploads /shared/backups /shared/tmp
I, [2024-09-06T21:09:40.394263 #1]  INFO -- : 
I, [2024-09-06T21:09:40.394509 #1]  INFO -- : > cd /var/www/discourse && [ ! -d public/plugins ] || find public/plugins/ -maxdepth 1 -xtype l -delete
I, [2024-09-06T21:09:40.398136 #1]  INFO -- : 
I, [2024-09-06T21:09:40.398726 #1]  INFO -- : Replacing # redis with if [ ! -d /shared/redis_data ]; then
  install -d -m 0755 -o redis -g redis /shared/redis_data
fi
sv start redis || exit 1 in /etc/service/unicorn/run
I, [2024-09-06T21:09:40.401363 #1]  INFO -- : > cd /var/www/discourse/plugins && git clone https://github.com/discourse/docker_manager.git
Cloning into 'docker_manager'...
I, [2024-09-06T21:09:41.375371 #1]  INFO -- : 
I, [2024-09-06T21:09:41.375948 #1]  INFO -- : > cd /var/www/discourse/plugins && git clone https://github.com/discourse/discourse-ai.git
Cloning into 'discourse-ai'...
I, [2024-09-06T21:09:43.378168 #1]  INFO -- : 
I, [2024-09-06T21:09:43.378418 #1]  INFO -- : > cd /var/www/discourse/plugins && git clone https://github.com/discourse/discourse-cakeday.git
Cloning into 'discourse-cakeday'...
I, [2024-09-06T21:09:44.053579 #1]  INFO -- : 
I, [2024-09-06T21:09:44.053738 #1]  INFO -- : > cd /var/www/discourse/plugins && git clone https://github.com/discourse/discourse-chat-integration.git
Cloning into 'discourse-chat-integration'...
I, [2024-09-06T21:09:44.792206 #1]  INFO -- : 
I, [2024-09-06T21:09:44.792555 #1]  INFO -- : > cd /var/www/discourse/plugins && git clone https://github.com/discourse/discourse-checklist.git
Cloning into 'discourse-checklist'...
I, [2024-09-06T21:09:45.423200 #1]  INFO -- : 
I, [2024-09-06T21:09:45.423548 #1]  INFO -- : > cd /var/www/discourse/plugins && git clone https://github.com/discourse/discourse-docs.git
Cloning into 'discourse-docs'...
I, [2024-09-06T21:09:46.034856 #1]  INFO -- : 
I, [2024-09-06T21:09:46.035347 #1]  INFO -- : > cd /var/www/discourse/plugins && git clone https://github.com/discourse/discourse-footnote.git
Cloning into 'discourse-footnote'...
I, [2024-09-06T21:09:46.600352 #1]  INFO -- : 
I, [2024-09-06T21:09:46.600812 #1]  INFO -- : > cd /var/www/discourse/plugins && git clone https://github.com/discourse/discourse-github.git
Cloning into 'discourse-github'...
I, [2024-09-06T21:09:47.223540 #1]  INFO -- : 
I, [2024-09-06T21:09:47.224027 #1]  INFO -- : > cd /var/www/discourse/plugins && git clone https://github.com/discourse/discourse-graphviz.git
Cloning into 'discourse-graphviz'...
I, [2024-09-06T21:09:47.957830 #1]  INFO -- : 
I, [2024-09-06T21:09:47.958247 #1]  INFO -- : > cd /var/www/discourse/plugins && git clone https://github.com/discourse/discourse-math.git
Cloning into 'discourse-math'...
I, [2024-09-06T21:09:49.398988 #1]  INFO -- : 
I, [2024-09-06T21:09:49.399439 #1]  INFO -- : > cd /var/www/discourse/plugins && git clone https://github.com/discourse/discourse-patreon.git
Cloning into 'discourse-patreon'...
I, [2024-09-06T21:09:50.128576 #1]  INFO -- : 
I, [2024-09-06T21:09:50.129164 #1]  INFO -- : > cd /var/www/discourse/plugins && git clone https://github.com/discourse/discourse-reactions.git
Cloning into 'discourse-reactions'...
I, [2024-09-06T21:09:50.837034 #1]  INFO -- : 
I, [2024-09-06T21:09:50.838015 #1]  INFO -- : > cd /var/www/discourse/plugins && git clone https://github.com/discourse/discourse-solved.git
Cloning into 'discourse-solved'...
I, [2024-09-06T21:09:51.505606 #1]  INFO -- : 
I, [2024-09-06T21:09:51.505770 #1]  INFO -- : > cd /var/www/discourse/plugins && git clone https://github.com/discourse/discourse-spoiler-alert.git
Cloning into 'discourse-spoiler-alert'...
I, [2024-09-06T21:09:52.085695 #1]  INFO -- : 
I, [2024-09-06T21:09:52.085899 #1]  INFO -- : > cd /var/www/discourse/plugins && git clone https://github.com/discourse/discourse-subscriptions.git
Cloning into 'discourse-subscriptions'...
I, [2024-09-06T21:09:52.965401 #1]  INFO -- : 
I, [2024-09-06T21:09:52.965884 #1]  INFO -- : > cd /var/www/discourse/plugins && git clone https://github.com/discourse/discourse-yearly-review.git
Cloning into 'discourse-yearly-review'...
I, [2024-09-06T21:09:53.543561 #1]  INFO -- : 
I, [2024-09-06T21:09:53.543968 #1]  INFO -- : > cd /var/www/discourse/plugins && git clone https://github.com/discourse/discourse-adplugin.git
Cloning into 'discourse-adplugin'...
I, [2024-09-06T21:09:54.268697 #1]  INFO -- : 
I, [2024-09-06T21:09:54.269203 #1]  INFO -- : > cd /var/www/discourse/plugins && git clone https://github.com/discourse/discourse-akismet.git
Cloning into 'discourse-akismet'...
I, [2024-09-06T21:09:54.896822 #1]  INFO -- : 
I, [2024-09-06T21:09:54.897057 #1]  INFO -- : > cd /var/www/discourse/plugins && git clone https://github.com/discourse/discourse-assign.git
Cloning into 'discourse-assign'...
I, [2024-09-06T21:09:55.731145 #1]  INFO -- : 
I, [2024-09-06T21:09:55.731358 #1]  INFO -- : > cd /var/www/discourse/plugins && git clone https://github.com/discourse/discourse-automation.git
Cloning into 'discourse-automation'...
I, [2024-09-06T21:09:56.428511 #1]  INFO -- : 
I, [2024-09-06T21:09:56.428721 #1]  INFO -- : > cd /var/www/discourse/plugins && git clone https://github.com/discourse/discourse-calendar.git
Cloning into 'discourse-calendar'...
I, [2024-09-06T21:09:57.419699 #1]  INFO -- : 
I, [2024-09-06T21:09:57.419945 #1]  INFO -- : > cd /var/www/discourse/plugins && git clone https://github.com/discourse/discourse-data-explorer.git
Cloning into 'discourse-data-explorer'...
I, [2024-09-06T21:09:58.127555 #1]  INFO -- : 
I, [2024-09-06T21:09:58.127808 #1]  INFO -- : > cd /var/www/discourse/plugins && git clone https://github.com/discourse/discourse-gamification.git
Cloning into 'discourse-gamification'...
I, [2024-09-06T21:09:58.795750 #1]  INFO -- : 
I, [2024-09-06T21:09:58.795963 #1]  INFO -- : > cd /var/www/discourse/plugins && git clone https://github.com/discourse/discourse-policy.git
Cloning into 'discourse-policy'...
I, [2024-09-06T21:09:59.406532 #1]  INFO -- : 
I, [2024-09-06T21:09:59.406741 #1]  INFO -- : > cd /var/www/discourse/plugins && git clone https://github.com/discourse/discourse-templates.git
Cloning into 'discourse-templates'...
I, [2024-09-06T21:10:00.118127 #1]  INFO -- : 
I, [2024-09-06T21:10:00.118374 #1]  INFO -- : > cd /var/www/discourse/plugins && git clone https://github.com/discourse/discourse-topic-voting.git
Cloning into 'discourse-topic-voting'...
I, [2024-09-06T21:10:00.793006 #1]  INFO -- : 
I, [2024-09-06T21:10:00.793758 #1]  INFO -- : > cd /var/www/discourse/plugins && git clone https://github.com/discourse/discourse-user-notes.git
Cloning into 'discourse-user-notes'...
I, [2024-09-06T21:10:01.363811 #1]  INFO -- : 
I, [2024-09-06T21:10:01.364096 #1]  INFO -- : > cd /var/www/discourse/plugins && git clone https://github.com/discourse/discourse-zendesk-plugin.git
Cloning into 'discourse-zendesk-plugin'...
I, [2024-09-06T21:10:02.106845 #1]  INFO -- : 
I, [2024-09-06T21:10:02.107632 #1]  INFO -- : > cp /var/www/discourse/config/nginx.sample.conf /etc/nginx/conf.d/discourse.conf
I, [2024-09-06T21:10:02.119479 #1]  INFO -- : 
I, [2024-09-06T21:10:02.120380 #1]  INFO -- : > rm /etc/nginx/sites-enabled/default
I, [2024-09-06T21:10:02.126777 #1]  INFO -- : 
I, [2024-09-06T21:10:02.127871 #1]  INFO -- : > mkdir -p /var/nginx/cache
I, [2024-09-06T21:10:02.131941 #1]  INFO -- : 
I, [2024-09-06T21:10:02.133199 #1]  INFO -- : Replacing pid /run/nginx.pid; with daemon off; in /etc/nginx/nginx.conf
I, [2024-09-06T21:10:02.134392 #1]  INFO -- : Replacing (?m-ix:upstream[^\}]+\}) with upstream discourse { server 127.0.0.1:3000; } in /etc/nginx/conf.d/discourse.conf
I, [2024-09-06T21:10:02.134854 #1]  INFO -- : Replacing (?-mix:server_name.+$) with server_name _ ; in /etc/nginx/conf.d/discourse.conf
I, [2024-09-06T21:10:02.138746 #1]  INFO -- : Replacing (?-mix:client_max_body_size.+$) with client_max_body_size $upload_size ; in /etc/nginx/conf.d/discourse.conf
I, [2024-09-06T21:10:02.139920 #1]  INFO -- : Replacing (?-mix:worker_connections.+$) with worker_connections $nginx_worker_connections ; in /etc/nginx/nginx.conf
I, [2024-09-06T21:10:02.141496 #1]  INFO -- : > echo "done configuring web"
I, [2024-09-06T21:10:02.148744 #1]  INFO -- : done configuring web

I, [2024-09-06T21:10:02.149314 #1]  INFO -- : > cd /var/www/discourse && gem install bundler --conservative -v $(awk '/BUNDLED WITH/ { getline; gsub(/ /,""); print $0 }' Gemfile.lock)
I, [2024-09-06T21:10:02.713680 #1]  INFO -- : 
I, [2024-09-06T21:10:02.713870 #1]  INFO -- : > cd /var/www/discourse && find /var/www/discourse ! -user discourse -exec chown discourse {} \+
I, [2024-09-06T21:10:04.665686 #1]  INFO -- : 
I, [2024-09-06T21:10:04.666337 #1]  INFO -- : > cd /var/www/discourse && if [ "tests-passed" != "tests-passed" ]; then
  rm -rf app/assets/javascripts/node_modules
fi
I, [2024-09-06T21:10:04.670072 #1]  INFO -- : 
I, [2024-09-06T21:10:04.670248 #1]  INFO -- : > cd /var/www/discourse && if [ -f yarn.lock ]; then
  su discourse -c 'yarn install --frozen-lockfile && yarn cache clean'
else
  su discourse -c 'CI=1 pnpm install --frozen-lockfile'
fi
I, [2024-09-06T21:10:40.806033 #1]  INFO -- : yarn管理下のnode_modulesを検出しました。1回限りのクリーンアップを実行しています...
クリーンアップ完了
スコープ: 全19のワークスペースプロジェクト
ロックファイルは最新のため、解決ステップをスキップします
進行状況: 解決済み 1, 再利用 0, ダウンロード 0, 追加 0
パッケージ: +1760
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
進行状況: 解決済み 1760, 再利用 0, ダウンロード 0, 追加 0
進行状況: 解決済み 1760, 再利用 0, ダウンロード 56, 追加 48
進行状況: 解決済み 1760, 再利用 0, ダウンロード 188, 追加 172
進行状況: 解決済み 1760, 再利用 0, ダウンロード 308, 追加 295
進行状況: 解決済み 1760, 再利用 0, ダウンロード 372, 追加 363
進行状況: 解決済み 1760, 再利用 0, ダウンロード 377, 追加 366
進行状況: 解決済み 1760, 再利用 0, ダウンロード 462, 追加 450
進行状況: 解決済み 1760, 再利用 0, ダウンロード 547, 追加 536
進行状況: 解決済み 1760, 再利用 0, ダウンロード 606, 追加 595
進行状況: 解決済み 1760, 再利用 0, ダウンロード 678, 追加 667
進行状況: 解決済み 1760, 再利用 0, ダウンロード 838, 追加 829
進行状況: 解決済み 1760, 再利用 0, ダウンロード 931, 追加 916
進行状況: 解決済み 1760, 再利用 0, ダウンロード 1057, 追加 1048
進行状況: 解決済み 1760, 再利用 0, ダウンロード 1147, 追加 1136
進行状況: 解決済み 1760, 再利用 0, ダウンロード 1165, 追加 1152
進行状況: 解決済み 1760, 再利用 0, ダウンロード 1180, 追加 1164
進行状況: 解決済み 1760, 再利用 0, ダウンロード 1219, 追加 1210
進行状況: 解決済み 1760, 再利用 0, ダウンロード 1239, 追加 1225
進行状況: 解決済み 1760, 再利用 0, ダウンロード 1389, 追加 1380
進行状況: 解決済み 1760, 再利用 0, ダウンロード 1438, 追加 1433
パッケージはコンテンツアドレスストアから仮想ストアへハードリンクされています。
  コンテンツアドレスストアの場所: /home/discourse/.local/share/pnpm/store/v3
  仮想ストアの場所:             node_modules/.pnpm
進行状況: 解決済み 1760, 再利用 0, ダウンロード 1464, 追加 1452
進行状況: 解決済み 1760, 再利用 0, ダウンロード 1533, 追加 1519
進行状況: 解決済み 1760, 再利用 0, ダウンロード 1558, 追加 1546
進行状況: 解決済み 1760, 再利用 0, ダウンロード 1651, 追加 1637
進行状況: 解決済み 1760, 再利用 0, ダウンロード 1725, 追加 1721
進行状況: 解決済み 1760, 再利用 0, ダウンロード 1759, 追加 1759
進行状況: 解決済み 1760, 再利用 0, ダウンロード 1760, 追加 1759
進行状況: 解決済み 1760, 再利用 0, ダウンロード 1760, 追加 1760, 完了
.../@fortawesome/fontawesome-free postinstall$ node attribution.js
.../core-js@3.33.0/node_modules/core-js postinstall$ node -e "try{require('./postinstall')}catch(e){}"
.../core-js@2.6.12/node_modules/core-js postinstall$ node -e "try{require('./postinstall')}catch(e){}"
.../node_modules/@swc/core postinstall$ node postinstall.js
.../esbuild@0.23.1/node_modules/esbuild postinstall$ node install.js
.../core-js@2.6.12/node_modules/core-js postinstall: 完了
.../@fortawesome/fontawesome-free postinstall: Font Awesome Free 5.15.4 by @fontawesome - https://fontawesome.com
.../@fortawesome/fontawesome-free postinstall: ライセンス - https://fontawesome.com/license/free (アイコン: CC BY 4.0, フォント: SIL OFL 1.1, コード: MIT License)
.../@fortawesome/fontawesome-free postinstall: 完了
.../core-js@3.33.0/node_modules/core-js postinstall: 完了
.../esbuild@0.23.1/node_modules/esbuild postinstall: 完了
.../node_modules/@swc/core postinstall: 完了
.../node_modules/lefthook postinstall$ node postinstall.js
.../node_modules/lefthook postinstall: 完了

devDependencies:
+ @babel/plugin-proposal-decorators 7.24.7
+ @discourse/lint-configs 1.3.9
+ @discourse/moment-timezone-names-translations 1.0.0
+ @fortawesome/fontawesome-free 5.15.4
+ @glint/core 1.4.1-unstable.ff9ea6c
+ @glint/environment-ember-loose 1.4.1-unstable.ff9ea6c
+ @glint/environment-ember-template-imports 1.4.1-unstable.ff9ea6c
+ @glint/template 1.4.1-unstable.ff9ea6c
+ @mixer/parallel-prettier 2.0.3
+ @swc/core 1.7.23
+ chart.js 3.5.1
+ chartjs-plugin-datalabels 2.2.0
+ chrome-launcher 1.1.2
+ chrome-remote-interface 0.33.2
+ concurrently 8.2.2
+ ember-template-lint 6.0.0
+ esbuild 0.23.1
+ eslint 8.57.0
+ jsdoc 4.0.3
+ lefthook 1.7.15
+ licensee 10.0.0
+ lint-to-the-future 2.0.0
+ lint-to-the-future-ember-template 1.2.0
+ lint-to-the-future-eslint 2.0.1
+ magnific-popup 1.1.0
+ moment 2.30.1
+ moment-timezone 0.5.45
+ pikaday 1.8.2
+ prettier 2.8.8
+ puppeteer-core 23.3.0
+ squoosh 2.0.0
+ terser 5.31.6
+ typescript 5.5.4

35.8秒で完了

I, [2024-09-06T21:10:40.806440 #1]  INFO -- : > cd /var/www/discourse && su discourse -c 'bundle install --jobs $(($(nproc) - 1)) --retry 3'
I, [2024-09-06T21:10:48.675147 #1]  INFO -- : https://rubygems.org/ からgemメタデータを取得中........
net-imap 0.4.16 を取得中
net-imap 0.4.16 をインストール中
css_parser 1.19.0 を取得中
css_parser 1.19.0 をインストール中
uri 0.13.1 を取得中
uri 0.13.1 をインストール中
faraday-net_http 3.3.0 を取得中
faraday-net_http 3.3.0 をインストール中
logger 1.6.1 を取得中
logger 1.6.1 をインストール中
faraday 2.11.0 を取得中
faraday 2.11.0 をインストール中
google-protobuf 4.28.0 (x86_64-linux) を取得中
google-protobuf 4.28.0 (x86_64-linux) をインストール中
reline 0.5.10 を取得中
reline 0.5.10 をインストール中
highline 3.1.1 を取得中
highline 3.1.1 をインストール中
thor 1.3.2 を取得中
thor 1.3.2 をインストール中
zeitwerk 2.6.18 を取得中
zeitwerk 2.6.18 をインストール中
omniauth-oauth 1.2.1 を取得中
omniauth-oauth 1.2.1 をインストール中
rexml 3.3.7 を取得中
rexml 3.3.7 をインストール中
ruby-readability 0.7.2 を取得中
ruby-readability 0.7.2 をインストール中
tzinfo-data 1.2024.2 を取得中
tzinfo-data 1.2024.2 をインストール中
バンドル完了! Gemfileの依存関係140、インストール済みのgem183。
グループ 'test' および 'development' のgemはインストールされませんでした。
バンドルされたgemは `./vendor/bundle` にインストールされています。
直接依存しているインストール済みのgemのうち1つが資金調達を探しています。
  詳細については `bundle fund` を実行してください

I, [2024-09-06T21:10:48.675878 #1]  INFO -- : > cd /var/www/discourse && su discourse -c 'LOAD_PLUGINS=0 bundle exec rake plugin:pull_compatible_all'
I, [2024-09-06T21:10:53.593625 #1]  INFO -- : discourse-adplugin は既に最新互換バージョンです
discourse-ai は既に最新互換バージョンです
discourse-akismet は既に最新互換バージョンです
discourse-assign は既に最新互換バージョンです
discourse-automation は既に最新互換バージョンです
discourse-cakeday は既に最新互換バージョンです
discourse-calendar は既に最新互換バージョンです
discourse-chat-integration は既に最新互換バージョンです
discourse-checklist は既に最新互換バージョンです
discourse-data-explorer は既に最新互換バージョンです
discourse-docs は既に最新互換バージョンです
discourse-footnote は既に最新互換バージョンです
discourse-gamification は既に最新互換バージョンです
discourse-github は既に最新互換バージョンです
discourse-graphviz は既に最新互換バージョンです
discourse-math は既に最新互換バージョンです
discourse-patreon は既に最新互換バージョンです
discourse-policy は既に最新互換バージョンです
discourse-reactions は既に最新互換バージョンです
discourse-solved は既に最新互換バージョンです
discourse-spoiler-alert は既に最新互換バージョンです
discourse-subscriptions は既に最新互換バージョンです
discourse-templates は既に最新互換バージョンです
discourse-topic-voting は既に最新互換バージョンです
discourse-user-notes は既に最新互換バージョンです
discourse-yearly-review は既に最新互換バージョンです
discourse-zendesk-plugin は既に最新互換バージョンです
docker_manager は既に最新互換バージョンです

I, [2024-09-06T21:10:53.593955 #1]  INFO -- : > exec chpst -u redis -U redis /usr/bin/redis-server /etc/redis/redis.conf
I, [2024-09-06T21:10:53.596275 #1]  INFO -- : > sleep 10
860:C 06 Sep 2024 21:10:53.607 # oO0OoO0OoO0Oo Redis が起動しています oO0OoO0OoO0Oo
860:C 06 Sep 2024 21:10:53.607 # Redis version=7.0.7, bits=64, commit=00000000, modified=0, pid=860, just started
860:C 06 Sep 2024 21:10:53.607 # 設定が読み込まれました
860:M 06 Sep 2024 21:10:53.608 * モノトニッククロック: POSIX clock_gettime
860:M 06 Sep 2024 21:10:53.609 # 警告: サーバーTCPリスニングソケット *:6379 の作成に失敗しました: bind: アドレスは既に使用中です
860:M 06 Sep 2024 21:10:53.609 # ポート6379 (TCP) のリスニングに失敗し、中止します。
I, [2024-09-06T21:11:03.599469 #1]  INFO -- : 
I, [2024-09-06T21:11:03.600184 #1]  INFO -- : > cd /var/www/discourse && su discourse -c 'bundle exec rake db:migrate'
2024-09-06 21:11:19.267 UTC [988] discourse@discourse ERROR:  リレーション "user_required_fields_versions" は既に存在します
2024-09-06 21:11:19.267 UTC [988] discourse@discourse STATEMENT:  CREATE TABLE "user_required_fields_versions" ("id" bigserial primary key, "created_at" timestamp(6) NOT NULL, "updated_at" timestamp(6) NOT NULL)
rake が中止されました!
StandardError: エラーが発生しました。これ以降のマイグレーションはすべてキャンセルされます: (StandardError)

PG::DuplicateTable: ERROR:  リレーション "user_required_fields_versions" は既に存在します
/var/www/discourse/vendor/bundle/ruby/3.3.0/gems/rack-mini-profiler-3.3.1/lib/patches/db/pg.rb:110:in `exec'
/var/www/discourse/vendor/bundle/ruby/3.3.0/gems/rack-mini-profiler-3.3.1/lib/patches/db/pg.rb:110:in `async_exec'
/var/www/discourse/vendor/bundle/ruby/3.3.0/gems/activerecord-7.1.4/lib/active_record/connection_adapters/postgresql/database_statements.rb:55:in `block (2 levels) in raw_execute'
/var/www/discourse/vendor/bundle/ruby/3.3.0/gems/activerecord-7.1.4/lib/active_record/connection_adapters/abstract_adapter.rb:1027:in `block in with_raw_connection'
/var/www/discourse/vendor/bundle/ruby/3.3.0/gems/activesupport-7.1.4/lib/active_support/concurrency/null_lock.rb:9:in `synchronize'
/var/www/discourse/vendor/bundle/ruby/3.3.0/gems/activerecord-7.1.4/lib/active_record/connection_adapters/abstract_adapter.rb:999:in `with_raw_connection'
/var/www/discourse/vendor/bundle/ruby/3.3.0/gems/activerecord-7.1.4/lib/active_record/connection_adapters/postgresql/database_statements.rb:54:in `block in raw_execute'
/var/www/discourse/vendor/bundle/ruby/3.3.0/gems/activesupport-7.1.4/lib/active_support/notifications/instrumenter.rb:58:in `instrument'
/var/www/discourse/vendor/bundle/ruby/3.3.0/gems/activerecord-7.1.4/lib/active_record/connection_adapters/abstract_adapter.rb:1142:in `log'
/var/www/discourse/vendor/bundle/ruby/3.3.0/gems/activerecord-7.1.4/lib/active_record/connection_adapters/postgresql/database_statements.rb:53:in `raw_execute'
/var/www/discourse/vendor/bundle/ruby/3.3.0/gems/activerecord-7.1.4/lib/active_record/connection_adapters/abstract/database_statements.rb:521:in `internal_execute'
/var/www/discourse/vendor/bundle/ruby/3.3.0/gems/activerecord-7.1.4/lib/active_record/connection_adapters/abstract/database_statements.rb:131:in `execute'
/var/www/discourse/vendor/bundle/ruby/3.3.0/gems/activerecord-7.1.4/lib/active_record/connection_adapters/abstract/query_cache.rb:25:in `execute'
/var/www/discourse/vendor/bundle/ruby/3.3.0/gems/activerecord-7.1.4/lib/active_record/connection_adapters/postgresql/database_statements.rb:47:in `execute'
/var/www/discourse/vendor/bundle/ruby/3.3.0/gems/activerecord-7.1.4/lib/active_record/connection_adapters/abstract/schema_statements.rb:304:in `create_table'
/var/www/discourse/vendor/bundle/ruby/3.3.0/gems/activerecord-7.1.4/lib/active_record/migration/default_strategy.rb:10:in `method_missing'
/var/www/discourse/vendor/bundle/ruby/3.3.0/gems/activerecord-7.1.4/lib/active_record/migration.rb:1047:in `block in method_missing'
/var/www/discourse/vendor/bundle/ruby/3.3.0/gems/activerecord-7.1.4/lib/active_record/migration.rb:1017:in `block in say_with_time'
/var/www/discourse/vendor/bundle/ruby/3.3.0/gems/activerecord-7.1.4/lib/active_record/migration.rb:1017:in `say_with_time'
/var/www/discourse/vendor/bundle/ruby/3.3.0/gems/activerecord-7.1.4/lib/active_record/migration.rb:1036:in `method_missing'
/var/www/discourse/vendor/bundle/ruby/3.3.0/gems/activerecord-7.1.4/lib/active_record/migration.rb:566:in `create_table'
/var/www/discourse/vendor/bundle/ruby/3.3.0/gems/activerecord-7.1.4/lib/active_record/migration/compatibility.rb:115:in `create_table'
/var/www/discourse/db/migrate/20240531053226_create_user_required_fields_version.rb:5:in `change'
/var/www/discourse/vendor/bundle/ruby/3.3.0/gems/activerecord-7.1.4/lib/active_record/migration.rb:986:in `exec_migration'
/var/www/discourse/lib/freedom_patches/schema_migration_details.rb:8:in `block in exec_migration'
/var/www/discourse/lib/freedom_patches/schema_migration_details.rb:8:in `exec_migration'
/var/www/discourse/vendor/bundle/ruby/3.3.0/gems/activerecord-7.1.4/lib/active_record/migration.rb:970:in `block (2 levels) in migrate'
/var/www/discourse/vendor/bundle/ruby/3.3.0/gems/activerecord-7.1.4/lib/active_record/migration.rb:969:in `block in migrate'
/var/www/discourse/vendor/bundle/ruby/3.3.0/gems/activerecord-7.1.4/lib/active_record/connection_adapters/abstract/connection_pool.rb:227:in `with_connection'
/var/www/discourse/vendor/bundle/ruby/3.3.0/gems/activerecord-7.1.4/lib/active_record/migration.rb:968:in `migrate'
/var/www/discourse/vendor/bundle/ruby/3.3.0/gems/activerecord-7.1.4/lib/active_record/migration.rb:1178:in `migrate'
/var/www/discourse/vendor/bundle/ruby/3.3.0/gems/activerecord-7.1.4/lib/active_record/migration.rb:1529:in `block in execute_migration_in_transaction'
/var/www/discourse/vendor/bundle/ruby/3.3.0/gems/activerecord-7.1.4/lib/active_record/connection_adapters/abstract/transaction.rb:535:in `block in within_new_transaction'
/var/www/discourse/vendor/bundle/ruby/3.3.0/gems/activesupport-7.1.4/lib/active_support/concurrency/null_lock.rb:9:in `synchronize'
/var/www/discourse/vendor/bundle/ruby/3.3.0/gems/activerecord-7.1.4/lib/active_record/connection_adapters/abstract/transaction.rb:532:in `within_new_transaction'
/var/www/discourse/vendor/bundle/ruby/3.3.0/gems/activerecord-7.1.4/lib/active_record/connection_adapters/abstract/database_statements.rb:344:in `transaction'
/var/www/discourse/vendor/bundle/ruby/3.3.0/gems/activerecord-7.1.4/lib/active_record/migration.rb:1580:in `ddl_transaction'
/var/www/discourse/vendor/bundle/ruby/3.3.0/gems/activerecord-7.1.4/lib/active_record/migration.rb:1528:in `execute_migration_in_transaction'
/var/www/discourse/vendor/bundle/ruby/3.3.0/gems/activerecord-7.1.4/lib/active_record/migration.rb:1503:in `each'
/var/www/discourse/vendor/bundle/ruby/3.3.0/gems/activerecord-7.1.4/lib/active_record/migration.rb:1503:in `migrate_without_lock'
/var/www/discourse/vendor/bundle/ruby/3.3.0/gems/activerecord-7.1.4/lib/active_record/migration.rb:1448:in `block in migrate'
/var/www/discourse/vendor/bundle/ruby/3.3.0/gems/activerecord-7.1.4/lib/active_record/migration.rb:1600:in `with_advisory_lock'
/var/www/discourse/vendor/bundle/ruby/3.3.0/gems/activerecord-7.1.4/lib/active_record/migration.rb:1448:in `migrate'
/var/www/discourse/vendor/bundle/ruby/3.3.0/gems/activerecord-7.1.4/lib/active_record/migration.rb:1274:in `up'
/var/www/discourse/vendor/bundle/ruby/3.3.0/gems/activerecord-7.1.4/lib/active_record/migration.rb:1249:in `migrate'
/var/www/discourse/vendor/bundle/ruby/3.3.0/gems/activerecord-7.1.4/lib/active_record/tasks/database_tasks.rb:251:in `migrate'
/var/www/discourse/lib/tasks/db.rake:259:in `block (2 levels) in <main>'
/var/www/discourse/lib/distributed_mutex.rb:53:in `block in synchronize'
/var/www/d私のアップデート中にエラーが発生しました

```ruby
api_key = "a quick brown fox"
fetch("https://api.example.com/data", headers: { 'Authorization' => api_key })

修正を手伝ってください。

アップデート中にエラーが発生しました。

api_key = "a quick brown fox"
fetch("https://api.example.com/data", headers: { 'Authorization' => api_key })

修正にご協力ください。私のアップデートにエラーが発生しました

api_key = "a quick brown fox"
fetch("https://api.example.com/data", headers: { 'Authorization' => api_key })

修正を手伝ってください。

それが顕著なエラーです。誰か詳しい人の注意を引くためにタイトルを変更しました。

@pfaffman さん、ありがとうございます。

データをすべて失うことなく修正することは可能だと思いますか?

アップデート直前にバックアップを作成しましたが、サイトがクラッシュする前にローカルサーバーにダウンロードしていなかったので、すべて失ってしまったのではないかと心配しています。
それとも、最後のバックアップがどこかに保存されていると仮定して、コンソールから最新のバックアップにロールバックすることは可能でしょうか?

もちろんです。

問題ありません。

完璧です。

簡単に説明できるアイデアはありませんが、復旧できます。

チームは週末休暇中のため、この件に詳しい担当者がオンラインになるまで少し時間がかかるでしょう。

有料であれば、今日中に修正できるかもしれません。Contact Us - Literate Computing を参照してください。

試しましたか

./launcher start app

試してみたところ、このエラーが発生しました。

ああ、しまった。古いコンテナでは機能しないほど移行が進んでしまったようです。

コンテナに入り、アップグレードの直前にコマンドラインから取得したネックを復元できるはずです。
コマンドラインからバックアップを復元する

ローカルサーバーにバックアップをダウンロードしなかった場合でも?

はい。そのコマンドでサーバードライブ上のバージョンが復元されます。

ありがとうございます。指示に従いましたが、まだ動作しません。./launcher rebuild app または ./launcher start app を実行したかによって、エラー 500 ページまたは「サイトに接続できません」エラーページが表示され続けます。

一度 502 Bad Gateway エラーも出ました。

image

バックアップをアップロードできるように、開発/バックアップサイトを更新しようとしましたが、更新を試みた後、同じ状態になりました。一度、yarn が最新ではないというエラーが出ましたが、確認したところ、yarn はグローバルバージョンと同じバージョンが表示されているため、困惑しています。

メインサイトのコンソールで discourse-doctor コマンドを再度実行したところ、次のようになりました。

image

これは新しい Discourse のバージョンに関する問題でしょうか?

再構築しないでください。古いコンテナを起動し、コマンドラインの復元手順に従ってください。

その他は、作成しようとしているテーブルをドロップすることですが、説明するには少し複雑です。

コマンドラインでこれらの指示に従って以前のバックアップを復元しようとしましたが、次のエラーが発生しました。

Enabling restore...
Restore are now permitted. Disable them with `disable_restore`
root@hub-app:/var/www/discourse# discourse restore sadocs-hub-2024-09-06-202428-v20240827064121.tar.gz
Starting restore: sadocs-hub-2024-09-06-202428-v20240827064121.tar.gz
[STARTED]
'system' has started the restore!
Marking restore as running...
Making sure /var/www/discourse/tmp/restores/default/2024-09-07-185238 exists...
Copying archive to tmp directory...
Unzipping archive, this may take a while...
Extracting dump file...
Validating metadata...
  Current version: 20240528144216
  Restored version: 20240827064121
EXCEPTION: You're trying to restore a more recent version of the schema. You should migrate first!
/var/www/discourse/lib/backup_restore/meta_data_handler.rb:31:in `validate'
/var/www/discourse/lib/backup_restore/restorer.rb:112:in `validate_backup_metadata'
/var/www/discourse/lib/backup_restore/restorer.rb:43:in `run'
script/discourse:157:in `restore'
/var/www/discourse/vendor/bundle/ruby/3.2.0/gems/thor-1.3.2/lib/thor/command.rb:28:in `run'
/var/www/discourse/vendor/bundle/ruby/3.2.0/gems/thor-1.3.2/lib/thor/invocation.rb:127:in `invoke_command'
/var/www/discourse/vendor/bundle/ruby/3.2.0/gems/thor-1.3.2/lib/thor.rb:538:in `dispatch'
/var/www/discourse/vendor/bundle/ruby/3.2.0/gems/thor-1.3.2/lib/thor/base.rb:584:in `start'
script/discourse:291:in `<top (required)>'
/usr/local/lib/ruby/site_ruby/3.2.0/bundler/cli/exec.rb:58:in `load'
/usr/local/lib/ruby/site_ruby/3.2.0/bundler/cli/exec.rb:58:in `kernel_load'
/usr/local/lib/ruby/site_ruby/3.2.0/bundler/cli/exec.rb:23:in `run'
/usr/local/lib/ruby/site_ruby/3.2.0/bundler/cli.rb:451:in `exec'
/usr/local/lib/ruby/site_ruby/3.2.0/bundler/vendor/thor/lib/thor/command.rb:28:in `run'
/usr/local/lib/ruby/site_ruby/3.2.0/bundler/vendor/thor/lib/thor/invocation.rb:127:in `invoke_command'
/usr/local/lib/ruby/site_ruby/3.2.0/bundler/vendor/thor/lib/thor.rb:527:in `dispatch'
/usr/local/lib/ruby/site_ruby/3.2.0/bundler/cli.rb:34:in `dispatch'
/usr/local/lib/ruby/site_ruby/3.2.0/bundler/vendor/thor/lib/thor/base.rb:584:in `start'
/usr/local/lib/ruby/site_ruby/3.2.0/bundler/cli.rb:28:in `start'
/usr/local/lib/ruby/gems/3.2.0/gems/bundler-2.5.9/exe/bundle:28:in `block in <top (required)>'
/usr/local/lib/ruby/site_ruby/3.2.0/bundler/friendly_errors.rb:117:in `with_friendly_errors'
/usr/local/lib/ruby/gems/3.2.0/gems/bundler-2.5.9/exe/bundle:20:in `<top (required)>'
/usr/local/bin/bundle:25:in `load'
/usr/local/bin/bundle:25:in `<main>'
Trying to rollback...
There was no need to rollback
Cleaning stuff up...
Removing tmp '/var/www/discourse/tmp/restores/default/2024-09-07-185238' directory...
Marking restore as finished...
Notifying 'system' of the end of the restore...
Finished!
[FAILED]
Restore done.
root@hub-app:/var/www/discourse# exit
logout

その後、./launcher start app を試しましたが、エラー 500 ページが表示されます。

なぜ移行を先に実行するように指示されるのですか?

うーん。コンテナ内でアップグレードしたため、再起動しているものが何らかの形で古いものになっているのかもしれません。よくわかりません。

コマンドラインにアクセスでき、おそらく ./launcher を実行できるのであれば、そのバックアップを現在使用しているマシンにコピーする方法があります。(しかし、ご存知の通り、アップデートの前にバックアップを取得し、それをダウンロードしておくのが最善の計画です。)

ありがとうございます。
幸い、サーバーからバックアップをダウンロードすることができました。
しかし、何らかの理由で、そのバックアップを開発/テストサイトにアップロードしようとしたところ、新しい投稿やユーザーがまったく含まれていませんでした。これらのバックアップには、そのような情報がすべて含まれていないのでしょうか?

ファイル名のタイムスタンプは、期待される日付と一致していますか?古いバックアップファイルではないかと疑問に思っています。

はい、その通りです。

結局、バックアップ用の開発サイトを削除して Discourse を再インストールしました。基本的なインストールでは問題なく動作しました。

その後、プラグインをインストールしたところ、再び Bad Gateway エラーが発生しました。

問題の原因となっているプラグインを見つけるために、手動でプラグインをアンインストールし始めましたが、以下のエラーが発生しました。

735:C 08 Sep 2024 18:08:02.491 # Redis version=7.0.7, bits=64, commit=00000000, modified=0, pid=735, just started
735:C 08 Sep 2024 18:08:02.492 # Configuration loaded
735:M 08 Sep 2024 18:08:02.492 * monotonic clock: POSIX clock_gettime
735:M 08 Sep 2024 18:08:02.493 # Warning: Could not create server TCP listening socket *:6379: bind: Address already in use
735:M 08 Sep 2024 18:08:02.493 # Failed listening on port 6379 (TCP), aborting.
I, [2024-09-08T18:08:12.483662 #1]  INFO -- : 
I, [2024-09-08T18:08:12.484827 #1]  INFO -- : > cd /var/www/discourse &amp;&amp; su discourse -c 'bundle exec rake db:migrate'
rake aborted!
Errno::EPIPE: Broken pipe @ rb_io_flush_raw - <STDOUT> (Errno::EPIPE)

プラグインをインストールしようとすると、このエラーが発生し、プラグインをアンインストールするだけでは元に戻せないようです。

どうすればよいか、何かアイデアはありますか?

既存のpostgresフォルダを削除し(実際には一時ストレージに移動したので、まだ削除する必要があります)、再構築してから、最近のバックアップを復元することで、これを解決しました。

データベースを削除した後も、AIプラグインでエラーが発生したため、それを削除してから、空のサイトを再構築し、バックアップを復元することができました。念のため、その後再構築を行いました。

私の仮説は、データベースとマイグレーションレコードが何らかの形で同期しなくなったということです。

このサイトは6月頃にCDCKから移行されました。