最新のサイトアップグレードが機能しない

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

まず、サイトのアップグレードポータルを使用して更新を試みましたが、何らかの理由で失敗しました。
その後、サーバーにアクセスして ./launcher rebuild app を実行しましたが、再構築時にいくつかのエラーが発生し、現在サイトが完全に動作していません。

以下はビルドログです。

DISCOURSE DOCTOR Tue Feb 22 08:21:02 UTC 2022
OS: Linux ip-10-0-0-74.ec2.internal 4.14.77-81.59.amzn2.x86_64 #1 SMP Mon Nov 12 21:32:48 UTC 2018 x86_64 x86_64 x86_64 GNU/Linux


Found containers/app.yml

==================== YML SETTINGS ====================
DISCOURSE_HOSTNAME=discuss.codechef.com
SMTP_ADDRESS=email-smtp.us-east-1.amazonaws.com
DEVELOPER_EMAILS=REDACTED
SMTP_PASSWORD=REDACTED
SMTP_PORT=587
SMTP_USER_NAME=
LETSENCRYPT_ACCOUNT_EMAIL=REDACTED

==================== DOCKER INFO ====================
DOCKER VERSION: Docker version 18.06.1-ce, build e68fc7a215d7133c34aa18e3b72b4a21fd0c6136

DOCKER PROCESSES (docker ps -a)

CONTAINER ID        IMAGE               COMMAND             CREATED             STATUS              PORTS               NAMES

==================== SERIOUS PROBLEM!!!! ====================
app not running!
Attempting to rebuild
==================== REBUILD LOG ====================
x86_64 arch detected.
Ensuring launcher is up to date
Fetching origin
Launcher is up-to-date
/usr/local/lib/ruby/gems/2.7.0/gems/pups-1.1.1/lib/pups.rb
/usr/local/bin/pups --stdin
I, [2022-02-22T08:21:10.934350 #1]  INFO -- : Reading from stdin
I, [2022-02-22T08:21:10.938669 #1]  INFO -- : > locale-gen $LANG && update-locale
I, [2022-02-22T08:21:10.963714 #1]  INFO -- : Generating locales (this might take a while)...
Generation complete.

I, [2022-02-22T08:21:10.963939 #1]  INFO -- : > mkdir -p /shared/postgres_run
I, [2022-02-22T08:21:10.965947 #1]  INFO -- :
I, [2022-02-22T08:21:10.966192 #1]  INFO -- : > chown postgres:postgres /shared/postgres_run
I, [2022-02-22T08:21:10.968385 #1]  INFO -- :
I, [2022-02-22T08:21:10.968601 #1]  INFO -- : > chmod 775 /shared/postgres_run
I, [2022-02-22T08:21:10.970418 #1]  INFO -- :
I, [2022-02-22T08:21:10.970619 #1]  INFO -- : > rm -fr /var/run/postgresql
I, [2022-02-22T08:21:10.972263 #1]  INFO -- :
I, [2022-02-22T08:21:10.972457 #1]  INFO -- : > ln -s /shared/postgres_run /var/run/postgresql
I, [2022-02-22T08:21:10.973932 #1]  INFO -- :
I, [2022-02-22T08:21:10.974136 #1]  INFO -- : > socat /dev/null UNIX-CONNECT:/shared/postgres_run/.s.PGSQL.5432 || exit 0 && echo postgres already running stop container ; exit 1
2022/02/22 08:21:10 socat[23] E connect(6, AF=1 "/shared/postgres_run/.s.PGSQL.5432", 36): No such file or directory
I, [2022-02-22T08:21:10.980845 #1]  INFO -- :
I, [2022-02-22T08:21:10.981021 #1]  INFO -- : > rm -fr /shared/postgres_run/.s*
I, [2022-02-22T08:21:10.982921 #1]  INFO -- :
I, [2022-02-22T08:21:10.983095 #1]  INFO -- : > rm -fr /shared/postgres_run/*.pid
I, [2022-02-22T08:21:10.984990 #1]  INFO -- :
I, [2022-02-22T08:21:10.985377 #1]  INFO -- : > mkdir -p /shared/postgres_run/13-main.pg_stat_tmp
I, [2022-02-22T08:21:10.986992 #1]  INFO -- :
I, [2022-02-22T08:21:10.987238 #1]  INFO -- : > chown postgres:postgres /shared/postgres_run/13-main.pg_stat_tmp
I, [2022-02-22T08:21:10.988730 #1]  INFO -- :
I, [2022-02-22T08:21:10.992060 #1]  INFO -- : File > /etc/service/postgres/run  chmod: +x  chown:
I, [2022-02-22T08:21:10.995163 #1]  INFO -- : File > /etc/service/postgres/log/run  chmod: +x  chown:
I, [2022-02-22T08:21:10.998363 #1]  INFO -- : File > /etc/runit/3.d/99-postgres  chmod: +x  chown:
I, [2022-02-22T08:21:11.001577 #1]  INFO -- : File > /root/upgrade_postgres  chmod: +x  chown:
I, [2022-02-22T08:21:11.001866 #1]  INFO -- : > chown -R root /var/lib/postgresql/13/main
I, [2022-02-22T08:21:12.674190 #1]  INFO -- :
I, [2022-02-22T08:21:12.674448 #1]  INFO -- : > [ ! -e /shared/postgres_data ] && install -d -m 0755 -o postgres -g postgres /shared/postgres_data && sudo -E -u postgres /usr/lib/postgresql/13/bin/initdb -D /shared/postgres_data || exit 0
I, [2022-02-22T08:21:12.676461 #1]  INFO -- :
I, [2022-02-22T08:21:12.676515 #1]  INFO -- : > chown -R postgres:postgres /shared/postgres_data
I, [2022-02-22T08:21:12.683331 #1]  INFO -- :
I, [2022-02-22T08:21:12.683566 #1]  INFO -- : > chown -R postgres:postgres /var/run/postgresql
I, [2022-02-22T08:21:12.685242 #1]  INFO -- :
I, [2022-02-22T08:21:12.685471 #1]  INFO -- : > /root/upgrade_postgres
I, [2022-02-22T08:21:12.689497 #1]  INFO -- :
I, [2022-02-22T08:21:12.689628 #1]  INFO -- : > rm /root/upgrade_postgres
I, [2022-02-22T08:21:12.691132 #1]  INFO -- :
I, [2022-02-22T08:21:12.691909 #1]  INFO -- : Replacing data_directory = '/var/lib/postgresql/13/main' with data_directory = '/shared/postgres_data' in /etc/postgresql/13/main/postgresql.conf
I, [2022-02-22T08:21:12.692793 #1]  INFO -- : Replacing (?-mix:#?listen_addresses *=.*) with listen_addresses = '*' in /etc/postgresql/13/main/postgresql.conf
I, [2022-02-22T08:21:12.693061 #1]  INFO -- : Replacing (?-mix:#?synchronous_commit *=.*) with synchronous_commit = $db_synchronous_commit in /etc/postgresql/13/main/postgresql.conf
I, [2022-02-22T08:21:12.694234 #1]  INFO -- : Replacing (?-mix:#?shared_buffers *=.*) with shared_buffers = $db_shared_buffers in /etc/postgresql/13/main/postgresql.conf
I, [2022-02-22T08:21:12.695429 #1]  INFO -- : Replacing (?-mix:#?work_mem *=.*) with work_mem = $db_work_mem in /etc/postgresql/13/main/postgresql.conf
I, [2022-02-22T08:21:12.696458 #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, [2022-02-22T08:21:12.697816 #1]  INFO -- : > install -d -m 0755 -o postgres -g postgres /shared/postgres_backup
I, [2022-02-22T08:21:12.699718 #1]  INFO -- :
I, [2022-02-22T08:21:12.700026 #1]  INFO -- : Replacing (?-mix:#?checkpoint_segments *=.*) with checkpoint_segments = $db_checkpoint_segments in /etc/postgresql/13/main/postgresql.conf
I, [2022-02-22T08:21:12.700345 #1]  INFO -- : Replacing (?-mix:#?logging_collector *=.*) with logging_collector = $db_logging_collector in /etc/postgresql/13/main/postgresql.conf
I, [2022-02-22T08:21:12.701308 #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, [2022-02-22T08:21:12.702726 #1]  INFO -- : Replacing (?-mix:^#local +replication +postgres +peer$) with local replication postgres  peer in /etc/postgresql/13/main/pg_hba.conf
I, [2022-02-22T08:21:12.703317 #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, [2022-02-22T08:21:12.703578 #1]  INFO -- : Replacing (?-mix:^host.*all.*all.*::1\/128.*$) with host all all ::/0 md5 in /etc/postgresql/13/main/pg_hba.conf
I, [2022-02-22T08:21:12.704464 #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, [2022-02-22T08:21:12.705685 #1]  INFO -- : > sleep 5
2022-02-22 08:21:12.755 UTC [46] LOG:  starting PostgreSQL 13.5 (Debian 13.5-1.pgdg110+1) on x86_64-pc-linux-gnu, compiled by gcc (Debian 10.2.1-6) 10.2.1 20210110, 64-bit
2022-02-22 08:21:12.755 UTC [46] LOG:  listening on IPv4 address "0.0.0.0", port 5432
2022-02-22 08:21:12.755 UTC [46] LOG:  listening on IPv6 address "::", port 5432
2022-02-22 08:21:12.758 UTC [46] LOG:  listening on Unix socket "/var/run/postgresql/.s.PGSQL.5432"
2022-02-22 08:21:12.763 UTC [49] LOG:  database system was shut down at 2022-02-22 08:13:39 UTC
2022-02-22 08:21:12.767 UTC [46] LOG:  database system is ready to accept connections
I, [2022-02-22T08:21:17.708140 #1]  INFO -- :
I, [2022-02-22T08:21:17.708463 #1]  INFO -- : > su postgres -c 'createdb discourse' || true
2022-02-22 08:21:17.766 UTC [59] postgres@postgres ERROR:  database "discourse" already exists
2022-02-22 08:21:17.766 UTC [59] postgres@postgres STATEMENT:  CREATE DATABASE discourse;
createdb: error: database creation failed: ERROR:  database "discourse" already exists
I, [2022-02-22T08:21:17.767367 #1]  INFO -- :
I, [2022-02-22T08:21:17.767782 #1]  INFO -- : > su postgres -c 'psql discourse -c "create user discourse;"' || true
2022-02-22 08:21:17.816 UTC [63] postgres@discourse ERROR:  role "discourse" already exists
2022-02-22 08:21:17.816 UTC [63] postgres@discourse STATEMENT:  create user discourse;
ERROR:  role "discourse" already exists
I, [2022-02-22T08:21:17.817559 #1]  INFO -- :
I, [2022-02-22T08:21:17.817750 #1]  INFO -- : > su postgres -c 'psql discourse -c "grant all privileges on database discourse to discourse;"' || true
I, [2022-02-22T08:21:17.854582 #1]  INFO -- : GRANT

I, [2022-02-22T08:21:17.855017 #1]  INFO -- : > su postgres -c 'psql discourse -c "alter schema public owner to discourse;"'
I, [2022-02-22T08:21:17.895459 #1]  INFO -- : ALTER SCHEMA

I, [2022-02-22T08:21:17.895795 #1]  INFO -- : > su postgres -c 'psql template1 -c "create extension if not exists hstore;"'
NOTICE:  extension "hstore" already exists, skipping
I, [2022-02-22T08:21:17.944401 #1]  INFO -- : CREATE EXTENSION

I, [2022-02-22T08:21:17.944704 #1]  INFO -- : > su postgres -c 'psql template1 -c "create extension if not exists pg_trgm;"'
NOTICE:  extension "pg_trgm" already exists, skipping
I, [2022-02-22T08:21:17.981074 #1]  INFO -- : CREATE EXTENSION

I, [2022-02-22T08:21:17.981409 #1]  INFO -- : > su postgres -c 'psql discourse -c "create extension if not exists hstore;"'
NOTICE:  extension "hstore" already exists, skipping
I, [2022-02-22T08:21:18.018498 #1]  INFO -- : CREATE EXTENSION

I, [2022-02-22T08:21:18.018841 #1]  INFO -- : > su postgres -c 'psql discourse -c "create extension if not exists pg_trgm;"'
NOTICE:  extension "pg_trgm" already exists, skipping
I, [2022-02-22T08:21:18.055208 #1]  INFO -- : CREATE EXTENSION

I, [2022-02-22T08:21:18.055521 #1]  INFO -- : > sudo -u postgres psql discourse
I, [2022-02-22T08:21:18.057822 #1]  INFO -- : update pg_database set encoding = pg_char_to_encoding('UTF8') where datname = 'discourse' AND encoding = pg_char_to_encoding('SQL_ASCII');

I, [2022-02-22T08:21:18.119210 #1]  INFO -- : File > /var/lib/postgresql/take-database-backup  chmod: +x  chown: postgres:postgres
I, [2022-02-22T08:21:18.121365 #1]  INFO -- : File > /var/spool/cron/crontabs/postgres  chmod:   chown:
I, [2022-02-22T08:21:18.121491 #1]  INFO -- : > echo postgres installed!
I, [2022-02-22T08:21:18.122983 #1]  INFO -- : postgres installed!

I, [2022-02-22T08:21:18.126513 #1]  INFO -- : File > /etc/service/redis/run  chmod: +x  chown:
I, [2022-02-22T08:21:18.129812 #1]  INFO -- : File > /etc/service/redis/log/run  chmod: +x  chown:
I, [2022-02-22T08:21:18.133092 #1]  INFO -- : File > /etc/runit/3.d/10-redis  chmod: +x  chown:
I, [2022-02-22T08:21:18.134131 #1]  INFO -- : Replacing daemonize yes with  in /etc/redis/redis.conf
I, [2022-02-22T08:21:18.134890 #1]  INFO -- : Replacing (?-mix:^pidfile.*$) with  in /etc/redis/redis.conf
I, [2022-02-22T08:21:18.135254 #1]  INFO -- : > install -d -m 0755 -o redis -g redis /shared/redis_data
I, [2022-02-22T08:21:18.137042 #1]  INFO -- :
I, [2022-02-22T08:21:18.137554 #1]  INFO -- : Replacing (?-mix:^logfile.*$) with logfile "" in /etc/redis/redis.conf
I, [2022-02-22T08:21:18.137943 #1]  INFO -- : Replacing (?-mix:^bind .*$) with  in /etc/redis/redis.conf
I, [2022-02-22T08:21:18.139181 #1]  INFO -- : Replacing (?-mix:^dir .*$) with dir /shared/redis_data in /etc/redis/redis.conf
I, [2022-02-22T08:21:18.140462 #1]  INFO -- : Replacing (?-mix:^protected-mode yes) with protected-mode no in /etc/redis/redis.conf
I, [2022-02-22T08:21:18.142247 #1]  INFO -- : Replacing # io-threads 4 with io-threads $redis_io_threads in /etc/redis/redis.conf
I, [2022-02-22T08:21:18.143494 #1]  INFO -- : > echo redis installed
I, [2022-02-22T08:21:18.144940 #1]  INFO -- : redis installed

I, [2022-02-22T08:21:18.145155 #1]  INFO -- : > cat /etc/redis/redis.conf | grep logfile
I, [2022-02-22T08:21:18.149326 #1]  INFO -- : logfile ""

I, [2022-02-22T08:21:18.149561 #1]  INFO -- : > exec chpst -u redis -U redis /usr/bin/redis-server /etc/redis/redis.conf
I, [2022-02-22T08:21:18.150652 #1]  INFO -- : > sleep 10
107:C 22 Feb 2022 08:21:18.154 # oO0OoO0OoO0Oo Redis is starting oO0OoO0OoO0Oo
107:C 22 Feb 2022 08:21:18.154 # Redis version=6.2.6, bits=64, commit=00000000, modified=0, pid=107, just started
107:C 22 Feb 2022 08:21:18.154 # Configuration loaded
107:M 22 Feb 2022 08:21:18.155 # You requested maxclients of 10000 requiring at least 10032 max file descriptors.
107:M 22 Feb 2022 08:21:18.155 # Server can't set maximum open files to 10032 because of OS error: Operation not permitted.
107:M 22 Feb 2022 08:21:18.155 # Current maximum open files is 4096. maxclients has been reduced to 4064 to compensate for low ulimit. If you need higher maxclients increase 'ulimit -n'.
107:M 22 Feb 2022 08:21:18.155 * monotonic clock: POSIX clock_gettime
107:M 22 Feb 2022 08:21:18.155 * Running mode=standalone, port=6379.
107:M 22 Feb 2022 08:21:18.155 # WARNING: The TCP backlog setting of 511 cannot be enforced because /proc/sys/net/core/somaxconn is set to the lower value of 128.
107:M 22 Feb 2022 08:21:18.155 # Server initialized
107:M 22 Feb 2022 08:21:18.155 # WARNING overcommit_memory is set to 0! Background save may fail under low memory condition. 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.
107:M 22 Feb 2022 08:21:18.155 * Loading RDB produced by version 6.2.6
107:M 22 Feb 2022 08:21:18.155 * RDB age 459 seconds
107:M 22 Feb 2022 08:21:18.155 * RDB memory usage when created 0.51 Mb
107:M 22 Feb 2022 08:21:18.155 # Done loading RDB, keys loaded: 0, keys expired: 0.
107:M 22 Feb 2022 08:21:18.155 * DB loaded from disk: 0.000 seconds
107:M 22 Feb 2022 08:21:18.155 * Ready to accept connections
I, [2022-02-22T08:21:28.152464 #1]  INFO -- :
I, [2022-02-22T08:21:28.152702 #1]  INFO -- : > thpoff echo "thpoff is installed!"
I, [2022-02-22T08:21:28.156238 #1]  INFO -- : thpoff is installed!

I, [2022-02-22T08:21:28.156532 #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, [2022-02-22T08:21:28.207967 #1]  INFO -- :
I, [2022-02-22T08:21:28.208259 #1]  INFO -- : > /usr/local/bin/ruby -e 'if ENV["DISCOURSE_HOSTNAME"] == "discourse.example.com"; puts "Aborting! Domain is not configured!"; exit 1; end'
I, [2022-02-22T08:21:28.259618 #1]  INFO -- :
I, [2022-02-22T08:21:28.259908 #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, [2022-02-22T08:21:28.310823 #1]  INFO -- :
I, [2022-02-22T08:21:28.311170 #1]  INFO -- : > rm -f /etc/cron.d/anacron
I, [2022-02-22T08:21:28.313524 #1]  INFO -- :
I, [2022-02-22T08:21:28.315825 #1]  INFO -- : File > /etc/cron.d/anacron  chmod:   chown:
I, [2022-02-22T08:21:28.319505 #1]  INFO -- : File > /etc/runit/1.d/copy-env  chmod: +x  chown:
I, [2022-02-22T08:21:28.323047 #1]  INFO -- : File > /etc/service/unicorn/run  chmod: +x  chown:
I, [2022-02-22T08:21:28.326586 #1]  INFO -- : File > /etc/service/nginx/run  chmod: +x  chown:
I, [2022-02-22T08:21:28.330169 #1]  INFO -- : File > /etc/runit/3.d/01-nginx  chmod: +x  chown:
I, [2022-02-22T08:21:28.333479 #1]  INFO -- : File > /etc/runit/3.d/02-unicorn  chmod: +x  chown:
I, [2022-02-22T08:21:28.333694 #1]  INFO -- : Replacing # postgres with sv start postgres || exit 1 in /etc/service/unicorn/run
I, [2022-02-22T08:21:28.333983 #1]  INFO -- : > exec chpst -u redis -U redis /usr/bin/redis-server /etc/redis/redis.conf
I, [2022-02-22T08:21:28.336276 #1]  INFO -- : > cd /var/www/discourse && git reset --hard
135:C 22 Feb 2022 08:21:28.339 # oO0OoO0OoO0Oo Redis is starting oO0OoO0OoO0Oo
135:C 22 Feb 2022 08:21:28.339 # Redis version=6.2.6, bits=64, commit=00000000, modified=0, pid=135, just started
135:C 22 Feb 2022 08:21:28.339 # Configuration loaded
135:M 22 Feb 2022 08:21:28.339 # You requested maxclients of 10000 requiring at least 10032 max file descriptors.
135:M 22 Feb 2022 08:21:28.339 # Server can't set maximum open files to 10032 because of OS error: Operation not permitted.
135:M 22 Feb 2022 08:21:28.339 # Current maximum open files is 4096. maxclients has been reduced to 4064 to compensate for low ulimit. If you need higher maxclients increase 'ulimit -n'.
135:M 22 Feb 2022 08:21:28.339 * monotonic clock: POSIX clock_gettime
135:M 22 Feb 2022 08:21:28.340 # Warning: Could not create server TCP listening socket *:6379: bind: Address already in use
135:M 22 Feb 2022 08:21:28.340 # Failed listening on port 6379 (TCP), aborting.
Updating files: 100% (30947/30947), done.
I, [2022-02-22T08:21:30.442648 #1]  INFO -- : HEAD is now at e1367cde I18N: Improve copy on blocked words error messages (#15741)

I, [2022-02-22T08:21:30.442917 #1]  INFO -- : > cd /var/www/discourse && git clean -f
I, [2022-02-22T08:21:30.509182 #1]  INFO -- :
I, [2022-02-22T08:21:30.509397 #1]  INFO -- : > cd /var/www/discourse && git remote set-branches --add origin main
I, [2022-02-22T08:21:30.512571 #1]  INFO -- :
I, [2022-02-22T08:21:30.512789 #1]  INFO -- : > cd /var/www/discourse && git remote set-branches origin tests-passed
I, [2022-02-22T08:21:30.515411 #1]  INFO -- :
I, [2022-02-22T08:21:30.515601 #1]  INFO -- : > cd /var/www/discourse && git fetch --depth 1 origin tests-passed
From https://github.com/discourse/discourse
 * branch              tests-passed -> FETCH_HEAD
 * [new branch]        tests-passed -> origin/tests-passed
I, [2022-02-22T08:21:32.341205 #1]  INFO -- :
I, [2022-02-22T08:21:32.341470 #1]  INFO -- : > cd /var/www/discourse && git checkout tests-passed
Switched to a new branch 'tests-passed'
I, [2022-02-22T08:21:33.021385 #1]  INFO -- : Branch 'tests-passed' set up to track remote branch 'tests-passed' from 'origin'.

I, [2022-02-22T08:21:33.021535 #1]  INFO -- : > cd /var/www/discourse && mkdir -p tmp
I, [2022-02-22T08:21:33.024684 #1]  INFO -- :
I, [2022-02-22T08:21:33.024794 #1]  INFO -- : > cd /var/www/discourse && chown discourse:www-data tmp
I, [2022-02-22T08:21:33.027266 #1]  INFO -- :
I, [2022-02-22T08:21:33.027413 #1]  INFO -- : > cd /var/www/discourse && mkdir -p tmp/pids
I, [2022-02-22T08:21:33.029784 #1]  INFO -- :
I, [2022-02-22T08:21:33.030010 #1]  INFO -- : > cd /var/www/discourse && mkdir -p tmp/sockets
I, [2022-02-22T08:21:33.032263 #1]  INFO -- :
I, [2022-02-22T08:21:33.032456 #1]  INFO -- : > cd /var/www/discourse && touch tmp/.gitkeep
I, [2022-02-22T08:21:33.034815 #1]  INFO -- :
I, [2022-02-22T08:21:33.035028 #1]  INFO -- : > cd /var/www/discourse && mkdir -p                    /shared/log/rails
I, [2022-02-22T08:21:33.037266 #1]  INFO -- :
I, [2022-02-22T08:21:33.037463 #1]  INFO -- : > cd /var/www/discourse && bash -c "touch -a           /shared/log/rails/{production,production_errors,unicorn.stdout,unicorn.stderr,sidekiq}.log"
I, [2022-02-22T08:21:33.040552 #1]  INFO -- :
I, [2022-02-22T08:21:33.040758 #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, [2022-02-22T08:21:33.043837 #1]  INFO -- :
I, [2022-02-22T08:21:33.044024 #1]  INFO -- : > cd /var/www/discourse && bash -c "mkdir -p           /shared/{uploads,backups}"
I, [2022-02-22T08:21:33.047144 #1]  INFO -- :
I, [2022-02-22T08:21:33.047320 #1]  INFO -- : > cd /var/www/discourse && bash -c "ln    -s           /shared/{uploads,backups} /var/www/discourse/public"
I, [2022-02-22T08:21:33.050328 #1]  INFO -- :
I, [2022-02-22T08:21:33.050515 #1]  INFO -- : > cd /var/www/discourse && bash -c "mkdir -p           /shared/tmp/{backups,restores}"
I, [2022-02-22T08:21:33.053664 #1]  INFO -- :
I, [2022-02-22T08:21:33.053836 #1]  INFO -- : > cd /var/www/discourse && bash -c "ln    -s           /shared/tmp/{backups,restores} /var/www/discourse/tmp"
I, [2022-02-22T08:21:33.056727 #1]  INFO -- :
I, [2022-02-22T08:21:33.056929 #1]  INFO -- : > cd /var/www/discourse && chown -R discourse:www-data /shared/log/rails /shared/uploads /shared/backups /shared/tmp
I, [2022-02-22T08:21:33.059662 #1]  INFO -- :
I, [2022-02-22T08:21:33.059865 #1]  INFO -- : > cd /var/www/discourse && find public/plugins/ -maxdepth 1 -xtype l -delete
I, [2022-02-22T08:21:33.062730 #1]  INFO -- :
I, [2022-02-22T08:21:33.062992 #1]  INFO -- : Replacing # redis with sv start redis || exit 1 in /etc/service/unicorn/run
I, [2022-02-22T08:21:33.063296 #1]  INFO -- : > apt-get update && apt-get install -y default-libmysqlclient-dev
debconf: delaying package configuration, since apt-utils is not installed
I, [2022-02-22T08:21:37.228124 #1]  INFO -- : Get:1 http://security.debian.org/debian-security bullseye-security InRelease [44.1 kB]
Hit:2 http://deb.debian.org/debian bullseye InRelease
Get:3 http://deb.debian.org/debian bullseye-updates InRelease [39.4 kB]
Get:4 http://deb.debian.org/debian bullseye-backports InRelease [44.2 kB]
Hit:5 https://dl.yarnpkg.com/debian stable InRelease
Get:6 https://deb.nodesource.com/node_16.x bullseye InRelease [4,586 B]
Get:7 http://apt.postgresql.org/pub/repos/apt bullseye-pgdg InRelease [86.7 kB]
Get:8 http://security.debian.org/debian-security bullseye-security/main amd64 Packages [120 kB]
Get:9 http://deb.debian.org/debian bullseye-backports/main amd64 Packages.diff/Index [63.3 kB]
Get:10 https://deb.nodesource.com/node_16.x bullseye/main amd64 Packages [775 B]
Get:11 http://deb.debian.org/debian bullseye-backports/main amd64 Packages T-2022-02-21-2006.35-F-2022-01-30-1410.41.pdiff [74.1 kB]
Get:11 http://deb.debian.org/debian bullseye-backports/main amd64 Packages T-2022-02-21-2006.35-F-2022-01-30-1410.41.pdiff [74.1 kB]
Get:12 http://apt.postgresql.org/pub/repos/apt bullseye-pgdg/main amd64 Packages [240 kB]
Fetched 716 kB in 1s (1,073 kB/s)
Reading package lists...
Reading package lists...
Building dependency tree...
Reading state information...
The following additional packages will be installed:
  libmariadb-dev libmariadb-dev-compat libmariadb3 mariadb-common mysql-common
The following NEW packages will be installed:
  default-libmysqlclient-dev libmariadb-dev libmariadb-dev-compat libmariadb3
  mariadb-common mysql-common
0 upgraded, 6 newly installed, 0 to remove and 9 not upgraded.
Need to get 441 kB of archives.
After this operation, 1,546 kB of additional disk space will be used.
Get:1 http://deb.debian.org/debian bullseye/main amd64 mysql-common all 5.8+1.0.7 [7,464 B]
Get:2 http://deb.debian.org/debian bullseye/main amd64 mariadb-common all 1:10.5.12-0+deb11u1 [36.3 kB]
Get:3 http://deb.debian.org/debian bullseye/main amd64 libmariadb3 amd64 1:10.5.12-0+deb11u1 [175 kB]
Get:4 http://deb.debian.org/debian bullseye/main amd64 libmariadb-dev amd64 1:10.5.12-0+deb11u1 [184 kB]
Get:5 http://deb.debian.org/debian bullseye/main amd64 libmariadb-dev-compat amd64 1:10.5.12-0+deb11u1 [35.1 kB]
Get:6 http://deb.debian.org/debian bullseye/main amd64 default-libmysqlclient-dev amd64 1.0.7 [3,936 B]
Fetched 441 kB in 0s (22.0 MB/s)
Selecting previously unselected package mysql-common.
(Reading database ... 41616 files and directories currently installed.)
Preparing to unpack .../0-mysql-common_5.8+1.0.7_all.deb ...
Unpacking mysql-common (5.8+1.0.7) ...
Selecting previously unselected package mariadb-common.
Preparing to unpack .../1-mariadb-common_1%3a10.5.12-0+deb11u1_all.deb ...
Unpacking mariadb-common (1:10.5.12-0+deb11u1) ...
Selecting previously unselected package libmariadb3:amd64.
Preparing to unpack .../2-libmariadb3_1%3a10.5.12-0+deb11u1_amd64.deb ...
Unpacking libmariadb3:amd64 (1:10.5.12-0+deb11u1) ...
Selecting previously unselected package libmariadb-dev.
Preparing to unpack .../3-libmariadb-dev_1%3a10.5.12-0+deb11u1_amd64.deb ...
Unpacking libmariadb-dev (1:10.5.12-0+deb11u1) ...
Selecting previously unselected package libmariadb-dev-compat:amd64.
Preparing to unpack .../4-libmariadb-dev-compat_1%3a10.5.12-0+deb11u1_amd64.deb ...
Unpacking libmariadb-dev-compat:amd64 (1:10.5.12-0+deb11u1) ...
Selecting previously unselected package default-libmysqlclient-dev:amd64.
Preparing to unpack .../5-default-libmysqlclient-dev_1.0.7_amd64.deb ...
Unpacking default-libmysqlclient-dev:amd64 (1.0.7) ...
Setting up mysql-common (5.8+1.0.7) ...
update-alternatives: using /etc/mysql/my.cnf.fallback to provide /etc/mysql/my.cnf (my.cnf) in auto mode
Setting up mariadb-common (1:10.5.12-0+deb11u1) ...
update-alternatives: using /etc/mysql/mariadb.cnf to provide /etc/mysql/my.cnf (my.cnf) in auto mode
Setting up libmariadb3:amd64 (1:10.5.12-0+deb11u1) ...
Setting up libmariadb-dev (1:10.5.12-0+deb11u1) ...
Setting up libmariadb-dev-compat:amd64 (1:10.5.12-0+deb11u1) ...
Setting up default-libmysqlclient-dev:amd64 (1.0.7) ...
Processing triggers for libc-bin (2.31-13+deb11u2) ...

I, [2022-02-22T08:21:37.228856 #1]  INFO -- : > cd /var/www/discourse/plugins && git clone https://9900af0b4d21567fdc2e737907cc354581075218@github.com/codechef-org/discourse-codechef-email-handler.git
Cloning into 'discourse-codechef-email-handler'...
I, [2022-02-22T08:21:37.562336 #1]  INFO -- :
I, [2022-02-22T08:21:37.562651 #1]  INFO -- : > cd /var/www/discourse/plugins && git clone https://9900af0b4d21567fdc2e737907cc354581075218@github.com/codechef-org/discourse-codechef-user-custom.git
Cloning into 'discourse-codechef-user-custom'...
I, [2022-02-22T08:21:37.868040 #1]  INFO -- :
I, [2022-02-22T08:21:37.868255 #1]  INFO -- : > cd /var/www/discourse/plugins && git clone https://github.com/discourse/discourse-math.git
Cloning into 'discourse-math'...
I, [2022-02-22T08:21:38.617251 #1]  INFO -- :
I, [2022-02-22T08:21:38.617635 #1]  INFO -- : > cd /var/www/discourse/plugins && git clone https://9900af0b4d21567fdc2e737907cc354581075218@github.com/codechef-org/discourse-codechef-api-custom.git
Cloning into 'discourse-codechef-api-custom'...
I, [2022-02-22T08:21:38.945074 #1]  INFO -- :
I, [2022-02-22T08:21:38.945255 #1]  INFO -- : > cd /var/www/discourse/plugins && git clone https://9900af0b4d21567fdc2e737907cc354581075218@github.com/codechef-org/discourse-codechef-scripts.git
Cloning into 'discourse-codechef-scripts'...
I, [2022-02-22T08:21:39.292678 #1]  INFO -- :
I, [2022-02-22T08:21:39.293110 #1]  INFO -- : > cp /var/www/discourse/config/nginx.sample.conf /etc/nginx/conf.d/discourse.conf
I, [2022-02-22T08:21:39.295946 #1]  INFO -- :
I, [2022-02-22T08:21:39.296192 #1]  INFO -- : > rm /etc/nginx/sites-enabled/default
I, [2022-02-22T08:21:39.297983 #1]  INFO -- :
I, [2022-02-22T08:21:39.298102 #1]  INFO -- : > mkdir -p /var/nginx/cache
I, [2022-02-22T08:21:39.299942 #1]  INFO -- :
I, [2022-02-22T08:21:39.300716 #1]  INFO -- : Replacing pid /run/nginx.pid; with daemon off; in /etc/nginx/nginx.conf
I, [2022-02-22T08:21:39.301003 #1]  INFO -- : Replacing (?m-ix:upstream[^\}]+\}) with upstream discourse { server 127.0.0.1:3000; } in /etc/nginx/conf.d/discourse.conf
I, [2022-02-22T08:21:39.301303 #1]  INFO -- : Replacing (?-mix:server_name.+$) with server_name _ ; in /etc/nginx/conf.d/discourse.conf
I, [2022-02-22T08:21:39.302315 #1]  INFO -- : Replacing (?-mix:client_max_body_size.+$) with client_max_body_size $upload_size ; in /etc/nginx/conf.d/discourse.conf
I, [2022-02-22T08:21:39.303106 #1]  INFO -- : Replacing (?-mix:worker_connections.+$) with worker_connections $nginx_worker_connections ; in /etc/nginx/conf.d/discourse.conf
I, [2022-02-22T08:21:39.303830 #1]  INFO -- : > echo "done configuring web"
I, [2022-02-22T08:21:39.305463 #1]  INFO -- : done configuring web

I, [2022-02-22T08:21:39.305781 #1]  INFO -- : > cd /var/www/discourse && gem install bundler --conservative -v $(awk '/BUNDLED WITH/ { getline; gsub(/ /,""); print $0 }' Gemfile.lock)
I, [2022-02-22T08:21:39.675856 #1]  INFO -- : Successfully installed bundler-2.3.4
1 gem installed

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

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

修正にご協力ください。.
2: stackprof (0.2.18) from /var/www/discourse/vendor/bundle/ruby/2.7.0/specifications/stackprof-0.2.18.gemspec
unf_ext 0.0.8 を使用しています
2: unf_ext (0.0.8) from /var/www/discourse/vendor/bundle/ruby/2.7.0/specifications/unf_ext-0.0.8.gemspec
xorcist 1.1.2 を使用しています
2: xorcist (1.1.2) from /var/www/discourse/vendor/bundle/ruby/2.7.0/specifications/xorcist-1.1.2.gemspec
i18n 1.10.0 を取得中
i18n 1.10.0 をインストール中
2: i18n (1.10.0) from /var/www/discourse/vendor/bundle/ruby/2.7.0/specifications/i18n-1.10.0.gemspec
tzinfo 2.0.4 を使用しています
2: tzinfo (2.0.4) from /var/www/discourse/vendor/bundle/ruby/2.7.0/specifications/tzinfo-2.0.4.gemspec
nokogiri 1.13.1 (x86_64-linux) を取得中
nokogiri 1.13.1 (x86_64-linux) をインストール中
2: nokogiri (1.13.1) from /var/www/discourse/vendor/bundle/ruby/2.7.0/specifications/nokogiri-1.13.1-x86_64-linux.gemspec
rack-test 1.1.0 を使用しています
2: rack-test (1.1.0) from /var/www/discourse/vendor/bundle/ruby/2.7.0/specifications/rack-test-1.1.0.gemspec
addressable 2.8.0 を使用しています
2: addressable (2.8.0) from /var/www/discourse/vendor/bundle/ruby/2.7.0/specifications/addressable-2.8.0.gemspec
aws-sigv4 1.4.0 を使用しています
2: aws-sigv4 (1.4.0) from /var/www/discourse/vendor/bundle/ruby/2.7.0/specifications/aws-sigv4-1.4.0.gemspec
barber 0.12.2 を使用しています
2: barber (0.12.2) from /var/www/discourse/vendor/bundle/ruby/2.7.0/specifications/barber-0.12.2.gemspec
ember-data-source 3.0.2 を使用しています
2: ember-data-source (3.0.2) from /var/www/discourse/vendor/bundle/ruby/2.7.0/specifications/ember-data-source-3.0.2.gemspec
sprockets 3.7.2 を使用しています
2: sprockets (3.7.2) from /var/www/discourse/vendor/bundle/ruby/2.7.0/specifications/sprockets-3.7.2.gemspec
request_store 1.5.1 を取得中
request_store 1.5.1 をインストール中
2: request_store (1.5.1) from /var/www/discourse/vendor/bundle/ruby/2.7.0/specifications/request_store-1.5.1.gemspec
message_bus 4.1.0 を取得中
message_bus 4.1.0 をインストール中
2: message_bus (4.1.0) from /var/www/discourse/vendor/bundle/ruby/2.7.0/specifications/message_bus-4.1.0.gemspec
rack-mini-profiler 2.3.3 を使用しています
2: rack-mini-profiler (2.3.3) from /var/www/discourse/vendor/bundle/ruby/2.7.0/specifications/rack-mini-profiler-2.3.3.gemspec
rack-protection 2.2.0 を取得中
rack-protection 2.2.0 をインストール中
2: rack-protection (2.2.0) from /var/www/discourse/vendor/bundle/ruby/2.7.0/specifications/rack-protection-2.2.0.gemspec
uglifier 4.2.0 を使用しています
2: uglifier (4.2.0) from /var/www/discourse/vendor/bundle/ruby/2.7.0/specifications/uglifier-4.2.0.gemspec
mail 2.8.0.edge を GitHub - discourse/mail: A Really Ruby Mail Library · GitHub から使用しています (at main@5b700fc)
2: mail (2.8.0.edge) from /var/www/discourse/vendor/bundle/ruby/2.7.0/bundler/gems/mail-5b700fc95ee6/mail.gemspec
openssl 2.2.1 を使用しています
2: openssl (2.2.1) from /var/www/discourse/vendor/bundle/ruby/2.7.0/specifications/openssl-2.2.1.gemspec
pry 0.13.1 を使用しています
2: pry (0.13.1) from /var/www/discourse/vendor/bundle/ruby/2.7.0/specifications/pry-0.13.1.gemspec
ecma-re-validator 0.4.0 を使用しています
2: ecma-re-validator (0.4.0) from /var/www/discourse/vendor/bundle/ruby/2.7.0/specifications/ecma-re-validator-0.4.0.gemspec
faraday-multipart 1.0.3 を使用しています
2: faraday-multipart (1.0.3) from /var/www/discourse/vendor/bundle/ruby/2.7.0/specifications/faraday-multipart-1.0.3.gemspec
mini_suffix 0.3.3 を使用しています
2: mini_suffix (0.3.3) from /var/www/discourse/vendor/bundle/ruby/2.7.0/specifications/mini_suffix-0.3.3.gemspec
omniauth 1.9.1 を使用しています
2: omniauth (1.9.1) from /var/www/discourse/vendor/bundle/ruby/2.7.0/specifications/omniauth-1.9.1.gemspec
sassc 2.0.1 を使用しています
2: sassc (2.0.1) from /var/www/discourse/vendor/bundle/ruby/2.7.0/specifications/sassc-2.0.1.gemspec
image_optim 0.31.1 を使用しています
2: image_optim (0.31.1) from /var/www/discourse/vendor/bundle/ruby/2.7.0/specifications/image_optim-0.31.1.gemspec
logstash-logger 0.26.1 を使用しています
2: logstash-logger (0.26.1) from /var/www/discourse/vendor/bundle/ruby/2.7.0/specifications/logstash-logger-0.26.1.gemspec
mini_racer 0.6.2 を取得中
mini_racer 0.6.2 をネイティブ拡張とともにインストール中
ネイティブ拡張をビルドしています。これには時間がかかる場合があります…
1: cppjieba_rb (0.4.2) from /var/www/discourse/vendor/bundle/ruby/2.7.0/specifications/cppjieba_rb-0.4.2.gemspec
sidekiq 6.4.1 を取得中
sidekiq 6.4.1 をインストール中
1: sidekiq (6.4.1) from /var/www/discourse/vendor/bundle/ruby/2.7.0/specifications/sidekiq-6.4.1.gemspec
redis-namespace 1.8.1 を使用しています
1: redis-namespace (1.8.1) from /var/www/discourse/vendor/bundle/ruby/2.7.0/specifications/redis-namespace-1.8.1.gemspec
webpush 1.1.0 を使用しています
1: webpush (1.1.0) from /var/www/discourse/vendor/bundle/ruby/2.7.0/specifications/webpush-1.1.0.gemspec
puma 5.6.2 を取得中
puma 5.6.2 をネイティブ拡張とともにインストール中
ネイティブ拡張をビルドしています。これには時間がかかる場合があります…
3: pg (1.3.2) from /var/www/discourse/vendor/bundle/ruby/2.7.0/specifications/pg-1.3.2.gemspec
bootsnap 1.10.3 を取得中
bootsnap 1.10.3 をネイティブ拡張とともにインストール中
ネイティブ拡張をビルドしています。これには時間がかかる場合があります…
3: bootsnap (1.10.3) from /var/www/discourse/vendor/bundle/ruby/2.7.0/specifications/bootsnap-1.10.3.gemspec
rbtrace 0.4.14 を使用しています
3: rbtrace (0.4.14) from /var/www/discourse/vendor/bundle/ruby/2.7.0/specifications/rbtrace-0.4.14.gemspec
rqrcode 2.1.1 を取得中
rqrcode 2.1.1 をインストール中
3: rqrcode (2.1.1) from /var/www/discourse/vendor/bundle/ruby/2.7.0/specifications/rqrcode-2.1.1.gemspec
rss 0.2.9 を使用しています
3: rss (0.2.9) from /var/www/discourse/vendor/bundle/ruby/2.7.0/specifications/rss-0.2.9.gemspec
unicorn 6.1.0 を使用しています
3: unicorn (6.1.0) from /var/www/discourse/vendor/bundle/ruby/2.7.0/specifications/unicorn-6.1.0.gemspec
unf 0.1.4 を使用しています
3: unf (0.1.4) from /var/www/discourse/vendor/bundle/ruby/2.7.0/specifications/unf-0.1.4.gemspec
activesupport 6.1.4.1 を使用しています
3: activesupport (6.1.4.1) from /var/www/discourse/vendor/bundle/ruby/2.7.0/specifications/activesupport-6.1.4.1.gemspec
loofah 2.14.0 を取得中
loofah 2.14.0 をインストール中
3: loofah (2.14.0) from /var/www/discourse/vendor/bundle/ruby/2.7.0/specifications/loofah-2.14.0.gemspec
ruby-readability 0.7.0 を使用しています
3: ruby-readability (0.7.0) from /var/www/discourse/vendor/bundle/ruby/2.7.0/specifications/ruby-readability-0.7.0.gemspec
sanitize 6.0.0 を使用しています
3: sanitize (6.0.0) from /var/www/discourse/vendor/bundle/ruby/2.7.0/specifications/sanitize-6.0.0.gemspec
css_parser 1.11.0 を使用しています
3: css_parser (1.11.0) from /var/www/discourse/vendor/bundle/ruby/2.7.0/specifications/css_parser-1.11.0.gemspec
aws-sdk-core 3.121.2 を使用しています
3: aws-sdk-core (3.121.2) from /var/www/discourse/vendor/bundle/ruby/2.7.0/specifications/aws-sdk-core-3.121.2.gemspec
ember-handlebars-template 0.8.0 を使用しています
3: ember-handlebars-template (0.8.0) from /var/www/discourse/vendor/bundle/ruby/2.7.0/specifications/ember-handlebars-template-0.8.0.gemspec
openssl-signature_algorithm 1.1.1 を使用しています
3: openssl-signature_algorithm (1.1.1) from /var/www/discourse/vendor/bundle/ruby/2.7.0/specifications/openssl-signature_algorithm-1.1.1.gemspec
json_schemer 0.2.19 を取得中
json_schemer 0.2.19 をインストール中
3: json_schemer (0.2.19) from /var/www/discourse/vendor/bundle/ruby/2.7.0/specifications/json_schemer-0.2.19.gemspec
pry-byebug 3.9.0 を使用しています
3: pry-byebug (3.9.0) from /var/www/discourse/vendor/bundle/ruby/2.7.0/specifications/pry-byebug-3.9.0.gemspec
pry-rails 0.3.9 を使用しています
3: pry-rails (0.3.9) from /var/www/discourse/vendor/bundle/ruby/2.7.0/specifications/pry-rails-0.3.9.gemspec
faraday 1.10.0 を取得中
faraday 1.10.0 をインストール中
3: faraday (1.10.0) from /var/www/discourse/vendor/bundle/ruby/2.7.0/specifications/faraday-1.10.0.gemspec
omniauth-oauth 1.2.0 を使用しています
3: omniauth-oauth (1.2.0) from /var/www/discourse/vendor/bundle/ruby/2.7.0/specifications/omniauth-oauth-1.2.0.gemspec
mini_scheduler 0.13.0 を使用しています
3: mini_scheduler (0.13.0) from /var/www/discourse/vendor/bundle/ruby/2.7.0/specifications/mini_scheduler-0.13.0.gemspec
rails-dom-testing 2.0.3 を使用しています
3: rails-dom-testing (2.0.3) from /var/www/discourse/vendor/bundle/ruby/2.7.0/specifications/rails-dom-testing-2.0.3.gemspec
globalid 1.0.0 を使用しています
3: globalid (1.0.0) from /var/www/discourse/vendor/bundle/ruby/2.7.0/specifications/globalid-1.0.0.gemspec
activemodel 6.1.4.1 を使用しています
3: activemodel (6.1.4.1) from /var/www/discourse/vendor/bundle/ruby/2.7.0/specifications/activemodel-6.1.4.1.gemspec
rails-html-sanitizer 1.4.2 を使用しています
3: rails-html-sanitizer (1.4.2) from /var/www/discourse/vendor/bundle/ruby/2.7.0/specifications/rails-html-sanitizer-1.4.2.gemspec
aws-sdk-kms 1.44.0 を使用しています
3: aws-sdk-kms (1.44.0) from /var/www/discourse/vendor/bundle/ruby/2.7.0/specifications/aws-sdk-kms-1.44.0.gemspec
aws-sdk-sns 1.46.0 を使用しています
3: aws-sdk-sns (1.46.0) from /var/www/discourse/vendor/bundle/ruby/2.7.0/specifications/aws-sdk-sns-1.46.0.gemspec
cose 1.2.0 を使用しています
3: cose (1.2.0) from /var/www/discourse/vendor/bundle/ruby/2.7.0/specifications/cose-1.2.0.gemspec
oauth2 1.4.7 を使用しています
3: oauth2 (1.4.7) from /var/www/discourse/vendor/bundle/ruby/2.7.0/specifications/oauth2-1.4.7.gemspec
omniauth-twitter 1.4.0 を使用しています
3: omniauth-twitter (1.4.0) from /var/www/discourse/vendor/bundle/ruby/2.7.0/specifications/omniauth-twitter-1.4.0.gemspec
activejob 6.1.4.1 を使用しています
3: activejob (6.1.4.1) from /var/www/discourse/vendor/bundle/ruby/2.7.0/specifications/activejob-6.1.4.1.gemspec
active_model_serializers 0.8.4 を使用しています
3: active_model_serializers (0.8.4) from /var/www/discourse/vendor/bundle/ruby/2.7.0/specifications/active_model_serializers-0.8.4.gemspec
activerecord 6.1.4.1 を使用しています
3: activerecord (6.1.4.1) from /var/www/discourse/vendor/bundle/ruby/2.7.0/specifications/activerecord-6.1.4.1.gemspec
actionview 6.1.4.1 を使用しています
3: actionview (6.1.4.1) from /var/www/discourse/vendor/bundle/ruby/2.7.0/specifications/actionview-6.1.4.1.gemspec
aws-sdk-s3 1.96.1 を使用しています
3: aws-sdk-s3 (1.96.1) from /var/www/discourse/vendor/bundle/ruby/2.7.0/specifications/aws-sdk-s3-1.96.1.gemspec
actionpack 6.1.4.1 を使用しています
3: actionpack (6.1.4.1) from /var/www/discourse/vendor/bundle/ruby/2.7.0/specifications/actionpack-6.1.4.1.gemspec
actionview_precompiler 0.2.3 を使用しています
3: actionview_precompiler (0.2.3) from /var/www/discourse/vendor/bundle/ruby/2.7.0/specifications/actionview_precompiler-0.2.3.gemspec
omniauth-oauth2 1.7.2 を使用しています
3: omniauth-oauth2 (1.7.2) from /var/www/discourse/vendor/bundle/ruby/2.7.0/specifications/omniauth-oauth2-1.7.2.gemspec
seed-fu 2.3.9 を使用しています
3: seed-fu (2.3.9) from /var/www/discourse/vendor/bundle/ruby/2.7.0/specifications/seed-fu-2.3.9.gemspec
actionmailer 6.1.4.1 を使用しています
3: actionmailer (6.1.4.1) from /var/www/discourse/vendor/bundle/ruby/2.7.0/specifications/actionmailer-6.1.4.1.gemspec
railties 6.1.4.1 を使用しています
3: railties (6.1.4.1) from /var/www/discourse/vendor/bundle/ruby/2.7.0/specifications/railties-6.1.4.1.gemspec
omniauth-facebook 9.0.0 を使用しています
3: omniauth-facebook (9.0.0) from /var/www/discourse/vendor/bundle/ruby/2.7.0/specifications/omniauth-facebook-9.0.0.gemspec
omniauth-github 1.4.0 を使用しています
3: omniauth-github (1.4.0) from /var/www/discourse/vendor/bundle/ruby/2.7.0/specifications/omniauth-github-1.4.0.gemspec
omniauth-google-oauth2 0.8.2 を使用しています
3: omniauth-google-oauth2 (0.8.2) from /var/www/discourse/vendor/bundle/ruby/2.7.0/specifications/omniauth-google-oauth2-0.8.2.gemspec
sprockets-rails 3.4.2 を使用しています
3: sprockets-rails (3.4.2) from /var/www/discourse/vendor/bundle/ruby/2.7.0/specifications/sprockets-rails-3.4.2.gemspec
jquery-rails 4.4.0 を使用しています
3: jquery-rails (4.4.0) from /var/www/discourse/vendor/bundle/ruby/2.7.0/specifications/jquery-rails-4.4.0.gemspec
lograge 0.11.2 を使用しています
3: lograge (0.11.2) from /var/www/discourse/vendor/bundle/ruby/2.7.0/specifications/lograge-0.11.2.gemspec
rails_failover 0.8.1 を取得中
rails_failover 0.8.1 をインストール中
3: rails_failover (0.8.1) from /var/www/discourse/vendor/bundle/ruby/2.7.0/specifications/rails_failover-0.8.1.gemspec
rails_multisite 4.0.0 を使用しています
3: rails_multisite (4.0.0) from /var/www/discourse/vendor/bundle/ruby/2.7.0/specifications/rails_multisite-4.0.0.gemspec
sassc-rails 2.1.2 を使用しています
3: sassc-rails (2.1.2) from /var/www/discourse/vendor/bundle/ruby/2.7.0/specifications/sassc-rails-2.1.2.gemspec
discourse-ember-rails 0.18.6 を使用しています
3: discourse-ember-rails (0.18.6) from /var/www/discourse/vendor/bundle/ruby/2.7.0/specifications/discourse-ember-rails-0.18.6.gemspec
1: puma (5.6.2) from /var/www/discourse/vendor/bundle/ruby/2.7.0/specifications/puma-5.6.2.gemspec
2: mini_racer (0.6.2) from /var/www/discourse/vendor/bundle/ruby/2.7.0/specifications/mini_racer-0.6.2.gemspec
0: oj (3.13.11) from /var/www/discourse/vendor/bundle/ruby/2.7.0/specifications/oj-3.13.11.gemspec
Bundle complete! 126 Gemfile dependencies, 176 gems now installed.
Gems in the groups ‘test’ and ‘development’ were not installed.
Bundled gems are installed into ./vendor/bundle

I, [2022-02-22T08:22:12.052124 #1] INFO – : > cd /var/www/discourse && [ ! -d ‘node_modules’ ] || su discourse -c ‘yarn install --production && yarn cache clean’
warning Resolution field “lodash@4.17.21” is incompatible with requested version “lodash@4.17.15”
warning " > @mixer/parallel-prettier@2.0.1" has unmet peer dependency “prettier@^2.0.0”.
I, [2022-02-22T08:23:07.016495 #1] INFO – : yarn install v1.22.17
[1/5] Validating package.json…
[2/5] Resolving packages…
[3/5] Fetching packages…
[4/5] Linking dependencies…
[5/5] Building fresh packages…
$ yarn --cwd app/assets/javascripts/discourse
yarn install v1.22.17
[1/4] Resolving packages…
[2/4] Fetching packages…
[3/4] Linking dependencies…
[4/4] Building fresh packages…
success Saved lockfile.
Done in 32.66s.
Done in 49.85s.
yarn cache v1.22.17
success Cleared cache.
Done in 4.78s.

I, [2022-02-22T08:23:07.017003 #1] INFO – : > cd /var/www/discourse && su discourse -c ‘LOAD_PLUGINS=0 bundle exec rake plugin:pull_compatible_all’
I, [2022-02-22T08:23:11.280662 #1] INFO – : discourse-codechef-email-handler is already at latest compatible version
discourse-codechef-user-custom is already at latest compatible version
discourse-math is already at latest compatible version
discourse-codechef-api-custom is already at latest compatible version
discourse-codechef-scripts is already at latest compatible version

I, [2022-02-22T08:23:11.283319 #1] INFO – : > cd /var/www/discourse && su discourse -c ‘bundle exec rake db:migrate’
Discourse requires Redis 6.2.0 or up
I, [2022-02-22T08:23:19.834861 #1] INFO – : gem install mysql2 -v 0.5.2 -i /var/www/discourse/plugins/discourse-codechef-api-custom/gems/2.7.5 --no-document --ignore-dependencies --no-user-install
Building native extensions. This could take a while…
Successfully installed mysql2-0.5.2
1 gem installed

I, [2022-02-22T08:23:19.835243 #1] INFO – : Terminating async processes
I, [2022-02-22T08:23:19.835295 #1] INFO – : Sending INT to 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 pid: 46
I, [2022-02-22T08:23:19.835334 #1] INFO – : Sending TERM to exec chpst -u redis -U redis /usr/bin/redis-server /etc/redis/redis.conf pid: 107
2022-02-22 08:23:19.835 UTC [46] LOG: received fast shutdown request
107:signal-handler (1645518199) Received SIGTERM scheduling shutdown…
2022-02-22 08:23:19.838 UTC [46] LOG: aborting any active transactions
2022-02-22 08:23:19.841 UTC [46] LOG: background worker “logical replication launcher” (PID 55) exited with exit code 1
2022-02-22 08:23:19.841 UTC [50] LOG: shutting down
2022-02-22 08:23:19.860 UTC [46] LOG: database system is shut down
107:M 22 Feb 2022 08:23:19.930 # User requested shutdown…
107:M 22 Feb 2022 08:23:19.930 * Saving the final RDB snapshot before exiting.
107:M 22 Feb 2022 08:23:19.934 * DB saved on disk
107:M 22 Feb 2022 08:23:19.934 # Redis is now ready to exit, bye bye…

FAILED

Pups::ExecError: cd /var/www/discourse && su discourse -c ‘bundle exec rake db:migrate’ failed with return #<Process::Status: pid 1856 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”=>“db_migrate”, “cmd”=>[“su discourse -c ‘bundle exec rake db:migrate’”]}
e47c7ed53cf670fd0c81677b4f71bd6f63fc5d5d3d6bf26580361b2f62f46b69
** 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.
==================== END REBUILD LOG ====================
Failed to rebuild app.

Checking your domain name . . .

Connection to discuss.codechef.com succeeded.
You should probably remove any non-standard plugins and rebuild.
Attempting to restart existing container. . .
x86_64 arch detected.

  • /bin/docker run --shm-size=512m -d --restart=always -e LANG=en_US.UTF-8 -e RAILS_ENV=production -e UNICORN_WORKERS=2 -e UNICORN_SIDEKIQS=1 -e RUBY_GLOBAL_METHOD_CACHE_SIZE=131072 -e RUBY_GC_HEAP_GROWTH_MAX_SLOTS=40000 -e RUBY_GC_HEAP_INIT_SLOTS=400000 -e RUBY_GC_HEAP_OLDOBJECT_LIMIT_FACTOR=1.5 -e DISCOURSE_DB_SOCKET=/var/run/postgresql -e DISCOURSE_DB_HOST=discourse-production.c7teckpg2ocf.us-east-1.rds.amazonaws.com -e DISCOURSE_DB_PORT=5432 -e DISCOURSE_MAX_ADMIN_API_REQS_PER_KEY_PER_MINUTE=500 -e DISCOURSE_HOSTNAME=discuss.codechef.com -e DISCOURSE_DEVELOPER_EMAILS=REDACTED -e DISCOURSE_SMTP_ADDRESS=email-smtp.us-east-1.amazonaws.com -e DISCOURSE_SMTP_PORT=587 -e DISCOURSE_SMTP_USER_NAME=AKIAIHL3WLHZNDXF62XQ -e DISCOURSE_SMTP_PASSWORD=REDACTED -e DISCOURSE_DB_USERNAME=codechef -e DISCOURSE_DB_PASSWORD=REDACTED -e DISCOURSE_REDIS_HOST=discourse-production.x3rtbu.0001.use1.cache.amazonaws.com -e DISCOURSE_REDIS_PORT=6379 -e POSTGRES_DB_HOST=discourse-production.c7teckpg2ocf.us-east-1.rds.amazonaws.com -e POSTGRES_DB_NAME=discourse -e POSTGRES_DB_USER=codechef -e POSTGRES_DB_PW=AbaNabaRuba@123 -e MYSQL_DB_HOST=ccdbinstance.c7teckpg2ocf.us-east-1.rds.amazonaws.com -e MYSQL_DB_NAME=codechef -e MYSQL_DB_USER=discuss -e MYSQL_DB_PW=7sje981eu -h ip-10-0-0-74-app -e DOCKER_HOST_IP=172.17.0.1 --name app -t -p 4444:80 -v /var/discourse/shared/standalone:/shared -v /var/discourse/shared/standalone/log/var-log:/var/log --mac-address 02:f6:61:48:77:db local_discourse/app /sbin/boot
    Unable to find image ‘local_discourse/app:latest’ locally
    /bin/docker: Error response from daemon: pull access denied for local_discourse/app, repository does not exist or may require ‘docker login’.
    See ‘/bin/docker run --help’.
    Failed to restart the container.

==================== PLUGINS ====================

- git clone GitHub - discourse/docker_manager: Plugin for use with discourse docker image · GitHub

      - git clone https://9900af0b4d21567fdc2e737907cc354581075218@github.com/codechef-org/discourse-codechef-email-handler.git
      - git clone https://9900af0b4d21567fdc2e737907cc354581075218@github.com/codechef-org/discourse-codechef-user-custom.git
      - git clone https://github.com/discourse/discourse-math.git
      - git clone https://9900af0b4d21567fdc2e737907cc354581075218@github.com/codechef-org/discourse-codechef-api-custom.git
      - git clone https://9900af0b4d21567fdc2e737907cc354581075218@github.com/codechef-org/discourse-codechef-scripts.git

- git clone GitHub - angusmcleod/angus-events-plugin: Allows you to manage events in Discourse · GitHub

- git clone GitHub - discourse/discourse-sitemap: Generate XML sitemap for your Discourse forum. · GitHub

- git clone GitHub - discourse/discourse-akismet: give spam a whoopin · GitHub

WARNING:
You have what appear to be non-official plugins.
If you are having trouble, you should disable them and try rebuilding again.

See discourse/lib/plugin/metadata.rb at main · discourse/discourse · GitHub for the official list.

========================================
Discourse version at discuss.codechef.com: NOT FOUND
Discourse version at localhost: NOT FOUND

==================== MEMORY INFORMATION ====================
OS: Linux
RAM (MB): 3796

          total        used        free      shared  buff/cache   available

Mem: 3707 226 2766 0 713 3134
Swap: 0 0 0

==================== DISK SPACE CHECK ====================
---------- OS Disk Space ----------
Filesystem Size Used Avail Use% Mounted on
/dev/nvme0n1p1 32G 19G 14G 57% /

==================== DISK INFORMATION ====================
Disk /dev/nvme0n1: 32 GiB, 34359738368 bytes, 67108864 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disklabel type: gpt
Disk identifier: D644E4B4-1955-43E3-BBBB-5773780BDEE7

Device Start End Sectors Size Type
/dev/nvme0n1p1 4096 67108830 67104735 32G Linux filesystem
/dev/nvme0n1p128 2048 4095 2048 1M BIOS boot

Partition table entries are not in disk order.

==================== END DISK INFORMATION ====================

==================== MAIL TEST ====================
For a robust test, get an address from http://www.mail-tester.com/
Mail test skipped.

==================== DONE! ====================

You can examine the output of this script with
LESS=-Ri less /tmp/discourse-debug.txt

BUT FIRST, make sure that you know the first three commands below!!!

Commands to know when viewing the file with the above command (called ‘less’):
q – quit
/error – search for the word ‘error’
n – search for the next occurrence
g – go to the beginning of the file
f – go forward a page
b – go back a page
G – go to the end of the file


誰か助けてください。

最後に発生している主なエラーは以下の通りです。

I, [2022-02-22T08:23:19.835243 #1] INFO – : Terminating async processes
I, [2022-02-22T08:23:19.835295 #1] INFO – : Sending INT to 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 pid: 46
I, [2022-02-22T08:23:19.835334 #1] INFO – : Sending TERM to exec chpst -u redis -U redis /usr/bin/redis-server /etc/redis/redis.conf pid: 107
2022-02-22 08:23:19.835 UTC [46] LOG: received fast shutdown request
107:signal-handler (1645518199) Received SIGTERM scheduling shutdown…
2022-02-22 08:23:19.838 UTC [46] LOG: aborting any active transactions
2022-02-22 08:23:19.841 UTC [46] LOG: background worker “logical replication launcher” (PID 55) exited with exit code 1
2022-02-22 08:23:19.841 UTC [50] LOG: shutting down
2022-02-22 08:23:19.860 UTC [46] LOG: database system is shut down
107:M 22 Feb 2022 08:23:19.930 # User requested shutdown…
107:M 22 Feb 2022 08:23:19.930 * Saving the final RDB snapshot before exiting.
107:M 22 Feb 2022 08:23:19.934 * DB saved on disk
107:M 22 Feb 2022 08:23:19.934 # Redis is now ready to exit, bye bye…

FAILED

Pups::ExecError: cd /var/www/discourse && su discourse -c ‘bundle exec rake db:migrate’ failed with return #<Process::Status: pid 1856 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”=>“db_migrate”, “cmd”=>[“su discourse -c ‘bundle exec rake db:migrate’”]}
e47c7ed53cf670fd0c81677b4f71bd6f63fc5d5d3d6bf26580361b2f62f46b69
** 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.
==================== END REBUILD LOG ====================
Failed to rebuild app.

^^ これが問題です。

ガイドに従って標準インストールを実行していますか?もしそうであれば、Redisは自動的に更新されているはずなので、これは非常に驚くべきことです。

AWS Elasticache for Redis を使用しています。そのため、バージョン 6.2.0 以降の新しい Redis インスタンスを作成する必要があると思いますが、正しいでしょうか?

はい、それで大丈夫だと思います :+1:

Elasticacheにはあまり詳しくありませんが、既存のインスタンスをデータ損失なしで「アップグレード」できる方法があれば、ユーザーが既存のログインセッションを失うことを防ぐことができます。

Redisを6.2.5にアップデートしましたが、まだ再構築されていません。

ログに「Discourse requires Redis 6.2.0 or up`」とまだ表示されていますか?

いいえ、今はその行を見つけられません。
これがdiscourse-doctorの全出力です。

サードパーティ製プラグイン「discourse-codechef-email-handler」からのエラーのようです。最新バージョンのDiscourseで動作するように更新する必要があるでしょう。

基本的に、カスタムメールをアクセサとして追加するために single_sign_on クラスを拡張していました。

以下にそのコードを示します。

# name: discourse-codechef-email-handler
# about: A plugin to redirect emails to the correct email-address for multiple accounts associated with the same address,
#        and handle all the functions related to a user's email address on CodeChef.

enabled_site_setting :discourse_codechef_email_handler_enabled

after_initialize do 

    # このコードブロックは build_email() をオーバーライドして、
    # email(user.email) の代わりに codechef_email(user.codechef_email) にメールを送信します。
    require_dependency 'email/message_builder'
    module ::Email::BuildEmailHelper
        def build_email(*builder_args)
            user = User.find_by_email(builder_args[0])
            builder_args[0] = user.codechef_email
            builder = Email::MessageBuilder.new(*builder_args)
            headers(builder.header_args) if builder.header_args.present?
            mail(builder.build_args).tap { |message|
              if message && h = builder.html_part
                message.html_part = h
              end
            }
        end
    end

    # このコードブロックは SingleSignOn クラスを拡張して、codechef_email を ACCESSOR として含めます。
    require_dependency 'single_sign_on'
    class ::SingleSignOn
        ACCESSORS = ACCESSORS.dup << :codechef_email 
        attr_accessor(*ACCESSORS)
    end

    # このコードブロックは 'change_external_attributes_and_override' をオーバーライドして、
    # SSO 経由で Discourse にログインするたびに codechef_email を保存します。
    require_dependency 'discourse_single_sign_on'
    class ::DiscourseSingleSignOn
        module AddCodeChefEmail
            def change_external_attributes_and_override(sso_record, user)
                super(sso_record, user)
                user.codechef_email = codechef_email
            end
        end
        prepend AddCodeChefEmail
    end
end

変更点を確認できるドキュメントを教えていただけますか?

Discourse の最新バージョンでは、SSO 関連のクラス名が変更されました。変更内容は以下で確認できます。

なお、プラグインでこのようなコアの動作にパッチを当てることはあまり推奨されません。アイデンティティプロバイダー側でカスタムメールロジックを処理できる方がはるかに良いでしょう。

承知いたしました。ひとまずクラス名を変更し、動作することを確認しました。
コアの動作にパッチを適用せずに要件を満たす方法については、さらに検討します。
ご協力いただき、誠にありがとうございました。 :slight_smile: