コンテナがビルドできない、明確なエラーがない

こんにちは、初めて Discourse をインストールしようとして困っています。./discourse-setup./launcher rebuild app が失敗した後、./discourse-doctor から以下のような出力が得られます。これは再構築時にも同様の挙動を示しています。

DISCOURSE DOCTOR 2022 年 2 月 27 日 14:14:17 CET
OS: Linux debian-discourse 5.10.0-11-amd64 #1 SMP Debian 5.10.92-1 (2022-01-18) x86_64 GNU/Linux


containers/app.yml が見つかりました

==================== YML 設定 ====================
DISCOURSE_HOSTNAME=forum.mydomain.com
SMTP_ADDRESS=mail.mydomain.com
DEVELOPER_EMAILS=admin@mydomain.com
SMTP_PASSWORD=mypassword
SMTP_PORT=587
SMTP_USER_NAME=noreply@mydomain.com
LETSENCRYPT_ACCOUNT_EMAIL=me@example.com

==================== DOCKER 情報 ====================
DOCKER バージョン: Docker version 20.10.12, build e91ed57

DOCKER プロセス (docker ps -a)

CONTAINER ID   IMAGE     COMMAND   CREATED   STATUS    PORTS     NAMES

==================== 深刻な問題!!!! ====================
app が実行されていません!
再構築を試みています
==================== 再構築ログ ====================
x86_64 アーキテクチャを検出しました。
ランチャーが最新であることを確認中
origin を取得中
ランチャーは最新です
/usr/local/lib/ruby/gems/2.7.0/gems/pups-1.1.1/lib/pups.rb
/usr/local/bin/pups --stdin
I, [2022-02-27T13:14:40.211696 #1]  INFO -- : stdin から読み込み中
I, [2022-02-27T13:14:40.220344 #1]  INFO -- : > locale-gen $LANG && update-locale
I, [2022-02-27T13:14:40.258913 #1]  INFO -- : ロケールを生成中(時間がかかる場合があります)...
生成完了。

I, [2022-02-27T13:14:40.259380 #1]  INFO -- : > mkdir -p /shared/postgres_run
I, [2022-02-27T13:14:40.264481 #1]  INFO -- : 
I, [2022-02-27T13:14:40.265241 #1]  INFO -- : > chown postgres:postgres /shared/postgres_run
I, [2022-02-27T13:14:40.268881 #1]  INFO -- : 
I, [2022-02-27T13:14:40.269295 #1]  INFO -- : > chmod 775 /shared/postgres_run
I, [2022-02-27T13:14:40.272763 #1]  INFO -- : 
I, [2022-02-27T13:14:40.272999 #1]  INFO -- : > rm -fr /var/run/postgresql
I, [2022-02-27T13:14:40.276546 #1]  INFO -- : 
I, [2022-02-27T13:14:40.276820 #1]  INFO -- : > ln -s /shared/postgres_run /var/run/postgresql
I, [2022-02-27T13:14:40.280134 #1]  INFO -- : 
I, [2022-02-27T13:14:40.280369 #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/27 13:14:40 socat[19] E connect(6, AF=1 "/shared/postgres_run/.s.PGSQL.5432", 36): No such file or directory
I, [2022-02-27T13:14:40.288971 #1]  INFO -- : 
I, [2022-02-27T13:14:40.289190 #1]  INFO -- : > rm -fr /shared/postgres_run/.s*
I, [2022-02-27T13:14:40.293475 #1]  INFO -- : 
I, [2022-02-27T13:14:40.293677 #1]  INFO -- : > rm -fr /shared/postgres_run/*.pid
I, [2022-02-27T13:14:40.297588 #1]  INFO -- : 
I, [2022-02-27T13:14:40.297786 #1]  INFO -- : > mkdir -p /shared/postgres_run/13-main.pg_stat_tmp
I, [2022-02-27T13:14:40.301263 #1]  INFO -- : 
I, [2022-02-27T13:14:40.301849 #1]  INFO -- : > chown postgres:postgres /shared/postgres_run/13-main.pg_stat_tmp
I, [2022-02-27T13:14:40.304979 #1]  INFO -- : 
I, [2022-02-27T13:14:40.312270 #1]  INFO -- : File > /etc/service/postgres/run  chmod: +x  chown: 
I, [2022-02-27T13:14:40.318971 #1]  INFO -- : File > /etc/service/postgres/log/run  chmod: +x  chown: 
I, [2022-02-27T13:14:40.325763 #1]  INFO -- : File > /etc/runit/3.d/99-postgres  chmod: +x  chown: 
I, [2022-02-27T13:14:40.332281 #1]  INFO -- : File > /root/upgrade_postgres  chmod: +x  chown: 
I, [2022-02-27T13:14:40.332909 #1]  INFO -- : > chown -R root /var/lib/postgresql/13/main
I, [2022-02-27T13:15:07.631079 #1]  INFO -- : 
I, [2022-02-27T13:15:07.631961 #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-27T13:15:07.635691 #1]  INFO -- : 
I, [2022-02-27T13:15:07.635980 #1]  INFO -- : > chown -R postgres:postgres /shared/postgres_data
I, [2022-02-27T13:15:07.653147 #1]  INFO -- : 
I, [2022-02-27T13:15:07.653742 #1]  INFO -- : > chown -R postgres:postgres /var/run/postgresql
I, [2022-02-27T13:15:07.657676 #1]  INFO -- : 
I, [2022-02-27T13:15:07.658155 #1]  INFO -- : > /root/upgrade_postgres
I, [2022-02-27T13:15:07.664610 #1]  INFO -- : 
I, [2022-02-27T13:15:07.665202 #1]  INFO -- : > rm /root/upgrade_postgres
I, [2022-02-27T13:15:07.668622 #1]  INFO -- : 
I, [2022-02-27T13:15:07.669307 #1]  INFO -- : /etc/postgresql/13/main/postgresql.conf 内の data_directory = '/var/lib/postgresql/13/main' を data_directory = '/shared/postgres_data' に置換
I, [2022-02-27T13:15:07.670471 #1]  INFO -- : /etc/postgresql/13/main/postgresql.conf 内の (?-mix:#?listen_addresses *=.*) を listen_addresses = '*' に置換
I, [2022-02-27T13:15:07.671259 #1]  INFO -- : /etc/postgresql/13/main/postgresql.conf 内の (?-mix:#?synchronous_commit *=.*) を synchronous_commit = $db_synchronous_commit に置換
I, [2022-02-27T13:15:07.672181 #1]  INFO -- : /etc/postgresql/13/main/postgresql.conf 内の (?-mix:#?shared_buffers *=.*) を shared_buffers = $db_shared_buffers に置換
I, [2022-02-27T13:15:07.673070 #1]  INFO -- : /etc/postgresql/13/main/postgresql.conf 内の (?-mix:#?work_mem *=.*) を work_mem = $db_work_mem に置換
I, [2022-02-27T13:15:07.673941 #1]  INFO -- : /etc/postgresql/13/main/postgresql.conf 内の (?-mix:#?default_text_search_config *=.*) を default_text_search_config = '$db_default_text_search_config' に置換
I, [2022-02-27T13:15:07.674713 #1]  INFO -- : > install -d -m 0755 -o postgres -g postgres /shared/postgres_backup
I, [2022-02-27T13:15:07.679131 #1]  INFO -- : 
I, [2022-02-27T13:15:07.679903 #1]  INFO -- : /etc/postgresql/13/main/postgresql.conf 内の (?-mix:#?checkpoint_segments *=.*) を checkpoint_segments = $db_checkpoint_segments に置換
I, [2022-02-27T13:15:07.680809 #1]  INFO -- : /etc/postgresql/13/main/postgresql.conf 内の (?-mix:#?logging_collector *=.*) を logging_collector = $db_logging_collector に置換
I, [2022-02-27T13:15:07.681702 #1]  INFO -- : /etc/postgresql/13/main/postgresql.conf 内の (?-mix:#?log_min_duration_statement *=.*) を log_min_duration_statement = $db_log_min_duration_statement に置換
I, [2022-02-27T13:15:07.682604 #1]  INFO -- : /etc/postgresql/13/main/pg_hba.conf 内の (?-mix:^#local +replication +postgres +peer$) を local replication postgres  peer に置換
I, [2022-02-27T13:15:07.683423 #1]  INFO -- : /etc/postgresql/13/main/pg_hba.conf 内の (?-mix:^host.*all.*all.*127.*$) を host all all 0.0.0.0/0 md5 に置換
I, [2022-02-27T13:15:07.684256 #1]  INFO -- : /etc/postgresql/13/main/pg_hba.conf 内の (?-mix:^host.*all.*all.*::1\/128.*$) を host all all ::/0 md5 に置換
I, [2022-02-27T13:15:07.684957 #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-27T13:15:07.687522 #1]  INFO -- : > sleep 5
2022-02-27 13:15:07.838 UTC [42] 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-27 13:15:07.838 UTC [42] LOG:  listening on IPv4 address "0.0.0.0", port 5432
2022-02-27 13:15:07.838 UTC [42] LOG:  listening on IPv6 address "::", port 5432
2022-02-27 13:15:07.887 UTC [42] LOG:  listening on Unix socket "/var/run/postgresql/.s.PGSQL.5432"
2022-02-27 13:15:07.929 UTC [45] LOG:  database system was shut down at 2022-02-27 13:06:07 UTC
2022-02-27 13:15:07.962 UTC [42] LOG:  database system is ready to accept connections
I, [2022-02-27T13:15:12.691185 #1]  INFO -- : 
I, [2022-02-27T13:15:12.691781 #1]  INFO -- : > su postgres -c 'createdb discourse' || true
2022-02-27 13:15:12.768 UTC [55] postgres@postgres ERROR:  database "discourse" already exists
2022-02-27 13:15:12.768 UTC [55] postgres@postgres STATEMENT:  CREATE DATABASE discourse;
createdb: error: database creation failed: ERROR:  database "discourse" already exists
I, [2022-02-27T13:15:12.771177 #1]  INFO -- : 
I, [2022-02-27T13:15:12.771774 #1]  INFO -- : > su postgres -c 'psql discourse -c "create user discourse;"' || true
2022-02-27 13:15:12.836 UTC [59] postgres@discourse ERROR:  role "discourse" already exists
2022-02-27 13:15:12.836 UTC [59] postgres@discourse STATEMENT:  create user discourse;
ERROR:  role "discourse" already exists
I, [2022-02-27T13:15:12.839812 #1]  INFO -- : 
I, [2022-02-27T13:15:12.840513 #1]  INFO -- : > su postgres -c 'psql discourse -c "grant all privileges on database discourse to discourse;"' || true
I, [2022-02-27T13:15:12.902932 #1]  INFO -- : GRANT

I, [2022-02-27T13:15:12.903783 #1]  INFO -- : > su postgres -c 'psql discourse -c "alter schema public owner to discourse;"'
I, [2022-02-27T13:15:12.963912 #1]  INFO -- : ALTER SCHEMA

I, [2022-02-27T13:15:12.964720 #1]  INFO -- : > su postgres -c 'psql template1 -c "create extension if not exists hstore;"'
NOTICE:  extension "hstore" already exists, skipping
I, [2022-02-27T13:15:13.030209 #1]  INFO -- : CREATE EXTENSION

I, [2022-02-27T13:15:13.030918 #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-27T13:15:13.090523 #1]  INFO -- : CREATE EXTENSION

I, [2022-02-27T13:15:13.091201 #1]  INFO -- : > su postgres -c 'psql discourse -c "create extension if not exists hstore;"'
NOTICE:  extension "hstore" already exists, skipping
I, [2022-02-27T13:15:13.150759 #1]  INFO -- : CREATE EXTENSION

I, [2022-02-27T13:15:13.151302 #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-27T13:15:13.210963 #1]  INFO -- : CREATE EXTENSION

I, [2022-02-27T13:15:13.211547 #1]  INFO -- : > sudo -u postgres psql discourse
I, [2022-02-27T13:15:13.214480 #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-27T13:15:13.281034 #1]  INFO -- : File > /var/lib/postgresql/take-database-backup  chmod: +x  chown: postgres:postgres
I, [2022-02-27T13:15:13.285330 #1]  INFO -- : File > /var/spool/cron/crontabs/postgres  chmod:   chown: 
I, [2022-02-27T13:15:13.285864 #1]  INFO -- : > echo postgres installed!
I, [2022-02-27T13:15:13.288953 #1]  INFO -- : postgres installed!

I, [2022-02-27T13:15:13.295719 #1]  INFO -- : File > /etc/service/redis/run  chmod: +x  chown: 
I, [2022-02-27T13:15:13.302598 #1]  INFO -- : File > /etc/service/redis/log/run  chmod: +x  chown: 
I, [2022-02-27T13:15:13.309776 #1]  INFO -- : File > /etc/runit/3.d/10-redis  chmod: +x  chown: 
I, [2022-02-27T13:15:13.310579 #1]  INFO -- : /etc/redis/redis.conf 内の daemonize yes を  に置換
I, [2022-02-27T13:15:13.311721 #1]  INFO -- : /etc/redis/redis.conf 内の (?-mix:^pidfile.*$) を  に置換
I, [2022-02-27T13:15:13.312613 #1]  INFO -- : > install -d -m 0755 -o redis -g redis /shared/redis_data
I, [2022-02-27T13:15:13.317020 #1]  INFO -- : 
I, [2022-02-27T13:15:13.317935 #1]  INFO -- : /etc/redis/redis.conf 内の (?-mix:^logfile.*$) を logfile "" に置換
I, [2022-02-27T13:15:13.318912 #1]  INFO -- : /etc/redis/redis.conf 内の (?-mix:^bind .*$) を  に置換
I, [2022-02-27T13:15:13.319881 #1]  INFO -- : /etc/redis/redis.conf 内の (?-mix:^dir .*$) を dir /shared/redis_data に置換
I, [2022-02-27T13:15:13.320844 #1]  INFO -- : /etc/redis/redis.conf 内の (?-mix:^protected-mode yes) を protected-mode no に置換
I, [2022-02-27T13:15:13.321738 #1]  INFO -- : /etc/redis/redis.conf 内の # io-threads 4 を io-threads $redis_io_threads に置換
I, [2022-02-27T13:15:13.322478 #1]  INFO -- : > echo redis installed
I, [2022-02-27T13:15:13.326308 #1]  INFO -- : redis installed

I, [2022-02-27T13:15:13.326960 #1]  INFO -- : > cat /etc/redis/redis.conf | grep logfile
I, [2022-02-27T13:15:13.332396 #1]  INFO -- : logfile ""

I, [2022-02-27T13:15:13.332993 #1]  INFO -- : > exec chpst -u redis -U redis /usr/bin/redis-server /etc/redis/redis.conf
I, [2022-02-27T13:15:13.335499 #1]  INFO -- : > sleep 10
103:C 27 Feb 2022 13:15:13.340 # oO0OoO0OoO0Oo Redis is starting oO0OoO0OoO0Oo
103:C 27 Feb 2022 13:15:13.341 # Redis version=6.2.6, bits=64, commit=00000000, modified=0, pid=103, just started
103:C 27 Feb 2022 13:15:13.341 # Configuration loaded
103:M 27 Feb 2022 13:15:13.341 * monotonic clock: POSIX clock_gettime
103:M 27 Feb 2022 13:15:13.342 * Running mode=standalone, port=6379.
103:M 27 Feb 2022 13:15:13.342 # Server initialized
103:M 27 Feb 2022 13:15:13.343 * Loading RDB produced by version 6.2.6
103:M 27 Feb 2022 13:15:13.343 * RDB age 546 seconds
103:M 27 Feb 2022 13:15:13.343 * RDB memory usage when created 0.77 Mb
103:M 27 Feb 2022 13:15:13.343 # Done loading RDB, keys loaded: 0, keys expired: 0.
103:M 27 Feb 2022 13:15:13.343 * DB loaded from disk: 0.000 seconds
103:M 27 Feb 2022 13:15:13.343 * Ready to accept connections
I, [2022-02-27T13:15:23.339851 #1]  INFO -- : 
I, [2022-02-27T13:15:23.340705 #1]  INFO -- : > thpoff echo "thpoff is installed!"
I, [2022-02-27T13:15:23.346062 #1]  INFO -- : thpoff is installed!

I, [2022-02-27T13:15:23.346888 #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-27T13:15:23.455351 #1]  INFO -- : 
I, [2022-02-27T13:15:23.456160 #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-27T13:15:23.534625 #1]  INFO -- : 
I, [2022-02-27T13:15:23.535120 #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-27T13:15:23.610977 #1]  INFO -- : 
I, [2022-02-27T13:15:23.611991 #1]  INFO -- : > rm -f /etc/cron.d/anacron
I, [2022-02-27T13:15:23.616191 #1]  INFO -- : 
I, [2022-02-27T13:15:23.620358 #1]  INFO -- : File > /etc/cron.d/anacron  chmod:   chown: 
I, [2022-02-27T13:15:23.627573 #1]  INFO -- : File > /etc/runit/1.d/copy-env  chmod: +x  chown: 
I, [2022-02-27T13:15:23.635113 #1]  INFO -- : File > /etc/service/unicorn/run  chmod: +x  chown: 
I, [2022-02-27T13:15:23.642512 #1]  INFO -- : File > /etc/service/nginx/run  chmod: +x  chown: 
I, [2022-02-27T13:15:23.649389 #1]  INFO -- : File > /etc/runit/3.d/01-nginx  chmod: +x  chown: 
I, [2022-02-27T13:15:23.656276 #1]  INFO -- : File > /etc/runit/3.d/02-unicorn  chmod: +x  chown: 
I, [2022-02-27T13:15:23.656857 #1]  INFO -- : /etc/service/unicorn/run 内の # postgres を sv start postgres || exit 1 に置換
I, [2022-02-27T13:15:23.657499 #1]  INFO -- : > exec chpst -u redis -U redis /usr/bin/redis-server /etc/redis/redis.conf
I, [2022-02-27T13:15:23.660628 #1]  INFO -- : > cd /var/www/discourse && git reset --hard
130:C 27 Feb 2022 13:15:23.664 # oO0OoO0OoO0Oo Redis is starting oO0OoO0OoO0Oo
130:C 27 Feb 2022 13:15:23.664 # Redis version=6.2.6, bits=64, commit=00000000, modified=0, pid=130, just started
130:C 27 Feb 2022 13:15:23.664 # Configuration loaded
130:M 27 Feb 2022 13:15:23.665 * monotonic clock: POSIX clock_gettime
130:M 27 Feb 2022 13:15:23.666 # Warning: Could not create server TCP listening socket *:6379: bind: Address already in use
130:M 27 Feb 2022 13:15:23.666 # Failed listening on port 6379 (TCP), aborting.
Updating files: 100% (30947/30947), done.
I, [2022-02-27T13:15:29.169205 #1]  INFO -- : HEAD is now at e1367cde I18N: Improve copy on blocked words error messages (#15741)

I, [2022-02-27T13:15:29.169470 #1]  INFO -- : > cd /var/www/discourse && git clean -f
I, [2022-02-27T13:15:29.344280 #1]  INFO -- : 
I, [2022-02-27T13:15:29.344569 #1]  INFO -- : > cd /var/www/discourse && git remote set-branches --add origin main
I, [2022-02-27T13:15:29.350087 #1]  INFO -- : 
I, [2022-02-27T13:15:29.350318 #1]  INFO -- : > cd /var/www/discourse && git remote set-branches origin tests-passed
I, [2022-02-27T13:15:29.355709 #1]  INFO -- : 
I, [2022-02-27T13:15:29.355974 #1]  INFO -- : > cd /var/www/discourse && git fetch --depth 1 origin tests-passed
fatal: unable to access 'https://github.com/discourse/discourse.git/': Could not resolve host: github.com
I, [2022-02-27T13:15:49.400103 #1]  INFO -- : 
I, [2022-02-27T13:15:49.400811 #1]  INFO -- : 非同期プロセスを終了中
I, [2022-02-27T13:15:49.400896 #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 pid: 42 に INT を送信
I, [2022-02-27T13:15:49.401433 #1]  INFO -- : exec chpst -u redis -U redis /usr/bin/redis-server /etc/redis/redis.conf pid: 103 に TERM を送信
103:signal-handler (1645967749) Received SIGTERM scheduling shutdown...
2022-02-27 13:15:49.401 UTC [42] LOG:  received fast shutdown request
103:M 27 Feb 2022 13:15:49.411 # User requested shutdown...
103:M 27 Feb 2022 13:15:49.411 * Saving the final RDB snapshot before exiting.
2022-02-27 13:15:49.448 UTC [42] LOG:  aborting any active transactions
2022-02-27 13:15:49.451 UTC [42] LOG:  background worker "logical replication launcher" (PID 51) exited with exit code 1
2022-02-27 13:15:49.452 UTC [46] LOG:  shutting down
103:M 27 Feb 2022 13:15:49.469 * DB saved on disk
103:M 27 Feb 2022 13:15:49.469 # Redis is now ready to exit, bye bye...
2022-02-27 13:15:49.655 UTC [42] LOG:  database system is shut down


FAILED
--------------------
Pups::ExecError: cd /var/www/discourse && git fetch --depth 1 origin tests-passed が失敗しました。戻り値: #<Process::Status: pid 141 exit 128>
失敗場所: /usr/local/lib/ruby/gems/2.7.0/gems/pups-1.1.1/lib/pups/exec_command.rb:117:in `spawn'
以下のパラメータで exec が失敗しました: {"cd"=>"$home", "hook"=>"code", "cmd"=>["git reset --hard", "git clean -f", "git remote set-branches --add origin main", "git remote set-branches origin $version", "git fetch --depth 1 origin $version", "git checkout $version", "mkdir -p tmp", "chown discourse:www-data tmp", "mkdir -p tmp/pids", "mkdir -p tmp/sockets", "touch tmp/.gitkeep", "mkdir -p                    /shared/log/rails", "bash -c \"touch -a           /shared/log/rails/{production,production_errors,unicorn.stdout,unicorn.stderr,sidekiq}.log\"", "bash -c \"ln    -s           /shared/log/rails/{production,production_errors,unicorn.stdout,unicorn.stderr,sidekiq}.log $home/log\"", "bash -c \"mkdir -p           /shared/{uploads,backups}\"", "bash -c \"ln    -s           /shared/{uploads,backups} $home/public\"", "bash -c \"mkdir -p           /shared/tmp/{backups,restores}\"", "bash -c \"ln    -s           /shared/tmp/{backups,restores} $home/tmp\"", "chown -R discourse:www-data /shared/log/rails /shared/uploads /shared/backups /shared/tmp", "find public/plugins/ -maxdepth 1 -xtype l -delete"]}
ff0cb1ccb91cf850a403193099c4cebdad079869235786bba2dad57d49cf9151
** ブートストラップに失敗しました ** 上記のログをスクロールして、より早い段階のエラーメッセージを確認してください。複数のエラーが存在する可能性があります。
./discourse-doctor で問題を診断できるかもしれません。
==================== 再構築ログ終了 ====================
アプリの再構築に失敗しました。

ドメイン名を確認中 . . .

forum.mydomain.com への接続に成功しました。
非公式のプラグインを削除して再構築することをお勧めします。
既存のコンテナを再起動中 . . . 
x86_64 アーキテクチャを検出しました。

+ /usr/bin/docker run --shm-size=512m -d --restart=always -e LANG=en_US.UTF-8 -e RAILS_ENV=production -e UNICORN_WORKERS=4 -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= -e DISCOURSE_DB_PORT= -e LETSENCRYPT_DIR=/shared/letsencrypt -e DISCOURSE_FORCE_HTTPS=true -e LC_ALL=en_US.UTF-8 -e LANGUAGE=en_US.UTF-8 -e EMBER_CLI_PROD_ASSETS=1 -e DISCOURSE_HOSTNAME=forum.mydomain.com -e DISCOURSE_DEVELOPER_EMAILS=admin@mydomain.com -e DISCOURSE_SMTP_ADDRESS=mail.mydomain.com -e DISCOURSE_SMTP_PORT=587 -e DISCOURSE_SMTP_USER_NAME=noreply@mydomain.com -e DISCOURSE_SMTP_PASSWORD=mypassword -e DISCOURSE_SMTP_DOMAIN=forum.mydomain.com -e DISCOURSE_NOTIFICATION_EMAIL=noreply@mydomain.com -e LETSENCRYPT_ACCOUNT_EMAIL=me@example.com -h debian-discourse-app -e DOCKER_HOST_IP=172.17.0.1 --name app -t -p 80:80 -p 443:443 -v /var/discourse/shared/standalone:/shared -v /var/discourse/shared/standalone/log/var-log:/var/log --mac-address 02:ea:03:0c:77:53 local_discourse/app /sbin/boot
ローカルに 'local_discourse/app:latest' イメージが見つかりません
docker: エラー: デーモンからの応答: local_discourse/app へのプルアクセスが拒否されました。リポジトリが存在しないか、'docker login' が必要かもしれません: 拒否: 要求されたリソースへのアクセスが拒否されました。
See 'docker run --help'.
コンテナの再起動に失敗しました。


==================== プラグイン ====================
          - git clone https://github.com/discourse/docker_manager.git

非公式のプラグインは検出されませんでした。

公式リストについては、https://github.com/discourse/discourse/blob/main/lib/plugin/metadata.rb を参照してください。

========================================
forum.mydomain.com での Discourse バージョン: 見つかりません
localhost での Discourse バージョン: 見つかりません


==================== メモリ情報 ====================
RAM (MB): 2078

               total        used        free      shared  buff/cache   available
Mem:            1982         204         470           0        1307        1593
Swap:           2047           0        2047

==================== ディスク容量チェック ====================
---------- OS ディスク容量 ----------
Filesystem      Size  Used Avail Use% Mounted on
/dev/sda2        96G  5.5G   86G   6% /

==================== ディスク情報 ====================
Disk /dev/sda: 100 GiB, 107374182400 bytes, 209715200 sectors
Disk model: BHYVE SATA DISK 
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 16384 bytes
I/O size (minimum/optimal): 16384 bytes / 16384 bytes
Disklabel type: gpt
Disk identifier: 0744CFC1-F98B-4694-9EBF-7F0697C68B40

Device         Start       End   Sectors  Size Type
/dev/sda1       2048   1050623   1048576  512M EFI System
/dev/sda2    1050624 205518847 204468224 97.5G Linux filesystem
/dev/sda3  205518848 209713151   4194304    2G Linux swap

==================== ディスク情報終了 ====================

==================== メールテスト ====================
堅牢なテストを行うには、http://www.mail-tester.com/ からアドレスを取得してください
または、単に自分自身にテストメッセージを送信してください。
メールテストのメールアドレス? ('n' でスキップ) [admin@mydomain.com]: 
admin@mydomain.com へメールを送信中 . . . 
エラー: No such container: app

置換中: SMTP_PASSWORD
置換中: LETSENCRYPT_ACCOUNT_EMAIL
置換中: DEVELOPER_EMAILS
置換中: DISCOURSE_DB_PASSWORD
置換中: Sending mail to

==================== 完了! ====================

最終的にはリバースプロキシの背後で動作させる予定ですが(そのため Let’s Encrypt を設定しませんでした)、このログはポート 80 と 443 がこの VM に直接フォワードされた状態で生成されたもので、ドクターがドメインが正しくルーティングされていることを確認できるようにしていました。以下に問題の原因についていくつかの推測がありますが、次にどのようなトラブルシューティングを試みるべきか分かりません。

私の推測

メール

mail.mydomain.com でメールサーバーを運用しており、これを使用する予定でした。おそらく設定が正しくないのでしょう。そこで admin@ と noreply@ のアカウントを作成し、mail.mydomain.com:587 からメールを送信でき、マシンからも telnet で期待通りにアクセスできます。いずれにせよ、メールの送信に失敗しているようですが、それはアプリ用の Docker コンテナが存在しないためです。

設定の読み込みミス

設定に何を書いても、ビルドログには以下のような行が表示されます ENV["DISCOURSE_SMTP_ADDRESS"] == "smtp.example.com"; puts "Aborting! Mail is not configured!"; exit 1; end'。しかし、トップでは設定が正しく読み込まれていることは明らかです。これが正常なのでしょうか?

Redis ポートの占有

Redis が 2 回起動しているように見え、2 回目に 130:M 27 Feb 2022 13:15:23.666 # Warning: Could not create server TCP listening socket *:6379: bind: Address already in use というエラーが発生します。

github の解決不能

以下の厄介な行があります [2022-02-27T13:15:29.355974 #1] INFO -- : > cd /var/www/discourse && git fetch --depth 1 origin tests-passed fatal: unable to access 'https://github.com/discourse/discourse.git/': Could not resolve host: github.com。しかし、ボックス内では github からの解決、ping、クローンが問題なくでき、ファイアウォールもすべてのアウトバウンド要求を許可しているため、どうすればよいのか分かりません。

お手伝いいただければ幸いです。よろしくお願いいたします :slight_smile:

本当の問題はこれです:

サーバー/コンテナがGitHubのDiscourseソースコードにアクセスできない場合、ビルド/更新を行うことができません。

ホストで動作するとおっしゃっていたので、コンテナのネットワークをデバッグする必要があります。docker run --it debian:buster-slim bash を使用して、同様のコンテナシェルにドロップし、そこからデバッグしてください。

その通り、Dockerのネットワークの問題でした。私の場合は、ファイアウォールがフォワードチェーンをブロックしていました。これでビルドできます :slight_smile: ありがとう!