Unable to boostrap Discourse since last upgrade

Hello,

I have failed the last upgrade and when I was trying to rebuld the app through CLI, I received this error message. No idea why it’s trying to create a new database tho… I already have data within it. I have already fixed the Github issue though.

root@raspberry:/var/discourse# ./launcher rebuild app
Press any key to continue
WARNING: We are about to start downloading the Discourse base image
This process may take anywhere between a few minutes to an hour, depending on your network speed

Please be patient

aarch64: Pulling from discourse/base
Digest: sha256:542d0d994beb63a22671906445f1845d5d540fe0966f13cbdf248f9b42726d8c
Status: Image is up to date for discourse/base:aarch64
docker.io/discourse/base:aarch64
Ensuring launcher is up to date
Fetching origin
git@github.com: Permission denied (publickey).
fatal: Could not read from remote repository.

Please make sure you have the correct access rights
and the repository exists.
error: Could not fetch origin
Launcher is up-to-date
Stopping old container
+ /usr/bin/docker stop -t 60 app
app
aarch64: Pulling from discourse/base
Digest: sha256:542d0d994beb63a22671906445f1845d5d540fe0966f13cbdf248f9b42726d8c
Status: Image is up to date for discourse/base:aarch64
docker.io/discourse/base:aarch64
/usr/local/lib/ruby/gems/3.1.0/gems/pups-1.1.1/lib/pups.rb
/usr/local/bin/pups --stdin
I, [2023-01-22T16:12:27.964252 #1]  INFO -- : Reading from stdin
I, [2023-01-22T16:12:27.979386 #1]  INFO -- : > locale-gen $LANG && update-locale
I, [2023-01-22T16:12:28.092157 #1]  INFO -- : Generating locales (this might take a while)...
Generation complete.

I, [2023-01-22T16:12:28.092667 #1]  INFO -- : > mkdir -p /shared/postgres_run
I, [2023-01-22T16:12:28.103742 #1]  INFO -- : 
I, [2023-01-22T16:12:28.104616 #1]  INFO -- : > chown postgres:postgres /shared/postgres_run
I, [2023-01-22T16:12:28.115315 #1]  INFO -- : 
I, [2023-01-22T16:12:28.116015 #1]  INFO -- : > chmod 775 /shared/postgres_run
I, [2023-01-22T16:12:28.125897 #1]  INFO -- : 
I, [2023-01-22T16:12:28.126613 #1]  INFO -- : > rm -fr /var/run/postgresql
I, [2023-01-22T16:12:28.137845 #1]  INFO -- : 
I, [2023-01-22T16:12:28.138557 #1]  INFO -- : > ln -s /shared/postgres_run /var/run/postgresql
I, [2023-01-22T16:12:28.148763 #1]  INFO -- : 
I, [2023-01-22T16:12:28.150244 #1]  INFO -- : > socat /dev/null UNIX-CONNECT:/shared/postgres_run/.s.PGSQL.5432 || exit 0 && echo postgres already running stop container ; exit 1
2023/01/22 16:12:28 socat[20] E connect(6, AF=1 "/shared/postgres_run/.s.PGSQL.5432", 36): No such file or directory
I, [2023-01-22T16:12:28.169499 #1]  INFO -- : 
I, [2023-01-22T16:12:28.170128 #1]  INFO -- : > rm -fr /shared/postgres_run/.s*
I, [2023-01-22T16:12:28.183364 #1]  INFO -- : 
I, [2023-01-22T16:12:28.183812 #1]  INFO -- : > rm -fr /shared/postgres_run/*.pid
I, [2023-01-22T16:12:28.196748 #1]  INFO -- : 
I, [2023-01-22T16:12:28.197202 #1]  INFO -- : > mkdir -p /shared/postgres_run/13-main.pg_stat_tmp
I, [2023-01-22T16:12:28.207959 #1]  INFO -- : 
I, [2023-01-22T16:12:28.209215 #1]  INFO -- : > chown postgres:postgres /shared/postgres_run/13-main.pg_stat_tmp
I, [2023-01-22T16:12:28.219905 #1]  INFO -- : 
I, [2023-01-22T16:12:28.242813 #1]  INFO -- : File > /etc/service/postgres/run  chmod: +x  chown: 
I, [2023-01-22T16:12:28.265066 #1]  INFO -- : File > /etc/service/postgres/log/run  chmod: +x  chown: 
I, [2023-01-22T16:12:28.287938 #1]  INFO -- : File > /etc/runit/3.d/99-postgres  chmod: +x  chown: 
I, [2023-01-22T16:12:28.310001 #1]  INFO -- : File > /root/upgrade_postgres  chmod: +x  chown: 
I, [2023-01-22T16:12:28.310740 #1]  INFO -- : > chown -R root /var/lib/postgresql/13/main
I, [2023-01-22T16:12:31.207100 #1]  INFO -- : 
I, [2023-01-22T16:12:31.207757 #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-01-22T16:12:31.216695 #1]  INFO -- : 
I, [2023-01-22T16:12:31.216948 #1]  INFO -- : > chown -R postgres:postgres /shared/postgres_data
I, [2023-01-22T16:12:31.308519 #1]  INFO -- : 
I, [2023-01-22T16:12:31.314210 #1]  INFO -- : > chown -R postgres:postgres /var/run/postgresql
I, [2023-01-22T16:12:31.334076 #1]  INFO -- : 
I, [2023-01-22T16:12:31.334775 #1]  INFO -- : > /root/upgrade_postgres
I, [2023-01-22T16:12:31.352468 #1]  INFO -- : 
I, [2023-01-22T16:12:31.352904 #1]  INFO -- : > rm /root/upgrade_postgres
I, [2023-01-22T16:12:31.363279 #1]  INFO -- : 
I, [2023-01-22T16:12:31.364418 #1]  INFO -- : Replacing data_directory = '/var/lib/postgresql/13/main' with data_directory = '/shared/postgres_data' in /etc/postgresql/13/main/postgresql.conf
I, [2023-01-22T16:12:31.366869 #1]  INFO -- : Replacing (?-mix:#?listen_addresses *=.*) with listen_addresses = '*' in /etc/postgresql/13/main/postgresql.conf
I, [2023-01-22T16:12:31.368383 #1]  INFO -- : Replacing (?-mix:#?synchronous_commit *=.*) with synchronous_commit = $db_synchronous_commit in /etc/postgresql/13/main/postgresql.conf
I, [2023-01-22T16:12:31.369927 #1]  INFO -- : Replacing (?-mix:#?shared_buffers *=.*) with shared_buffers = $db_shared_buffers in /etc/postgresql/13/main/postgresql.conf
I, [2023-01-22T16:12:31.371692 #1]  INFO -- : Replacing (?-mix:#?work_mem *=.*) with work_mem = $db_work_mem in /etc/postgresql/13/main/postgresql.conf
I, [2023-01-22T16:12:31.373159 #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, [2023-01-22T16:12:31.374500 #1]  INFO -- : > install -d -m 0755 -o postgres -g postgres /shared/postgres_backup
I, [2023-01-22T16:12:31.387401 #1]  INFO -- : 
I, [2023-01-22T16:12:31.388823 #1]  INFO -- : Replacing (?-mix:#?checkpoint_segments *=.*) with checkpoint_segments = $db_checkpoint_segments in /etc/postgresql/13/main/postgresql.conf
I, [2023-01-22T16:12:31.390337 #1]  INFO -- : Replacing (?-mix:#?logging_collector *=.*) with logging_collector = $db_logging_collector in /etc/postgresql/13/main/postgresql.conf
I, [2023-01-22T16:12:31.391905 #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, [2023-01-22T16:12:31.393468 #1]  INFO -- : Replacing (?-mix:^#local +replication +postgres +peer$) with local replication postgres  peer in /etc/postgresql/13/main/pg_hba.conf
I, [2023-01-22T16:12:31.394842 #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, [2023-01-22T16:12:31.396007 #1]  INFO -- : Replacing (?-mix:^host.*all.*all.*::1\/128.*$) with host all all ::/0 md5 in /etc/postgresql/13/main/pg_hba.conf
I, [2023-01-22T16:12:31.396988 #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-01-22T16:12:31.405116 #1]  INFO -- : > sleep 5
2023-01-22 16:12:31.519 UTC [43] LOG:  starting PostgreSQL 13.9 (Debian 13.9-1.pgdg110+1) on aarch64-unknown-linux-gnu, compiled by gcc (Debian 10.2.1-6) 10.2.1 20210110, 64-bit
2023-01-22 16:12:31.520 UTC [43] LOG:  listening on IPv4 address "0.0.0.0", port 5432
2023-01-22 16:12:31.520 UTC [43] LOG:  listening on IPv6 address "::", port 5432
2023-01-22 16:12:31.526 UTC [43] LOG:  listening on Unix socket "/var/run/postgresql/.s.PGSQL.5432"
2023-01-22 16:12:31.560 UTC [46] LOG:  database system was shut down at 2023-01-22 16:11:19 UTC
2023-01-22 16:12:31.578 UTC [43] LOG:  database system is ready to accept connections
I, [2023-01-22T16:12:36.415656 #1]  INFO -- : 
I, [2023-01-22T16:12:36.416431 #1]  INFO -- : > su postgres -c 'createdb discourse' || true
2023-01-22 16:12:36.581 UTC [56] postgres@postgres ERROR:  database "discourse" already exists
2023-01-22 16:12:36.581 UTC [56] postgres@postgres STATEMENT:  CREATE DATABASE discourse;
createdb: error: database creation failed: ERROR:  database "discourse" already exists
I, [2023-01-22T16:12:36.588149 #1]  INFO -- : 
I, [2023-01-22T16:12:36.588684 #1]  INFO -- : > su postgres -c 'psql discourse -c "create user discourse;"' || true
2023-01-22 16:12:36.748 UTC [60] postgres@discourse ERROR:  role "discourse" already exists
2023-01-22 16:12:36.748 UTC [60] postgres@discourse STATEMENT:  create user discourse;
ERROR:  role "discourse" already exists
I, [2023-01-22T16:12:36.754542 #1]  INFO -- : 
I, [2023-01-22T16:12:36.755298 #1]  INFO -- : > su postgres -c 'psql discourse -c "grant all privileges on database discourse to discourse;"' || true
I, [2023-01-22T16:12:36.910457 #1]  INFO -- : GRANT

I, [2023-01-22T16:12:36.911184 #1]  INFO -- : > su postgres -c 'psql discourse -c "alter schema public owner to discourse;"'
I, [2023-01-22T16:12:37.068814 #1]  INFO -- : ALTER SCHEMA

I, [2023-01-22T16:12:37.069964 #1]  INFO -- : > su postgres -c 'psql template1 -c "create extension if not exists hstore;"'
NOTICE:  extension "hstore" already exists, skipping
I, [2023-01-22T16:12:37.236112 #1]  INFO -- : CREATE EXTENSION

I, [2023-01-22T16:12:37.237144 #1]  INFO -- : > su postgres -c 'psql template1 -c "create extension if not exists pg_trgm;"'
NOTICE:  extension "pg_trgm" already exists, skipping
I, [2023-01-22T16:12:37.391853 #1]  INFO -- : CREATE EXTENSION

I, [2023-01-22T16:12:37.393031 #1]  INFO -- : > su postgres -c 'psql discourse -c "create extension if not exists hstore;"'
NOTICE:  extension "hstore" already exists, skipping
I, [2023-01-22T16:12:37.547935 #1]  INFO -- : CREATE EXTENSION

I, [2023-01-22T16:12:37.548436 #1]  INFO -- : > su postgres -c 'psql discourse -c "create extension if not exists pg_trgm;"'
NOTICE:  extension "pg_trgm" already exists, skipping
I, [2023-01-22T16:12:37.701854 #1]  INFO -- : CREATE EXTENSION

I, [2023-01-22T16:12:37.703007 #1]  INFO -- : > sudo -u postgres psql discourse
I, [2023-01-22T16:12:37.711018 #1]  INFO -- : update pg_database set encoding = pg_char_to_encoding('UTF8') where datname = 'discourse' AND encoding = pg_char_to_encoding('SQL_ASCII');

I, [2023-01-22T16:12:37.890625 #1]  INFO -- : File > /var/lib/postgresql/take-database-backup  chmod: +x  chown: postgres:postgres
I, [2023-01-22T16:12:37.903142 #1]  INFO -- : File > /var/spool/cron/crontabs/postgres  chmod:   chown: 
I, [2023-01-22T16:12:37.903435 #1]  INFO -- : > echo postgres installed!
I, [2023-01-22T16:12:37.913623 #1]  INFO -- : postgres installed!

I, [2023-01-22T16:12:37.936127 #1]  INFO -- : File > /etc/service/redis/run  chmod: +x  chown: 
I, [2023-01-22T16:12:37.958376 #1]  INFO -- : File > /etc/service/redis/log/run  chmod: +x  chown: 
I, [2023-01-22T16:12:37.980097 #1]  INFO -- : File > /etc/runit/3.d/10-redis  chmod: +x  chown: 
I, [2023-01-22T16:12:37.981025 #1]  INFO -- : Replacing daemonize yes with  in /etc/redis/redis.conf
I, [2023-01-22T16:12:37.983882 #1]  INFO -- : Replacing (?-mix:^pidfile.*$) with  in /etc/redis/redis.conf
I, [2023-01-22T16:12:37.985853 #1]  INFO -- : > install -d -m 0755 -o redis -g redis /shared/redis_data
I, [2023-01-22T16:12:37.998106 #1]  INFO -- : 
I, [2023-01-22T16:12:37.999788 #1]  INFO -- : Replacing (?-mix:^logfile.*$) with logfile "" in /etc/redis/redis.conf
I, [2023-01-22T16:12:38.002364 #1]  INFO -- : Replacing (?-mix:^bind .*$) with  in /etc/redis/redis.conf
I, [2023-01-22T16:12:38.004780 #1]  INFO -- : Replacing (?-mix:^dir .*$) with dir /shared/redis_data in /etc/redis/redis.conf
I, [2023-01-22T16:12:38.007624 #1]  INFO -- : Replacing (?-mix:^protected-mode yes) with protected-mode no in /etc/redis/redis.conf
I, [2023-01-22T16:12:38.009956 #1]  INFO -- : Replacing # io-threads 4 with io-threads $redis_io_threads in /etc/redis/redis.conf
I, [2023-01-22T16:12:38.011884 #1]  INFO -- : > echo redis installed
I, [2023-01-22T16:12:38.022061 #1]  INFO -- : redis installed

I, [2023-01-22T16:12:38.022796 #1]  INFO -- : > cat /etc/redis/redis.conf | grep logfile
I, [2023-01-22T16:12:38.037763 #1]  INFO -- : logfile ""

I, [2023-01-22T16:12:38.038254 #1]  INFO -- : > exec chpst -u redis -U redis /usr/bin/redis-server /etc/redis/redis.conf
I, [2023-01-22T16:12:38.046504 #1]  INFO -- : > sleep 10
104:C 22 Jan 2023 16:12:38.069 # oO0OoO0OoO0Oo Redis is starting oO0OoO0OoO0Oo
104:C 22 Jan 2023 16:12:38.069 # Redis version=7.0.7, bits=64, commit=00000000, modified=0, pid=104, just started
104:C 22 Jan 2023 16:12:38.069 # Configuration loaded
104:M 22 Jan 2023 16:12:38.070 * monotonic clock: POSIX clock_gettime
104:M 22 Jan 2023 16:12:38.072 * Running mode=standalone, port=6379.
104:M 22 Jan 2023 16:12:38.072 # Server initialized
104:M 22 Jan 2023 16:12:38.073 # 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 22 Jan 2023 16:12:38.077 * Loading RDB produced by version 7.0.7
104:M 22 Jan 2023 16:12:38.077 * RDB age 79 seconds
104:M 22 Jan 2023 16:12:38.077 * RDB memory usage when created 2.34 Mb
104:M 22 Jan 2023 16:12:38.090 * Done loading RDB, keys loaded: 489, keys expired: 0.
104:M 22 Jan 2023 16:12:38.090 * DB loaded from disk: 0.013 seconds
104:M 22 Jan 2023 16:12:38.090 * Ready to accept connections
I, [2023-01-22T16:12:48.057136 #1]  INFO -- : 
I, [2023-01-22T16:12:48.059228 #1]  INFO -- : > thpoff echo "thpoff is installed!"
I, [2023-01-22T16:12:48.099935 #1]  INFO -- : thpoff is installed!

I, [2023-01-22T16:12:48.101007 #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, [2023-01-22T16:12:48.412363 #1]  INFO -- : 
I, [2023-01-22T16:12:48.412857 #1]  INFO -- : > /usr/local/bin/ruby -e 'if ENV["DISCOURSE_HOSTNAME"] == "discourse.example.com"; puts "Aborting! Domain is not configured!"; exit 1; end'
I, [2023-01-22T16:12:48.682765 #1]  INFO -- : 
I, [2023-01-22T16:12:48.683250 #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, [2023-01-22T16:12:48.951632 #1]  INFO -- : 
I, [2023-01-22T16:12:48.952136 #1]  INFO -- : > rm -f /etc/cron.d/anacron
I, [2023-01-22T16:12:48.962921 #1]  INFO -- : 
I, [2023-01-22T16:12:48.975630 #1]  INFO -- : File > /etc/cron.d/anacron  chmod:   chown: 
I, [2023-01-22T16:12:48.998810 #1]  INFO -- : File > /etc/runit/1.d/copy-env  chmod: +x  chown: 
I, [2023-01-22T16:12:49.021734 #1]  INFO -- : File > /etc/service/unicorn/run  chmod: +x  chown: 
I, [2023-01-22T16:12:49.044617 #1]  INFO -- : File > /etc/service/nginx/run  chmod: +x  chown: 
I, [2023-01-22T16:12:49.067385 #1]  INFO -- : File > /etc/runit/3.d/01-nginx  chmod: +x  chown: 
I, [2023-01-22T16:12:49.090353 #1]  INFO -- : File > /etc/runit/3.d/02-unicorn  chmod: +x  chown: 
I, [2023-01-22T16:12:49.090829 #1]  INFO -- : Replacing # postgres with sv start postgres || exit 1 in /etc/service/unicorn/run
I, [2023-01-22T16:12:49.091990 #1]  INFO -- : > exec chpst -u redis -U redis /usr/bin/redis-server /etc/redis/redis.conf
I, [2023-01-22T16:12:49.102512 #1]  INFO -- : > cd /var/www/discourse && git reset --hard
132:C 22 Jan 2023 16:12:49.123 # oO0OoO0OoO0Oo Redis is starting oO0OoO0OoO0Oo
132:C 22 Jan 2023 16:12:49.123 # Redis version=7.0.7, bits=64, commit=00000000, modified=0, pid=132, just started
132:C 22 Jan 2023 16:12:49.123 # Configuration loaded
132:M 22 Jan 2023 16:12:49.124 * monotonic clock: POSIX clock_gettime
132:M 22 Jan 2023 16:12:49.126 # Warning: Could not create server TCP listening socket *:6379: bind: Address already in use
132:M 22 Jan 2023 16:12:49.126 # Failed listening on port 6379 (TCP), aborting.
Updating files: 100% (32693/32693), done.
I, [2023-01-22T16:13:01.259871 #1]  INFO -- : HEAD is now at 666536cb DEV: Prefer \A and \z over ^ and $ in regexes (#19936)

I, [2023-01-22T16:13:01.260171 #1]  INFO -- : > cd /var/www/discourse && git clean -f
I, [2023-01-22T16:13:02.050174 #1]  INFO -- : 
I, [2023-01-22T16:13:02.050460 #1]  INFO -- : > cd /var/www/discourse && git remote set-branches --add origin main
I, [2023-01-22T16:13:02.066433 #1]  INFO -- : 
I, [2023-01-22T16:13:02.066729 #1]  INFO -- : > cd /var/www/discourse && git remote set-branches origin tests-passed
I, [2023-01-22T16:13:02.083255 #1]  INFO -- : 
I, [2023-01-22T16:13:02.083545 #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, [2023-01-22T16:13:05.391345 #1]  INFO -- : 
I, [2023-01-22T16:13:05.391616 #1]  INFO -- : > cd /var/www/discourse && git checkout tests-passed
Switched to a new branch 'tests-passed'
I, [2023-01-22T16:13:05.859548 #1]  INFO -- : Branch 'tests-passed' set up to track remote branch 'tests-passed' from 'origin'.

I, [2023-01-22T16:13:05.859819 #1]  INFO -- : > cd /var/www/discourse && mkdir -p tmp
I, [2023-01-22T16:13:05.875697 #1]  INFO -- : 
I, [2023-01-22T16:13:05.875998 #1]  INFO -- : > cd /var/www/discourse && chown discourse:www-data tmp
I, [2023-01-22T16:13:05.890377 #1]  INFO -- : 
I, [2023-01-22T16:13:05.890688 #1]  INFO -- : > cd /var/www/discourse && mkdir -p tmp/pids
I, [2023-01-22T16:13:05.905017 #1]  INFO -- : 
I, [2023-01-22T16:13:05.905319 #1]  INFO -- : > cd /var/www/discourse && mkdir -p tmp/sockets
I, [2023-01-22T16:13:05.919648 #1]  INFO -- : 
I, [2023-01-22T16:13:05.919912 #1]  INFO -- : > cd /var/www/discourse && touch tmp/.gitkeep
I, [2023-01-22T16:13:05.933121 #1]  INFO -- : 
I, [2023-01-22T16:13:05.933466 #1]  INFO -- : > cd /var/www/discourse && mkdir -p                    /shared/log/rails
I, [2023-01-22T16:13:05.948420 #1]  INFO -- : 
I, [2023-01-22T16:13:05.948698 #1]  INFO -- : > cd /var/www/discourse && bash -c "touch -a           /shared/log/rails/{production,production_errors,unicorn.stdout,unicorn.stderr,sidekiq}.log"
I, [2023-01-22T16:13:05.970561 #1]  INFO -- : 
I, [2023-01-22T16:13:05.970804 #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, [2023-01-22T16:13:05.991807 #1]  INFO -- : 
I, [2023-01-22T16:13:05.992147 #1]  INFO -- : > cd /var/www/discourse && bash -c "mkdir -p           /shared/{uploads,backups}"
I, [2023-01-22T16:13:06.012076 #1]  INFO -- : 
I, [2023-01-22T16:13:06.012329 #1]  INFO -- : > cd /var/www/discourse && bash -c "ln    -s           /shared/{uploads,backups} /var/www/discourse/public"
I, [2023-01-22T16:13:06.031421 #1]  INFO -- : 
I, [2023-01-22T16:13:06.031681 #1]  INFO -- : > cd /var/www/discourse && bash -c "mkdir -p           /shared/tmp/{backups,restores}"
I, [2023-01-22T16:13:06.051759 #1]  INFO -- : 
I, [2023-01-22T16:13:06.052008 #1]  INFO -- : > cd /var/www/discourse && bash -c "ln    -s           /shared/tmp/{backups,restores} /var/www/discourse/tmp"
I, [2023-01-22T16:13:06.071357 #1]  INFO -- : 
I, [2023-01-22T16:13:06.071627 #1]  INFO -- : > cd /var/www/discourse && chown -R discourse:www-data /shared/log/rails /shared/uploads /shared/backups /shared/tmp
I, [2023-01-22T16:13:06.095048 #1]  INFO -- : 
I, [2023-01-22T16:13:06.095325 #1]  INFO -- : > cd /var/www/discourse && find public/plugins/ -maxdepth 1 -xtype l -delete
find: ‘public/plugins/’: No such file or directory
I, [2023-01-22T16:13:06.110618 #1]  INFO -- : 
I, [2023-01-22T16:13:06.111471 #1]  INFO -- : Terminating async processes
I, [2023-01-22T16:13:06.111687 #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: 43
I, [2023-01-22T16:13:06.111876 #1]  INFO -- : Sending TERM to exec chpst -u redis -U redis /usr/bin/redis-server /etc/redis/redis.conf pid: 104
2023-01-22 16:13:06.112 UTC [43] LOG:  received fast shutdown request
104:signal-handler (1674403986) Received SIGTERM scheduling shutdown...
104:M 22 Jan 2023 16:13:06.117 # User requested shutdown...
104:M 22 Jan 2023 16:13:06.117 * Saving the final RDB snapshot before exiting.
2023-01-22 16:13:06.146 UTC [43] LOG:  aborting any active transactions
2023-01-22 16:13:06.154 UTC [43] LOG:  background worker "logical replication launcher" (PID 52) exited with exit code 1
2023-01-22 16:13:06.154 UTC [47] LOG:  shutting down
104:M 22 Jan 2023 16:13:06.158 * DB saved on disk
104:M 22 Jan 2023 16:13:06.158 # Redis is now ready to exit, bye bye...
2023-01-22 16:13:06.212 UTC [43] LOG:  database system is shut down


FAILED
--------------------
Pups::ExecError: cd /var/www/discourse && find public/plugins/ -maxdepth 1 -xtype l -delete failed with return #<Process::Status: pid 220 exit 1>
Location of failure: /usr/local/lib/ruby/gems/3.1.0/gems/pups-1.1.1/lib/pups/exec_command.rb:117:in `spawn'
exec failed with the params {"cd"=>"$home", "hook"=>"code", "cmd"=>["git reset --hard", "git clean -f", "git remote set-branches --add origin main", "git remote set-branches origin $version", "git fetch --depth 1 origin $version", "git checkout $version", "mkdir -p tmp", "chown discourse:www-data tmp", "mkdir -p tmp/pids", "mkdir -p tmp/sockets", "touch tmp/.gitkeep", "mkdir -p                    /shared/log/rails", "bash -c \"touch -a           /shared/log/rails/{production,production_errors,unicorn.stdout,unicorn.stderr,sidekiq}.log\"", "bash -c \"ln    -s           /shared/log/rails/{production,production_errors,unicorn.stdout,unicorn.stderr,sidekiq}.log $home/log\"", "bash -c \"mkdir -p           /shared/{uploads,backups}\"", "bash -c \"ln    -s           /shared/{uploads,backups} $home/public\"", "bash -c \"mkdir -p           /shared/tmp/{backups,restores}\"", "bash -c \"ln    -s           /shared/tmp/{backups,restores} $home/tmp\"", "chown -R discourse:www-data /shared/log/rails /shared/uploads /shared/backups /shared/tmp", "find public/plugins/ -maxdepth 1 -xtype l -delete"]}
bootstrap failed with exit code 1
** FAILED TO BOOTSTRAP ** please scroll up and look for earlier error messages, there may be more than one.
./discourse-doctor may help diagnose the problem.
cafd6d79bccd64364c62a194be3256627fadc84219e801b2db34d42e0c74317c

Discourse Doctor output

root@raspberry:/var/discourse# ./discourse-doctor 
DISCOURSE DOCTOR Sun Jan 22 16:24:12 UTC 2023
OS: Linux raspberry.local 5.15.0-1023-raspi #25-Ubuntu SMP PREEMPT Fri Jan 6 17:33:55 UTC 2023 aarch64 aarch64 aarch64 GNU/Linux


Found containers/app.yml

==================== YML SETTINGS ====================
DISCOURSE_HOSTNAME=community.brohosting.eu
SMTP_ADDRESS=smtppro.zoho.eu
DEVELOPER_EMAILS=community@brohosting.eu
SMTP_PASSWORD=
SMTP_PORT=587
SMTP_USER_NAME=info@brohosting.eu
LETSENCRYPT_ACCOUNT_EMAIL=

==================== DOCKER INFO ====================
DOCKER VERSION: Docker version 20.10.23, build 7155243

DOCKER PROCESSES (docker ps -a)

CONTAINER ID   IMAGE                           COMMAND                  CREATED             STATUS                      PORTS                                       NAMES
eed5adab97e8   discourse/base:aarch64          "/bin/bash -c '/usr/…"   23 minutes ago      Exited (1) 23 minutes ago                                               focused_margulis
04d989fd8487   discourse/base:aarch64          "/bin/bash -c '/usr/…"   25 minutes ago      Exited (1) 24 minutes ago                                               elastic_blackwell
67664c06bc60   redis:alpine                    "docker-entrypoint.s…"   About an hour ago   Up About an hour            6379/tcp                                    redis
de269955b53d   searxng/searxng:latest          "/sbin/tini -- /usr/…"   About an hour ago   Up About an hour            0.0.0.0:8080->8080/tcp, :::8080->8080/tcp   searxng
484e720749e8   local_discourse/app             "/sbin/boot"             2 months ago        Exited (6) 13 minutes ago                                               app
cd683542483d   crazyquark/freepbx:15-aarch64   "/bin/sh -c /run/sta…"   3 months ago        Exited (137) 3 months ago                                               xenodochial_chatterjee
627d541d18aa   crazyquark/freepbx:15-aarch64   "/bin/sh -c /run/sta…"   3 months ago        Exited (137) 3 months ago                                               cool_aryabhata
d511d493619c   crazyquark/freepbx:latest       "/bin/sh -c /run/sta…"   3 months ago        Exited (1) 3 months ago                                                 focused_hertz
b8875b8ef2b6   crazyquark/freepbx:latest       "/bin/sh -c /run/sta…"   3 months ago        Exited (1) 3 months ago                                                 relaxed_ramanujan
5a756dee6068   2b0434fdb642                    "/bin/bash -c '/usr/…"   4 months ago        Exited (1) 4 months ago                                                 agitated_proskuriakova
f06daecacaad   2b0434fdb642                    "/bin/bash -c '/usr/…"   4 months ago        Exited (1) 4 months ago                                                 wonderful_lalande

==================== SERIOUS PROBLEM!!!! ====================
app not running!
Attempting to rebuild
==================== REBUILD LOG ====================
WARNING: Support for aarch64 is experimental at the moment. Please report any problems at https://meta.discourse.org/tag/arm 
Press any key to continue
WARNING: We are about to start downloading the Discourse base image
This process may take anywhere between a few minutes to an hour, depending on your network speed

Please be patient

aarch64: Pulling from discourse/base
Digest: sha256:542d0d994beb63a22671906445f1845d5d540fe0966f13cbdf248f9b42726d8c
Status: Image is up to date for discourse/base:aarch64
docker.io/discourse/base:aarch64
Ensuring launcher is up to date
Fetching origin
Launcher is up-to-date
Stopping old container
+ /usr/bin/docker stop -t 60 app
app
aarch64: Pulling from discourse/base
Digest: sha256:542d0d994beb63a22671906445f1845d5d540fe0966f13cbdf248f9b42726d8c
Status: Image is up to date for discourse/base:aarch64
docker.io/discourse/base:aarch64
/usr/local/lib/ruby/gems/3.1.0/gems/pups-1.1.1/lib/pups.rb
/usr/local/bin/pups --stdin
I, [2023-01-22T16:24:41.837234 #1]  INFO -- : Reading from stdin
I, [2023-01-22T16:24:41.853944 #1]  INFO -- : > locale-gen $LANG && update-locale
I, [2023-01-22T16:24:41.966292 #1]  INFO -- : Generating locales (this might take a while)...
Generation complete.

I, [2023-01-22T16:24:41.966821 #1]  INFO -- : > mkdir -p /shared/postgres_run
I, [2023-01-22T16:24:41.978027 #1]  INFO -- : 
I, [2023-01-22T16:24:41.978907 #1]  INFO -- : > chown postgres:postgres /shared/postgres_run
I, [2023-01-22T16:24:41.989551 #1]  INFO -- : 
I, [2023-01-22T16:24:41.990313 #1]  INFO -- : > chmod 775 /shared/postgres_run
I, [2023-01-22T16:24:42.000722 #1]  INFO -- : 
I, [2023-01-22T16:24:42.001478 #1]  INFO -- : > rm -fr /var/run/postgresql
I, [2023-01-22T16:24:42.012503 #1]  INFO -- : 
I, [2023-01-22T16:24:42.013209 #1]  INFO -- : > ln -s /shared/postgres_run /var/run/postgresql
I, [2023-01-22T16:24:42.023515 #1]  INFO -- : 
I, [2023-01-22T16:24:42.024244 #1]  INFO -- : > socat /dev/null UNIX-CONNECT:/shared/postgres_run/.s.PGSQL.5432 || exit 0 && echo postgres already running stop container ; exit 1
2023/01/22 16:24:42 socat[19] E connect(6, AF=1 "/shared/postgres_run/.s.PGSQL.5432", 36): No such file or directory
I, [2023-01-22T16:24:42.051026 #1]  INFO -- : 
I, [2023-01-22T16:24:42.051474 #1]  INFO -- : > rm -fr /shared/postgres_run/.s*
I, [2023-01-22T16:24:42.064138 #1]  INFO -- : 
I, [2023-01-22T16:24:42.064588 #1]  INFO -- : > rm -fr /shared/postgres_run/*.pid
I, [2023-01-22T16:24:42.077155 #1]  INFO -- : 
I, [2023-01-22T16:24:42.077636 #1]  INFO -- : > mkdir -p /shared/postgres_run/13-main.pg_stat_tmp
I, [2023-01-22T16:24:42.088590 #1]  INFO -- : 
I, [2023-01-22T16:24:42.089640 #1]  INFO -- : > chown postgres:postgres /shared/postgres_run/13-main.pg_stat_tmp
I, [2023-01-22T16:24:42.100208 #1]  INFO -- : 
I, [2023-01-22T16:24:42.123002 #1]  INFO -- : File > /etc/service/postgres/run  chmod: +x  chown: 
I, [2023-01-22T16:24:42.146239 #1]  INFO -- : File > /etc/service/postgres/log/run  chmod: +x  chown: 
I, [2023-01-22T16:24:42.168606 #1]  INFO -- : File > /etc/runit/3.d/99-postgres  chmod: +x  chown: 
I, [2023-01-22T16:24:42.190872 #1]  INFO -- : File > /root/upgrade_postgres  chmod: +x  chown: 
I, [2023-01-22T16:24:42.191636 #1]  INFO -- : > chown -R root /var/lib/postgresql/13/main
I, [2023-01-22T16:24:45.534791 #1]  INFO -- : 
I, [2023-01-22T16:24:45.535449 #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-01-22T16:24:45.544552 #1]  INFO -- : 
I, [2023-01-22T16:24:45.544817 #1]  INFO -- : > chown -R postgres:postgres /shared/postgres_data
I, [2023-01-22T16:24:45.623644 #1]  INFO -- : 
I, [2023-01-22T16:24:45.624364 #1]  INFO -- : > chown -R postgres:postgres /var/run/postgresql
I, [2023-01-22T16:24:45.635166 #1]  INFO -- : 
I, [2023-01-22T16:24:45.635862 #1]  INFO -- : > /root/upgrade_postgres
I, [2023-01-22T16:24:45.654070 #1]  INFO -- : 
I, [2023-01-22T16:24:45.654555 #1]  INFO -- : > rm /root/upgrade_postgres
I, [2023-01-22T16:24:45.664745 #1]  INFO -- : 
I, [2023-01-22T16:24:45.665933 #1]  INFO -- : Replacing data_directory = '/var/lib/postgresql/13/main' with data_directory = '/shared/postgres_data' in /etc/postgresql/13/main/postgresql.conf
I, [2023-01-22T16:24:45.668562 #1]  INFO -- : Replacing (?-mix:#?listen_addresses *=.*) with listen_addresses = '*' in /etc/postgresql/13/main/postgresql.conf
I, [2023-01-22T16:24:45.670257 #1]  INFO -- : Replacing (?-mix:#?synchronous_commit *=.*) with synchronous_commit = $db_synchronous_commit in /etc/postgresql/13/main/postgresql.conf
I, [2023-01-22T16:24:45.671842 #1]  INFO -- : Replacing (?-mix:#?shared_buffers *=.*) with shared_buffers = $db_shared_buffers in /etc/postgresql/13/main/postgresql.conf
I, [2023-01-22T16:24:45.674034 #1]  INFO -- : Replacing (?-mix:#?work_mem *=.*) with work_mem = $db_work_mem in /etc/postgresql/13/main/postgresql.conf
I, [2023-01-22T16:24:45.675627 #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, [2023-01-22T16:24:45.677249 #1]  INFO -- : > install -d -m 0755 -o postgres -g postgres /shared/postgres_backup
I, [2023-01-22T16:24:45.689553 #1]  INFO -- : 
I, [2023-01-22T16:24:45.691279 #1]  INFO -- : Replacing (?-mix:#?checkpoint_segments *=.*) with checkpoint_segments = $db_checkpoint_segments in /etc/postgresql/13/main/postgresql.conf
I, [2023-01-22T16:24:45.692839 #1]  INFO -- : Replacing (?-mix:#?logging_collector *=.*) with logging_collector = $db_logging_collector in /etc/postgresql/13/main/postgresql.conf
I, [2023-01-22T16:24:45.694783 #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, [2023-01-22T16:24:45.696428 #1]  INFO -- : Replacing (?-mix:^#local +replication +postgres +peer$) with local replication postgres  peer in /etc/postgresql/13/main/pg_hba.conf
I, [2023-01-22T16:24:45.698152 #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, [2023-01-22T16:24:45.699455 #1]  INFO -- : Replacing (?-mix:^host.*all.*all.*::1\/128.*$) with host all all ::/0 md5 in /etc/postgresql/13/main/pg_hba.conf
I, [2023-01-22T16:24:45.700796 #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-01-22T16:24:45.709150 #1]  INFO -- : > sleep 5
2023-01-22 16:24:45.828 UTC [42] LOG:  starting PostgreSQL 13.9 (Debian 13.9-1.pgdg110+1) on aarch64-unknown-linux-gnu, compiled by gcc (Debian 10.2.1-6) 10.2.1 20210110, 64-bit
2023-01-22 16:24:45.829 UTC [42] LOG:  listening on IPv4 address "0.0.0.0", port 5432
2023-01-22 16:24:45.829 UTC [42] LOG:  listening on IPv6 address "::", port 5432
2023-01-22 16:24:45.836 UTC [42] LOG:  listening on Unix socket "/var/run/postgresql/.s.PGSQL.5432"
2023-01-22 16:24:45.870 UTC [45] LOG:  database system was shut down at 2023-01-22 16:22:06 UTC
2023-01-22 16:24:45.888 UTC [42] LOG:  database system is ready to accept connections
I, [2023-01-22T16:24:50.720425 #1]  INFO -- : 
I, [2023-01-22T16:24:50.722531 #1]  INFO -- : > su postgres -c 'createdb discourse' || true
2023-01-22 16:24:50.945 UTC [55] postgres@postgres ERROR:  database "discourse" already exists
2023-01-22 16:24:50.945 UTC [55] postgres@postgres STATEMENT:  CREATE DATABASE discourse;
createdb: error: database creation failed: ERROR:  database "discourse" already exists
I, [2023-01-22T16:24:50.951439 #1]  INFO -- : 
I, [2023-01-22T16:24:50.952893 #1]  INFO -- : > su postgres -c 'psql discourse -c "create user discourse;"' || true
2023-01-22 16:24:51.119 UTC [59] postgres@discourse ERROR:  role "discourse" already exists
2023-01-22 16:24:51.119 UTC [59] postgres@discourse STATEMENT:  create user discourse;
ERROR:  role "discourse" already exists
I, [2023-01-22T16:24:51.125499 #1]  INFO -- : 
I, [2023-01-22T16:24:51.126100 #1]  INFO -- : > su postgres -c 'psql discourse -c "grant all privileges on database discourse to discourse;"' || true
I, [2023-01-22T16:24:51.283836 #1]  INFO -- : GRANT

I, [2023-01-22T16:24:51.284799 #1]  INFO -- : > su postgres -c 'psql discourse -c "alter schema public owner to discourse;"'
I, [2023-01-22T16:24:51.439720 #1]  INFO -- : ALTER SCHEMA

I, [2023-01-22T16:24:51.440545 #1]  INFO -- : > su postgres -c 'psql template1 -c "create extension if not exists hstore;"'
NOTICE:  extension "hstore" already exists, skipping
I, [2023-01-22T16:24:51.608311 #1]  INFO -- : CREATE EXTENSION

I, [2023-01-22T16:24:51.608942 #1]  INFO -- : > su postgres -c 'psql template1 -c "create extension if not exists pg_trgm;"'
NOTICE:  extension "pg_trgm" already exists, skipping
I, [2023-01-22T16:24:51.763078 #1]  INFO -- : CREATE EXTENSION

I, [2023-01-22T16:24:51.763738 #1]  INFO -- : > su postgres -c 'psql discourse -c "create extension if not exists hstore;"'
NOTICE:  extension "hstore" already exists, skipping
I, [2023-01-22T16:24:51.917293 #1]  INFO -- : CREATE EXTENSION

I, [2023-01-22T16:24:51.917920 #1]  INFO -- : > su postgres -c 'psql discourse -c "create extension if not exists pg_trgm;"'
NOTICE:  extension "pg_trgm" already exists, skipping
I, [2023-01-22T16:24:52.072737 #1]  INFO -- : CREATE EXTENSION

I, [2023-01-22T16:24:52.073705 #1]  INFO -- : > sudo -u postgres psql discourse
I, [2023-01-22T16:24:52.082122 #1]  INFO -- : update pg_database set encoding = pg_char_to_encoding('UTF8') where datname = 'discourse' AND encoding = pg_char_to_encoding('SQL_ASCII');

I, [2023-01-22T16:24:52.261855 #1]  INFO -- : File > /var/lib/postgresql/take-database-backup  chmod: +x  chown: postgres:postgres
I, [2023-01-22T16:24:52.274447 #1]  INFO -- : File > /var/spool/cron/crontabs/postgres  chmod:   chown: 
I, [2023-01-22T16:24:52.274741 #1]  INFO -- : > echo postgres installed!
I, [2023-01-22T16:24:52.285126 #1]  INFO -- : postgres installed!

I, [2023-01-22T16:24:52.308316 #1]  INFO -- : File > /etc/service/redis/run  chmod: +x  chown: 
I, [2023-01-22T16:24:52.330656 #1]  INFO -- : File > /etc/service/redis/log/run  chmod: +x  chown: 
I, [2023-01-22T16:24:52.352961 #1]  INFO -- : File > /etc/runit/3.d/10-redis  chmod: +x  chown: 
I, [2023-01-22T16:24:52.353919 #1]  INFO -- : Replacing daemonize yes with  in /etc/redis/redis.conf
I, [2023-01-22T16:24:52.357040 #1]  INFO -- : Replacing (?-mix:^pidfile.*$) with  in /etc/redis/redis.conf
I, [2023-01-22T16:24:52.359153 #1]  INFO -- : > install -d -m 0755 -o redis -g redis /shared/redis_data
I, [2023-01-22T16:24:52.371523 #1]  INFO -- : 
I, [2023-01-22T16:24:52.373254 #1]  INFO -- : Replacing (?-mix:^logfile.*$) with logfile "" in /etc/redis/redis.conf
I, [2023-01-22T16:24:52.376177 #1]  INFO -- : Replacing (?-mix:^bind .*$) with  in /etc/redis/redis.conf
I, [2023-01-22T16:24:52.378828 #1]  INFO -- : Replacing (?-mix:^dir .*$) with dir /shared/redis_data in /etc/redis/redis.conf
I, [2023-01-22T16:24:52.381814 #1]  INFO -- : Replacing (?-mix:^protected-mode yes) with protected-mode no in /etc/redis/redis.conf
I, [2023-01-22T16:24:52.384280 #1]  INFO -- : Replacing # io-threads 4 with io-threads $redis_io_threads in /etc/redis/redis.conf
I, [2023-01-22T16:24:52.386668 #1]  INFO -- : > echo redis installed
I, [2023-01-22T16:24:52.396793 #1]  INFO -- : redis installed

I, [2023-01-22T16:24:52.397585 #1]  INFO -- : > cat /etc/redis/redis.conf | grep logfile
I, [2023-01-22T16:24:52.413092 #1]  INFO -- : logfile ""

I, [2023-01-22T16:24:52.413615 #1]  INFO -- : > exec chpst -u redis -U redis /usr/bin/redis-server /etc/redis/redis.conf
I, [2023-01-22T16:24:52.422196 #1]  INFO -- : > sleep 10
103:C 22 Jan 2023 16:24:52.444 # oO0OoO0OoO0Oo Redis is starting oO0OoO0OoO0Oo
103:C 22 Jan 2023 16:24:52.444 # Redis version=7.0.7, bits=64, commit=00000000, modified=0, pid=103, just started
103:C 22 Jan 2023 16:24:52.444 # Configuration loaded
103:M 22 Jan 2023 16:24:52.446 * monotonic clock: POSIX clock_gettime
103:M 22 Jan 2023 16:24:52.448 * Running mode=standalone, port=6379.
103:M 22 Jan 2023 16:24:52.448 # Server initialized
103:M 22 Jan 2023 16:24:52.448 # 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.
103:M 22 Jan 2023 16:24:52.453 * Loading RDB produced by version 7.0.7
103:M 22 Jan 2023 16:24:52.453 * RDB age 166 seconds
103:M 22 Jan 2023 16:24:52.453 * RDB memory usage when created 2.36 Mb
103:M 22 Jan 2023 16:24:52.466 * Done loading RDB, keys loaded: 488, keys expired: 0.
103:M 22 Jan 2023 16:24:52.466 * DB loaded from disk: 0.013 seconds
103:M 22 Jan 2023 16:24:52.466 * Ready to accept connections
I, [2023-01-22T16:25:02.434091 #1]  INFO -- : 
I, [2023-01-22T16:25:02.435817 #1]  INFO -- : > thpoff echo "thpoff is installed!"
I, [2023-01-22T16:25:02.474449 #1]  INFO -- : thpoff is installed!

I, [2023-01-22T16:25:02.475262 #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, [2023-01-22T16:25:02.786453 #1]  INFO -- : 
I, [2023-01-22T16:25:02.786958 #1]  INFO -- : > /usr/local/bin/ruby -e 'if ENV["DISCOURSE_HOSTNAME"] == "discourse.example.com"; puts "Aborting! Domain is not configured!"; exit 1; end'
I, [2023-01-22T16:25:03.054876 #1]  INFO -- : 
I, [2023-01-22T16:25:03.055369 #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, [2023-01-22T16:25:03.324550 #1]  INFO -- : 
I, [2023-01-22T16:25:03.325039 #1]  INFO -- : > rm -f /etc/cron.d/anacron
I, [2023-01-22T16:25:03.336169 #1]  INFO -- : 
I, [2023-01-22T16:25:03.348898 #1]  INFO -- : File > /etc/cron.d/anacron  chmod:   chown: 
I, [2023-01-22T16:25:03.372158 #1]  INFO -- : File > /etc/runit/1.d/copy-env  chmod: +x  chown: 
I, [2023-01-22T16:25:03.395503 #1]  INFO -- : File > /etc/service/unicorn/run  chmod: +x  chown: 
I, [2023-01-22T16:25:03.418732 #1]  INFO -- : File > /etc/service/nginx/run  chmod: +x  chown: 
I, [2023-01-22T16:25:03.441946 #1]  INFO -- : File > /etc/runit/3.d/01-nginx  chmod: +x  chown: 
I, [2023-01-22T16:25:03.464523 #1]  INFO -- : File > /etc/runit/3.d/02-unicorn  chmod: +x  chown: 
I, [2023-01-22T16:25:03.465000 #1]  INFO -- : Replacing # postgres with sv start postgres || exit 1 in /etc/service/unicorn/run
I, [2023-01-22T16:25:03.466147 #1]  INFO -- : > exec chpst -u redis -U redis /usr/bin/redis-server /etc/redis/redis.conf
I, [2023-01-22T16:25:03.476526 #1]  INFO -- : > cd /var/www/discourse && git reset --hard
131:C 22 Jan 2023 16:25:03.497 # oO0OoO0OoO0Oo Redis is starting oO0OoO0OoO0Oo
131:C 22 Jan 2023 16:25:03.497 # Redis version=7.0.7, bits=64, commit=00000000, modified=0, pid=131, just started
131:C 22 Jan 2023 16:25:03.497 # Configuration loaded
131:M 22 Jan 2023 16:25:03.498 * monotonic clock: POSIX clock_gettime
131:M 22 Jan 2023 16:25:03.500 # Warning: Could not create server TCP listening socket *:6379: bind: Address already in use
131:M 22 Jan 2023 16:25:03.500 # Failed listening on port 6379 (TCP), aborting.
Updating files: 100% (32693/32693), done.
I, [2023-01-22T16:25:15.675750 #1]  INFO -- : HEAD is now at 666536cb DEV: Prefer \A and \z over ^ and $ in regexes (#19936)

I, [2023-01-22T16:25:15.676023 #1]  INFO -- : > cd /var/www/discourse && git clean -f
I, [2023-01-22T16:25:16.462533 #1]  INFO -- : 
I, [2023-01-22T16:25:16.462813 #1]  INFO -- : > cd /var/www/discourse && git remote set-branches --add origin main
I, [2023-01-22T16:25:16.478135 #1]  INFO -- : 
I, [2023-01-22T16:25:16.478456 #1]  INFO -- : > cd /var/www/discourse && git remote set-branches origin tests-passed
I, [2023-01-22T16:25:16.494944 #1]  INFO -- : 
I, [2023-01-22T16:25:16.495194 #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, [2023-01-22T16:25:18.283204 #1]  INFO -- : 
I, [2023-01-22T16:25:18.283497 #1]  INFO -- : > cd /var/www/discourse && git checkout tests-passed
Switched to a new branch 'tests-passed'
I, [2023-01-22T16:25:19.033320 #1]  INFO -- : Branch 'tests-passed' set up to track remote branch 'tests-passed' from 'origin'.

I, [2023-01-22T16:25:19.033755 #1]  INFO -- : > cd /var/www/discourse && mkdir -p tmp
I, [2023-01-22T16:25:19.054872 #1]  INFO -- : 
I, [2023-01-22T16:25:19.056116 #1]  INFO -- : > cd /var/www/discourse && chown discourse:www-data tmp
I, [2023-01-22T16:25:19.071677 #1]  INFO -- : 
I, [2023-01-22T16:25:19.071979 #1]  INFO -- : > cd /var/www/discourse && mkdir -p tmp/pids
I, [2023-01-22T16:25:19.087517 #1]  INFO -- : 
I, [2023-01-22T16:25:19.087872 #1]  INFO -- : > cd /var/www/discourse && mkdir -p tmp/sockets
I, [2023-01-22T16:25:19.106992 #1]  INFO -- : 
I, [2023-01-22T16:25:19.107297 #1]  INFO -- : > cd /var/www/discourse && touch tmp/.gitkeep
I, [2023-01-22T16:25:19.121006 #1]  INFO -- : 
I, [2023-01-22T16:25:19.121299 #1]  INFO -- : > cd /var/www/discourse && mkdir -p                    /shared/log/rails
I, [2023-01-22T16:25:19.135470 #1]  INFO -- : 
I, [2023-01-22T16:25:19.135776 #1]  INFO -- : > cd /var/www/discourse && bash -c "touch -a           /shared/log/rails/{production,production_errors,unicorn.stdout,unicorn.stderr,sidekiq}.log"
I, [2023-01-22T16:25:19.155036 #1]  INFO -- : 
I, [2023-01-22T16:25:19.155326 #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, [2023-01-22T16:25:19.175323 #1]  INFO -- : 
I, [2023-01-22T16:25:19.175587 #1]  INFO -- : > cd /var/www/discourse && bash -c "mkdir -p           /shared/{uploads,backups}"
I, [2023-01-22T16:25:19.195690 #1]  INFO -- : 
I, [2023-01-22T16:25:19.195965 #1]  INFO -- : > cd /var/www/discourse && bash -c "ln    -s           /shared/{uploads,backups} /var/www/discourse/public"
I, [2023-01-22T16:25:19.215327 #1]  INFO -- : 
I, [2023-01-22T16:25:19.215600 #1]  INFO -- : > cd /var/www/discourse && bash -c "mkdir -p           /shared/tmp/{backups,restores}"
I, [2023-01-22T16:25:19.235757 #1]  INFO -- : 
I, [2023-01-22T16:25:19.236013 #1]  INFO -- : > cd /var/www/discourse && bash -c "ln    -s           /shared/tmp/{backups,restores} /var/www/discourse/tmp"
I, [2023-01-22T16:25:19.255408 #1]  INFO -- : 
I, [2023-01-22T16:25:19.255700 #1]  INFO -- : > cd /var/www/discourse && chown -R discourse:www-data /shared/log/rails /shared/uploads /shared/backups /shared/tmp
I, [2023-01-22T16:25:19.278861 #1]  INFO -- : 
I, [2023-01-22T16:25:19.279124 #1]  INFO -- : > cd /var/www/discourse && [ ! -d public/plugins ] || find public/plugins/ -maxdepth 1 -xtype l -delete
I, [2023-01-22T16:25:19.288909 #1]  INFO -- : 
I, [2023-01-22T16:25:19.289546 #1]  INFO -- : Replacing # redis with sv start redis || exit 1 in /etc/service/unicorn/run
I, [2023-01-22T16:25:19.290929 #1]  INFO -- : > cd /var/www/discourse/plugins && git clone https://github.com/discourse/docker_manager.git
Cloning into 'docker_manager'...
I, [2023-01-22T16:25:22.387965 #1]  INFO -- : 
I, [2023-01-22T16:25:22.388259 #1]  INFO -- : > cd /var/www/discourse/plugins && git clone https://github.com/discourse/discourse-chat.git
Cloning into 'discourse-chat'...
I, [2023-01-22T16:25:25.389000 #1]  INFO -- : 
I, [2023-01-22T16:25:25.389771 #1]  INFO -- : > cp /var/www/discourse/config/nginx.sample.conf /etc/nginx/conf.d/discourse.conf
I, [2023-01-22T16:25:25.404714 #1]  INFO -- : 
I, [2023-01-22T16:25:25.406087 #1]  INFO -- : > rm /etc/nginx/sites-enabled/default
I, [2023-01-22T16:25:25.417107 #1]  INFO -- : 
I, [2023-01-22T16:25:25.417765 #1]  INFO -- : > mkdir -p /var/nginx/cache
I, [2023-01-22T16:25:25.430050 #1]  INFO -- : 
I, [2023-01-22T16:25:25.431141 #1]  INFO -- : Replacing pid /run/nginx.pid; with daemon off; in /etc/nginx/nginx.conf
I, [2023-01-22T16:25:25.432523 #1]  INFO -- : Replacing (?m-ix:upstream[^\}]+\}) with upstream discourse { server 127.0.0.1:3000; } in /etc/nginx/conf.d/discourse.conf
I, [2023-01-22T16:25:25.433897 #1]  INFO -- : Replacing (?-mix:server_name.+$) with server_name _ ; in /etc/nginx/conf.d/discourse.conf
I, [2023-01-22T16:25:25.435201 #1]  INFO -- : Replacing (?-mix:client_max_body_size.+$) with client_max_body_size $upload_size ; in /etc/nginx/conf.d/discourse.conf
I, [2023-01-22T16:25:25.436471 #1]  INFO -- : Replacing (?-mix:worker_connections.+$) with worker_connections $nginx_worker_connections ; in /etc/nginx/nginx.conf
I, [2023-01-22T16:25:25.437573 #1]  INFO -- : > echo "done configuring web"
I, [2023-01-22T16:25:25.448192 #1]  INFO -- : done configuring web

I, [2023-01-22T16:25:25.448928 #1]  INFO -- : > cd /var/www/discourse && gem install bundler --conservative -v $(awk '/BUNDLED WITH/ { getline; gsub(/ /,""); print $0 }' Gemfile.lock)
I, [2023-01-22T16:25:28.381306 #1]  INFO -- : Successfully installed bundler-2.4.1
1 gem installed

I, [2023-01-22T16:25:28.381640 #1]  INFO -- : > cd /var/www/discourse && find /var/www/discourse ! -user discourse -exec chown discourse {} \+
I, [2023-01-22T16:25:35.764404 #1]  INFO -- : 
I, [2023-01-22T16:25:35.765020 #1]  INFO -- : > cd /var/www/discourse && su discourse -c 'yarn install --production --frozen-lockfile && yarn cache clean'
warning " > @mixer/parallel-prettier@2.0.3" has unmet peer dependency "prettier@^2.0.0".
warning "eslint-config-discourse > eslint-plugin-lodash@7.1.0" has unmet peer dependency "lodash@>=4".
I, [2023-01-22T16:28:19.043563 #1]  INFO -- : yarn install v1.22.19
[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 $(node -e 'if(JSON.parse(process.env.npm_config_argv).original.includes(`--frozen-lockfile`)){console.log(`--frozen-lockfile`)}')
yarn install v1.22.19
[1/4] Resolving packages...
[2/4] Fetching packages...
[3/4] Linking dependencies...
[4/4] Building fresh packages...
Done in 86.64s.
Done in 147.50s.
yarn cache v1.22.19
success Cleared cache.
Done in 14.23s.

I, [2023-01-22T16:28:19.044491 #1]  INFO -- : > cd /var/www/discourse && su discourse -c 'bundle install --deployment --retry 3 --jobs 4 --verbose --without test development'
[DEPRECATED] The `--deployment` flag is deprecated because it relies on being remembered across bundler invocations, which bundler will no longer do in future versions. Instead please use `bundle config set --local deployment 'true'`, and stop using this flag
[DEPRECATED] The `--without` flag is deprecated because it relies on being remembered across bundler invocations, which bundler will no longer do in future versions. Instead please use `bundle config set --local without 'test development'`, and stop using this flag
Bundler::PathError: The path `/var/www/discourse/vendor/bundle/ruby/3.1.0/bundler/gems/sprockets-f4d3dae71ef2` does not exist.
/usr/local/lib/ruby/gems/3.1.0/gems/bundler-2.4.1/lib/bundler/source/path.rb:209:in `load_spec_files'
  /usr/local/lib/ruby/gems/3.1.0/gems/bundler-2.4.1/lib/bundler/source/git.rb:205:in `load_spec_files'
  /usr/local/lib/ruby/gems/3.1.0/gems/bundler-2.4.1/lib/bundler/source/path.rb:107:in `local_specs'
  /usr/local/lib/ruby/gems/3.1.0/gems/bundler-2.4.1/lib/bundler/source/git.rb:172:in `specs'
  /usr/local/lib/ruby/gems/3.1.0/gems/bundler-2.4.1/lib/bundler/lazy_specification.rb:86:in `materialize_for_installation'
  /usr/local/lib/ruby/gems/3.1.0/gems/bundler-2.4.1/lib/bundler/spec_set.rb:195:in `map!'
  /usr/local/lib/ruby/gems/3.1.0/gems/bundler-2.4.1/lib/bundler/spec_set.rb:195:in `specs_for_dependency'
  /usr/local/lib/ruby/gems/3.1.0/gems/bundler-2.4.1/lib/bundler/spec_set.rb:33:in `block in for'
  /usr/local/lib/ruby/gems/3.1.0/gems/bundler-2.4.1/lib/bundler/spec_set.rb:22:in `loop'
  /usr/local/lib/ruby/gems/3.1.0/gems/bundler-2.4.1/lib/bundler/spec_set.rb:22:in `for'
  /usr/local/lib/ruby/gems/3.1.0/gems/bundler-2.4.1/lib/bundler/spec_set.rb:79:in `materialize'
  /usr/local/lib/ruby/gems/3.1.0/gems/bundler-2.4.1/lib/bundler/definition.rb:198:in `missing_specs'
  /usr/local/lib/ruby/gems/3.1.0/gems/bundler-2.4.1/lib/bundler/definition.rb:202:in `missing_specs?'
  /usr/local/lib/ruby/gems/3.1.0/gems/bundler-2.4.1/lib/bundler/installer.rb:253:in `resolve_if_needed'
  /usr/local/lib/ruby/gems/3.1.0/gems/bundler-2.4.1/lib/bundler/installer.rb:82:in `block in run'
  /usr/local/lib/ruby/gems/3.1.0/gems/bundler-2.4.1/lib/bundler/process_lock.rb:12:in `block in lock'
  /usr/local/lib/ruby/gems/3.1.0/gems/bundler-2.4.1/lib/bundler/process_lock.rb:9:in `open'
  /usr/local/lib/ruby/gems/3.1.0/gems/bundler-2.4.1/lib/bundler/process_lock.rb:9:in `lock'
  /usr/local/lib/ruby/gems/3.1.0/gems/bundler-2.4.1/lib/bundler/installer.rb:71:in `run'
  /usr/local/lib/ruby/gems/3.1.0/gems/bundler-2.4.1/lib/bundler/installer.rb:23:in `install'
  /usr/local/lib/ruby/gems/3.1.0/gems/bundler-2.4.1/lib/bundler/cli/install.rb:62:in `run'
  /usr/local/lib/ruby/gems/3.1.0/gems/bundler-2.4.1/lib/bundler/cli.rb:260:in `block in install'
  /usr/local/lib/ruby/gems/3.1.0/gems/bundler-2.4.1/lib/bundler/settings.rb:131:in `temporary'
  /usr/local/lib/ruby/gems/3.1.0/gems/bundler-2.4.1/lib/bundler/cli.rb:259:in `install'
  /usr/local/lib/ruby/gems/3.1.0/gems/bundler-2.4.1/lib/bundler/vendor/thor/lib/thor/command.rb:27:in `run'
  /usr/local/lib/ruby/gems/3.1.0/gems/bundler-2.4.1/lib/bundler/vendor/thor/lib/thor/invocation.rb:127:in `invoke_command'
  /usr/local/lib/ruby/gems/3.1.0/gems/bundler-2.4.1/lib/bundler/vendor/thor/lib/thor.rb:392:in `dispatch'
  /usr/local/lib/ruby/gems/3.1.0/gems/bundler-2.4.1/lib/bundler/cli.rb:34:in `dispatch'
  /usr/local/lib/ruby/gems/3.1.0/gems/bundler-2.4.1/lib/bundler/vendor/thor/lib/thor/base.rb:485:in `start'
  /usr/local/lib/ruby/gems/3.1.0/gems/bundler-2.4.1/lib/bundler/cli.rb:28:in `start'
  /usr/local/lib/ruby/gems/3.1.0/gems/bundler-2.4.1/exe/bundle:45:in `block in <top (required)>'
  /usr/local/lib/ruby/gems/3.1.0/gems/bundler-2.4.1/lib/bundler/friendly_errors.rb:117:in `with_friendly_errors'
  /usr/local/lib/ruby/gems/3.1.0/gems/bundler-2.4.1/exe/bundle:33:in `<top (required)>'
  /usr/local/bin/bundle:25:in `load'
  /usr/local/bin/bundle:25:in `<main>'

Looks like the Discourse Doctor output was cut early, can you past the entire log?

1 Like

It was stuck for a while, I did not close it though, now its goign further, I just seen this line

"Bundler::PathError: The path `/var/www/discourse/vendor/bundle/ruby/3.1.0/bundler/gems/sprockets-f4d3dae71ef2` does not exist."

so it made me confused.

What I think happened that when apache2 was deleted, it might purged /var/www completely.

It’s building currently, so will see.

1 Like

Okay, so it took a while now, its back to normal :slight_smile:

2 Likes