Ed_S さん、返信ありがとうございます。
ログはこちらです。
2.0.20230825-1850: discourse/base からプル中
Digest: sha256:3fd7032bbeb6f322ad7138ed154c0fc6177d75ebffba44871abea86620c0c7d5
Status: イメージは最新です (discourse/base:2.0.20230825-1850)
docker.io/discourse/base:2.0.20230825-1850
/usr/local/lib/ruby/gems/3.2.0/gems/pups-1.1.1/lib/pups.rb
/usr/local/bin/pups --stdin
I, [2023-08-29T09:21:02.616345 #1] INFO -- : 標準入力から読み込み中
I, [2023-08-29T09:21:02.623013 #1] INFO -- : > locale-gen $LANG && update-locale
I, [2023-08-29T09:21:02.710520 #1] INFO -- : ロケールの生成中 (これには時間がかかる場合があります)...
生成完了。
I, [2023-08-29T09:21:02.710851 #1] INFO -- : > mkdir -p /shared/postgres_run
I, [2023-08-29T09:21:02.728110 #1] INFO -- :
I, [2023-08-29T09:21:02.729179 #1] INFO -- : > chown postgres:postgres /shared/postgres_run
I, [2023-08-29T09:21:02.735510 #1] INFO -- :
I, [2023-08-29T09:21:02.735716 #1] INFO -- : > chmod 775 /shared/postgres_run
I, [2023-08-29T09:21:02.746000 #1] INFO -- :
I, [2023-08-29T09:21:02.746339 #1] INFO -- : > rm -fr /var/run/postgresql
I, [2023-08-29T09:21:02.758675 #1] INFO -- :
I, [2023-08-29T09:21:02.759021 #1] INFO -- : > ln -s /shared/postgres_run /var/run/postgresql
I, [2023-08-29T09:21:02.779658 #1] INFO -- :
I, [2023-08-29T09:21:02.780116 #1] INFO -- : > socat /dev/null UNIX-CONNECT:/shared/postgres_run/.s.PGSQL.5432 || exit 0 && echo postgres already running stop container ; exit 1
2023/08/29 09:21:02 socat[19] E connect(6, AF=1 "/shared/postgres_run/.s.PGSQL.5432", 36): No such file or directory
I, [2023-08-29T09:21:02.827033 #1] INFO -- :
I, [2023-08-29T09:21:02.827315 #1] INFO -- : > rm -fr /shared/postgres_run/.s*
I, [2023-08-29T09:21:02.842035 #1] INFO -- :
I, [2023-08-29T09:21:02.842351 #1] INFO -- : > rm -fr /shared/postgres_run/*.pid
I, [2023-08-29T09:21:02.855637 #1] INFO -- :
I, [2023-08-29T09:21:02.855851 #1] INFO -- : > mkdir -p /shared/postgres_run/13-main.pg_stat_tmp
I, [2023-08-29T09:21:02.869645 #1] INFO -- :
I, [2023-08-29T09:21:02.869980 #1] INFO -- : > chown postgres:postgres /shared/postgres_run/13-main.pg_stat_tmp
I, [2023-08-29T09:21:02.882648 #1] INFO -- :
I, [2023-08-29T09:21:02.909525 #1] INFO -- : File > /etc/service/postgres/run chmod: +x chown:
I, [2023-08-29T09:21:02.929435 #1] INFO -- : File > /etc/service/postgres/log/run chmod: +x chown:
I, [2023-08-29T09:21:02.950482 #1] INFO -- : File > /etc/runit/3.d/99-postgres chmod: +x chown:
I, [2023-08-29T09:21:02.970379 #1] INFO -- : File > /root/upgrade_postgres chmod: +x chown:
I, [2023-08-29T09:21:02.970739 #1] INFO -- : > chown -R root /var/lib/postgresql/13/main
I, [2023-08-29T09:21:05.200877 #1] INFO -- :
I, [2023-08-29T09:21:05.201284 #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, [2023-08-29T09:21:05.209306 #1] INFO -- :
I, [2023-08-29T09:21:05.209529 #1] INFO -- : > chown -R postgres:postgres /shared/postgres_data
I, [2023-08-29T09:21:05.702527 #1] INFO -- :
I, [2023-08-29T09:21:05.702890 #1] INFO -- : > chown -R postgres:postgres /var/run/postgresql
I, [2023-08-29T09:21:05.715452 #1] INFO -- :
I, [2023-08-29T09:21:05.715842 #1] INFO -- : > /root/upgrade_postgres
I, [2023-08-29T09:21:05.735934 #1] INFO -- :
I, [2023-08-29T09:21:05.736250 #1] INFO -- : > rm /root/upgrade_postgres
I, [2023-08-29T09:21:05.744686 #1] INFO -- :
I, [2023-08-29T09:21:05.747870 #1] INFO -- : data_directory = '/var/lib/postgresql/13/main' を data_directory = '/shared/postgres_data' に /etc/postgresql/13/main/postgresql.conf で置き換え中
I, [2023-08-29T09:21:05.748992 #1] INFO -- : listen_addresses = '*' を (?-mix:#?listen_addresses *=.*) に /etc/postgresql/13/main/postgresql.conf で置き換え中
I, [2023-08-29T09:21:05.749389 #1] INFO -- : synchronous_commit = $db_synchronous_commit を (?-mix:#?synchronous_commit *=.*) に /etc/postgresql/13/main/postgresql.conf で置き換え中
I, [2023-08-29T09:21:05.749959 #1] INFO -- : shared_buffers = $db_shared_buffers を (?-mix:#?shared_buffers *=.*) に /etc/postgresql/13/main/postgresql.conf で置き換え中
I, [2023-08-29T09:21:05.750448 #1] INFO -- : work_mem = $db_work_mem を (?-mix:#?work_mem *=.*) に /etc/postgresql/13/main/postgresql.conf で置き換え中
I, [2023-08-29T09:21:05.751081 #1] INFO -- : default_text_search_config = '$db_default_text_search_config' を (?-mix:#?default_text_search_config *=.*) に /etc/postgresql/13/main/postgresql.conf で置き換え中
I, [2023-08-29T09:21:05.751518 #1] INFO -- : > install -d -m 0755 -o postgres -g postgres /shared/postgres_backup
I, [2023-08-29T09:21:05.764996 #1] INFO -- :
I, [2023-08-29T09:21:05.765609 #1] INFO -- : checkpoint_segments = $db_checkpoint_segments を (?-mix:#?checkpoint_segments *=.*) に /etc/postgresql/13/main/postgresql.conf で置き換え中
I, [2023-08-29T09:21:05.766014 #1] INFO -- : logging_collector = $db_logging_collector を (?-mix:#?logging_collector *=.*) に /etc/postgresql/13/main/postgresql.conf で置き換え中
I, [2023-08-29T09:21:05.766439 #1] INFO -- : log_min_duration_statement = $db_log_min_duration_statement を (?-mix:#?log_min_duration_statement *=.*) に /etc/postgresql/13/main/postgresql.conf で置き換え中
I, [2023-08-29T09:21:05.767217 #1] INFO -- : ^#local +replication +postgres +peer$ を local replication postgres peer に /etc/postgresql/13/main/pg_hba.conf で置き換え中
I, [2023-08-29T09:21:05.767602 #1] INFO -- : ^host.*all.*all.*127.*$ を host all all 0.0.0.0/0 md5 に /etc/postgresql/13/main/pg_hba.conf で置き換え中
I, [2023-08-29T09:21:05.768021 #1] INFO -- : ^host.*all.*all.*::1\/128.*$ を host all all ::/0 md5 に /etc/postgresql/13/main/pg_hba.conf で置き換え中
I, [2023-08-29T09:21:05.768262 #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, [2023-08-29T09:21:05.774258 #1] INFO -- : > sleep 5
I, [2023-08-29T09:21:10.783648 #1] INFO -- :
I, [2023-08-29T09:21:10.784081 #1] INFO -- : > su postgres -c 'createdb discourse' || true
createdb: error: could not connect to database template1: connection to server on socket "/var/run/postgresql/.s.PGSQL.5432" failed: No such file or directory
Is the server running locally and accepting connections on that socket?
I, [2023-08-29T09:21:10.914438 #1] INFO -- :
I, [2023-08-29T09:21:10.914784 #1] INFO -- : > su postgres -c 'psql discourse -c "create user discourse;"' || true
psql: error: connection to server on socket "/var/run/postgresql/.s.PGSQL.5432" failed: No such file or directory
Is the server running locally and accepting connections on that socket?
I, [2023-08-29T09:21:10.998165 #1] INFO -- :
I, [2023-08-29T09:21:10.998627 #1] INFO -- : > su postgres -c 'psql discourse -c "grant all privileges on database discourse to discourse;"' || true
psql: error: connection to server on socket "/var/run/postgresql/.s.PGSQL.5432" failed: No such file or directory
Is the server running locally and accepting connections on that socket?
I, [2023-08-29T09:21:11.155559 #1] INFO -- :
I, [2023-08-29T09:21:11.155939 #1] INFO -- : > su postgres -c 'psql discourse -c "alter schema public owner to discourse;"'
psql: error: connection to server on socket "/var/run/postgresql/.s.PGSQL.5432" failed: No such file or directory
Is the server running locally and accepting connections on that socket?
I, [2023-08-29T09:21:11.234509 #1] INFO -- :
I, [2023-08-29T09:21:11.234929 #1] INFO -- : 非同期プロセスの終了中
I, [2023-08-29T09:21:11.235014 #1] INFO -- : INT を 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 に送信中
2023-08-29 09:21:11.837 UTC [42] LOG: PostgreSQL 13.12 (Debian 13.12-1.pgdg110+1) を x86_64-pc-linux-gnu で起動中、コンパイルは gcc (Debian 10.2.1-6) 10.2.1 20210110、64-bit
2023-08-29 09:21:11.840 UTC [42] LOG: IPv4 アドレス "0.0.0.0"、ポート 5432 でリッスン中
2023-08-29 09:21:11.841 UTC [42] LOG: IPv6 アドレス "::"、ポート 5432 でリッスン中
2023-08-29 09:21:11.845 UTC [42] LOG: Unix ソケット "/var/run/postgresql/.s.PGSQL.5432" でリッスン中
2023-08-29 09:21:11.857 UTC [59] LOG: データベースシステムは 2023-08-28 20:07:59 UTC にシャットダウンされました
2023-08-29 09:21:11.858 UTC [42] LOG: 高速シャットダウン要求を受信
2023-08-29 09:21:11.886 UTC [60] LOG: シャットダウン中
2023-08-29 09:21:11.951 UTC [42] LOG: データベースシステムはシャットダウンされました
FAILED
--------------------
Pups::ExecError: su postgres -c 'psql discourse -c "alter schema public owner to discourse;"' がリターンコード #<Process::Status: pid 54 exit 2> で失敗しました
失敗箇所: /usr/local/lib/ruby/gems/3.2.0/gems/pups-1.1.1/lib/pups/exec_command.rb:117:in `spawn'
exec はパラメータ "su postgres -c 'psql $db_name -c \"alter schema public owner to $db_user;\"'" で失敗しました
ブートストラップは終了コード 2 で失敗しました
** ブートストラップに失敗しました ** 上記にスクロールして、以前のエラーメッセージを探してください。複数ある可能性があります。
./discourse-doctor が問題を診断するのに役立つかもしれません。
cb872ebd191014b5830401bd5344221c3f23b472a52f7fe0d08ec72b4d430648
root@vmi1305212:/var/discourse#