Unable to make the version of `2.9.0.beta6` running

Hi, I’m trying to install a really old version (2.9.0.beta6) of discourse for testing purpose, the reason why I need to install it is because currently, our production discourse is on that version (we have custom plugin as well). which before upgrading I see lots of topics regarding failing when upgrading, so I want to really sure to upgrade the discourse to the latest version (3.3.0.beta1).
I’ve tried to checkout the old discourse docker using this command (i’ve tried using the main branch as well)

git checkout 7ab9e3afc7724ac47b9de0271371f6526177bf0c

as well as specify the image version using this command

./launcher rebuild app --run-image discourse/base:2.0.20220621-0049

but there are lots of errors that needs to be addressed first,

Is it not possible to install the old version anymore?

Previously this question asked on this topic (Fresh install old Discourse version? - #7 by Khrisna_Gunanasurya) but didn’t get any response.

Here is the log when rebuilding the app

root@staging-forums:/var/discourse# ./launcher rebuild app
x86_64 arch detected.
fatal: ref HEAD is not a symbolic ref
fatal: ref HEAD is not a symbolic ref
Stopping old container
+ /usr/bin/docker stop -t 60 app
app
2.0.20220621-0049: Pulling from discourse/base
Digest: sha256:086668a3aa42a62fa4de6ea146e6fded1793cba470b4c19269e204983cf9518c
Status: Image is up to date for discourse/base:2.0.20220621-0049
docker.io/discourse/base:2.0.20220621-0049
/usr/local/lib/ruby/gems/2.7.0/gems/pups-1.1.1/lib/pups.rb
/usr/local/bin/pups --stdin
I, [2024-04-15T01:29:28.739159 #1]  INFO -- : Reading from stdin
I, [2024-04-15T01:29:28.756495 #1]  INFO -- : > locale-gen $LANG && update-locale
I, [2024-04-15T01:29:28.828362 #1]  INFO -- : Generating locales (this might take a while)...
Generation complete.

I, [2024-04-15T01:29:28.829582 #1]  INFO -- : > mkdir -p /shared/postgres_run
I, [2024-04-15T01:29:28.835547 #1]  INFO -- : 
I, [2024-04-15T01:29:28.836675 #1]  INFO -- : > chown postgres:postgres /shared/postgres_run
I, [2024-04-15T01:29:28.840904 #1]  INFO -- : 
I, [2024-04-15T01:29:28.841901 #1]  INFO -- : > chmod 775 /shared/postgres_run
I, [2024-04-15T01:29:28.845799 #1]  INFO -- : 
I, [2024-04-15T01:29:28.846605 #1]  INFO -- : > rm -fr /var/run/postgresql
I, [2024-04-15T01:29:28.850323 #1]  INFO -- : 
I, [2024-04-15T01:29:28.851133 #1]  INFO -- : > ln -s /shared/postgres_run /var/run/postgresql
I, [2024-04-15T01:29:28.855406 #1]  INFO -- : 
I, [2024-04-15T01:29:28.856408 #1]  INFO -- : > socat /dev/null UNIX-CONNECT:/shared/postgres_run/.s.PGSQL.5432 || exit 0 && echo postgres already running stop container ; exit 1
2024/04/15 01:29:28 socat[18] E connect(6, AF=1 "/shared/postgres_run/.s.PGSQL.5432", 36): No such file or directory
I, [2024-04-15T01:29:28.877070 #1]  INFO -- : 
I, [2024-04-15T01:29:28.877882 #1]  INFO -- : > rm -fr /shared/postgres_run/.s*
I, [2024-04-15T01:29:28.883564 #1]  INFO -- : 
I, [2024-04-15T01:29:28.884353 #1]  INFO -- : > rm -fr /shared/postgres_run/*.pid
I, [2024-04-15T01:29:28.890020 #1]  INFO -- : 
I, [2024-04-15T01:29:28.890811 #1]  INFO -- : > mkdir -p /shared/postgres_run/13-main.pg_stat_tmp
I, [2024-04-15T01:29:28.895525 #1]  INFO -- : 
I, [2024-04-15T01:29:28.896646 #1]  INFO -- : > chown postgres:postgres /shared/postgres_run/13-main.pg_stat_tmp
I, [2024-04-15T01:29:28.901725 #1]  INFO -- : 
I, [2024-04-15T01:29:28.912934 #1]  INFO -- : File > /etc/service/postgres/run  chmod: +x  chown: 
I, [2024-04-15T01:29:28.922028 #1]  INFO -- : File > /etc/service/postgres/log/run  chmod: +x  chown: 
I, [2024-04-15T01:29:28.929631 #1]  INFO -- : File > /etc/runit/3.d/99-postgres  chmod: +x  chown: 
I, [2024-04-15T01:29:28.937065 #1]  INFO -- : File > /root/upgrade_postgres  chmod: +x  chown: 
I, [2024-04-15T01:29:28.938111 #1]  INFO -- : > chown -R root /var/lib/postgresql/13/main
I, [2024-04-15T01:29:33.246175 #1]  INFO -- : 
I, [2024-04-15T01:29:33.247493 #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, [2024-04-15T01:29:33.252193 #1]  INFO -- : 
I, [2024-04-15T01:29:33.252953 #1]  INFO -- : > chown -R postgres:postgres /shared/postgres_data
I, [2024-04-15T01:29:33.282507 #1]  INFO -- : 
I, [2024-04-15T01:29:33.283672 #1]  INFO -- : > chown -R postgres:postgres /var/run/postgresql
I, [2024-04-15T01:29:33.288287 #1]  INFO -- : 
I, [2024-04-15T01:29:33.289123 #1]  INFO -- : > /root/upgrade_postgres
I, [2024-04-15T01:29:33.297364 #1]  INFO -- : 
I, [2024-04-15T01:29:33.298314 #1]  INFO -- : > rm /root/upgrade_postgres
I, [2024-04-15T01:29:33.302547 #1]  INFO -- : 
I, [2024-04-15T01:29:33.304293 #1]  INFO -- : Replacing data_directory = '/var/lib/postgresql/13/main' with data_directory = '/shared/postgres_data' in /etc/postgresql/13/main/postgresql.conf
I, [2024-04-15T01:29:33.305725 #1]  INFO -- : Replacing (?-mix:#?listen_addresses *=.*) with listen_addresses = '*' in /etc/postgresql/13/main/postgresql.conf
I, [2024-04-15T01:29:33.306611 #1]  INFO -- : Replacing (?-mix:#?synchronous_commit *=.*) with synchronous_commit = $db_synchronous_commit in /etc/postgresql/13/main/postgresql.conf
I, [2024-04-15T01:29:33.307313 #1]  INFO -- : Replacing (?-mix:#?shared_buffers *=.*) with shared_buffers = $db_shared_buffers in /etc/postgresql/13/main/postgresql.conf
I, [2024-04-15T01:29:33.308055 #1]  INFO -- : Replacing (?-mix:#?work_mem *=.*) with work_mem = $db_work_mem in /etc/postgresql/13/main/postgresql.conf
I, [2024-04-15T01:29:33.308747 #1]  INFO -- : Replacing (?-mix:#?default_text_search_config *=.*) with default_text_search_config = '$db_default_text_search_config' in /etc/postgresql/13/main/postgresql.conf
I, [2024-04-15T01:29:33.309553 #1]  INFO -- : > install -d -m 0755 -o postgres -g postgres /shared/postgres_backup
I, [2024-04-15T01:29:33.322380 #1]  INFO -- : 
I, [2024-04-15T01:29:33.327032 #1]  INFO -- : Replacing (?-mix:#?checkpoint_segments *=.*) with checkpoint_segments = $db_checkpoint_segments in /etc/postgresql/13/main/postgresql.conf
I, [2024-04-15T01:29:33.330690 #1]  INFO -- : Replacing (?-mix:#?logging_collector *=.*) with logging_collector = $db_logging_collector in /etc/postgresql/13/main/postgresql.conf
I, [2024-04-15T01:29:33.331608 #1]  INFO -- : Replacing (?-mix:#?log_min_duration_statement *=.*) with log_min_duration_statement = $db_log_min_duration_statement in /etc/postgresql/13/main/postgresql.conf
I, [2024-04-15T01:29:33.333035 #1]  INFO -- : Replacing (?-mix:^#local +replication +postgres +peer$) with local replication postgres  peer in /etc/postgresql/13/main/pg_hba.conf
I, [2024-04-15T01:29:33.334344 #1]  INFO -- : Replacing (?-mix:^host.*all.*all.*127.*$) with host all all 0.0.0.0/0 md5 in /etc/postgresql/13/main/pg_hba.conf
I, [2024-04-15T01:29:33.338738 #1]  INFO -- : Replacing (?-mix:^host.*all.*all.*::1\/128.*$) with host all all ::/0 md5 in /etc/postgresql/13/main/pg_hba.conf
I, [2024-04-15T01:29:33.339512 #1]  INFO -- : > HOME=/var/lib/postgresql USER=postgres exec chpst -u postgres:postgres:ssl-cert -U postgres:postgres:ssl-cert /usr/lib/postgresql/13/bin/postmaster -D /etc/postgresql/13/main
I, [2024-04-15T01:29:33.345868 #1]  INFO -- : > sleep 5
2024-04-15 01:29:33.440 UTC [41] LOG:  starting PostgreSQL 13.7 (Debian 13.7-1.pgdg110+1) on x86_64-pc-linux-gnu, compiled by gcc (Debian 10.2.1-6) 10.2.1 20210110, 64-bit
2024-04-15 01:29:33.441 UTC [41] LOG:  listening on IPv4 address "0.0.0.0", port 5432
2024-04-15 01:29:33.441 UTC [41] LOG:  listening on IPv6 address "::", port 5432
2024-04-15 01:29:33.457 UTC [41] LOG:  listening on Unix socket "/var/run/postgresql/.s.PGSQL.5432"
2024-04-15 01:29:33.472 UTC [44] LOG:  database system was shut down at 2024-04-15 01:28:32 UTC
2024-04-15 01:29:33.482 UTC [41] LOG:  database system is ready to accept connections
I, [2024-04-15T01:29:38.360685 #1]  INFO -- : 
I, [2024-04-15T01:29:38.362211 #1]  INFO -- : > su postgres -c 'createdb discourse' || true
2024-04-15 01:29:38.531 UTC [54] postgres@postgres ERROR:  database "discourse" already exists
2024-04-15 01:29:38.531 UTC [54] postgres@postgres STATEMENT:  CREATE DATABASE discourse;
createdb: error: database creation failed: ERROR:  database "discourse" already exists
I, [2024-04-15T01:29:38.536606 #1]  INFO -- : 
I, [2024-04-15T01:29:38.537742 #1]  INFO -- : > su postgres -c 'psql discourse -c "create user discourse;"' || true
2024-04-15 01:29:38.638 UTC [58] postgres@discourse ERROR:  role "discourse" already exists
2024-04-15 01:29:38.638 UTC [58] postgres@discourse STATEMENT:  create user discourse;
ERROR:  role "discourse" already exists
I, [2024-04-15T01:29:38.642388 #1]  INFO -- : 
I, [2024-04-15T01:29:38.643420 #1]  INFO -- : > su postgres -c 'psql discourse -c "grant all privileges on database discourse to discourse;"' || true
I, [2024-04-15T01:29:38.729718 #1]  INFO -- : GRANT

I, [2024-04-15T01:29:38.730757 #1]  INFO -- : > su postgres -c 'psql discourse -c "alter schema public owner to discourse;"'
I, [2024-04-15T01:29:38.813306 #1]  INFO -- : ALTER SCHEMA

I, [2024-04-15T01:29:38.814422 #1]  INFO -- : > su postgres -c 'psql template1 -c "create extension if not exists hstore;"'
NOTICE:  extension "hstore" already exists, skipping
I, [2024-04-15T01:29:38.923056 #1]  INFO -- : CREATE EXTENSION

I, [2024-04-15T01:29:38.924149 #1]  INFO -- : > su postgres -c 'psql template1 -c "create extension if not exists pg_trgm;"'
NOTICE:  extension "pg_trgm" already exists, skipping
I, [2024-04-15T01:29:39.018840 #1]  INFO -- : CREATE EXTENSION

I, [2024-04-15T01:29:39.019873 #1]  INFO -- : > su postgres -c 'psql discourse -c "create extension if not exists hstore;"'
NOTICE:  extension "hstore" already exists, skipping
I, [2024-04-15T01:29:39.117333 #1]  INFO -- : CREATE EXTENSION

I, [2024-04-15T01:29:39.118273 #1]  INFO -- : > su postgres -c 'psql discourse -c "create extension if not exists pg_trgm;"'
NOTICE:  extension "pg_trgm" already exists, skipping
I, [2024-04-15T01:29:39.197935 #1]  INFO -- : CREATE EXTENSION

I, [2024-04-15T01:29:39.198942 #1]  INFO -- : > sudo -u postgres psql discourse
I, [2024-04-15T01:29:39.208142 #1]  INFO -- : update pg_database set encoding = pg_char_to_encoding('UTF8') where datname = 'discourse' AND encoding = pg_char_to_encoding('SQL_ASCII');

I, [2024-04-15T01:29:39.338312 #1]  INFO -- : File > /var/lib/postgresql/take-database-backup  chmod: +x  chown: postgres:postgres
I, [2024-04-15T01:29:39.343902 #1]  INFO -- : File > /var/spool/cron/crontabs/postgres  chmod:   chown: 
I, [2024-04-15T01:29:39.344669 #1]  INFO -- : > echo postgres installed!
I, [2024-04-15T01:29:39.347872 #1]  INFO -- : postgres installed!

I, [2024-04-15T01:29:39.356732 #1]  INFO -- : File > /etc/service/redis/run  chmod: +x  chown: 
I, [2024-04-15T01:29:39.366745 #1]  INFO -- : File > /etc/service/redis/log/run  chmod: +x  chown: 
I, [2024-04-15T01:29:39.376178 #1]  INFO -- : File > /etc/runit/3.d/10-redis  chmod: +x  chown: 
I, [2024-04-15T01:29:39.377966 #1]  INFO -- : Replacing daemonize yes with  in /etc/redis/redis.conf
I, [2024-04-15T01:29:39.379359 #1]  INFO -- : Replacing (?-mix:^pidfile.*$) with  in /etc/redis/redis.conf
I, [2024-04-15T01:29:39.380353 #1]  INFO -- : > install -d -m 0755 -o redis -g redis /shared/redis_data
I, [2024-04-15T01:29:39.386273 #1]  INFO -- : 
I, [2024-04-15T01:29:39.387745 #1]  INFO -- : Replacing (?-mix:^logfile.*$) with logfile "" in /etc/redis/redis.conf
I, [2024-04-15T01:29:39.388891 #1]  INFO -- : Replacing (?-mix:^bind .*$) with  in /etc/redis/redis.conf
I, [2024-04-15T01:29:39.390202 #1]  INFO -- : Replacing (?-mix:^dir .*$) with dir /shared/redis_data in /etc/redis/redis.conf
I, [2024-04-15T01:29:39.391233 #1]  INFO -- : Replacing (?-mix:^protected-mode yes) with protected-mode no in /etc/redis/redis.conf
I, [2024-04-15T01:29:39.392128 #1]  INFO -- : Replacing # io-threads 4 with io-threads $redis_io_threads in /etc/redis/redis.conf
I, [2024-04-15T01:29:39.393004 #1]  INFO -- : > echo redis installed
I, [2024-04-15T01:29:39.398235 #1]  INFO -- : redis installed

I, [2024-04-15T01:29:39.399872 #1]  INFO -- : > cat /etc/redis/redis.conf | grep logfile
I, [2024-04-15T01:29:39.413734 #1]  INFO -- : logfile ""

I, [2024-04-15T01:29:39.414735 #1]  INFO -- : > exec chpst -u redis -U redis /usr/bin/redis-server /etc/redis/redis.conf
I, [2024-04-15T01:29:39.418733 #1]  INFO -- : > sleep 10
102:C 15 Apr 2024 01:29:39.451 # oO0OoO0OoO0Oo Redis is starting oO0OoO0OoO0Oo
102:C 15 Apr 2024 01:29:39.451 # Redis version=6.2.6, bits=64, commit=00000000, modified=0, pid=102, just started
102:C 15 Apr 2024 01:29:39.452 # Configuration loaded
102:M 15 Apr 2024 01:29:39.454 * monotonic clock: POSIX clock_gettime
102:M 15 Apr 2024 01:29:39.456 * Running mode=standalone, port=6379.
102:M 15 Apr 2024 01:29:39.456 # Server initialized
102:M 15 Apr 2024 01:29:39.459 # Can't handle RDB format version 10
102:M 15 Apr 2024 01:29:39.459 # Fatal error loading the DB: Invalid argument. Exiting.
I, [2024-04-15T01:29:49.426666 #1]  INFO -- : 
I, [2024-04-15T01:29:49.428141 #1]  INFO -- : > thpoff echo "thpoff is installed!"
I, [2024-04-15T01:29:49.435908 #1]  INFO -- : thpoff is installed!

I, [2024-04-15T01:29:49.436953 #1]  INFO -- : > /usr/local/bin/ruby -e 'if ENV["DISCOURSE_SMTP_ADDRESS"] == "smtp.example.com"; puts "Aborting! Mail is not configured!"; exit 1; end'
I, [2024-04-15T01:29:49.542700 #1]  INFO -- : 
I, [2024-04-15T01:29:49.543698 #1]  INFO -- : > /usr/local/bin/ruby -e 'if ENV["DISCOURSE_HOSTNAME"] == "discourse.example.com"; puts "Aborting! Domain is not configured!"; exit 1; end'
I, [2024-04-15T01:29:49.649171 #1]  INFO -- : 
I, [2024-04-15T01:29:49.650223 #1]  INFO -- : > /usr/local/bin/ruby -e 'if (ENV["DISCOURSE_CDN_URL"] || "")[0..1] == "//"; puts "Aborting! CDN must have a protocol specified. Once fixed you should rebake your posts now to correct all posts."; exit 1; end'
I, [2024-04-15T01:29:49.754140 #1]  INFO -- : 
I, [2024-04-15T01:29:49.755203 #1]  INFO -- : > rm -f /etc/cron.d/anacron
I, [2024-04-15T01:29:49.760454 #1]  INFO -- : 
I, [2024-04-15T01:29:49.766990 #1]  INFO -- : File > /etc/cron.d/anacron  chmod:   chown: 
I, [2024-04-15T01:29:49.778588 #1]  INFO -- : File > /etc/runit/1.d/copy-env  chmod: +x  chown: 
I, [2024-04-15T01:29:49.789173 #1]  INFO -- : File > /etc/service/unicorn/run  chmod: +x  chown: 
I, [2024-04-15T01:29:49.796649 #1]  INFO -- : File > /etc/service/nginx/run  chmod: +x  chown: 
I, [2024-04-15T01:29:49.804036 #1]  INFO -- : File > /etc/runit/3.d/01-nginx  chmod: +x  chown: 
I, [2024-04-15T01:29:49.812110 #1]  INFO -- : File > /etc/runit/3.d/02-unicorn  chmod: +x  chown: 
I, [2024-04-15T01:29:49.812963 #1]  INFO -- : Replacing # postgres with sv start postgres || exit 1 in /etc/service/unicorn/run
I, [2024-04-15T01:29:49.813854 #1]  INFO -- : > exec chpst -u redis -U redis /usr/bin/redis-server /etc/redis/redis.conf
I, [2024-04-15T01:29:49.818403 #1]  INFO -- : > cd /var/www/discourse && git reset --hard
129:C 15 Apr 2024 01:29:49.836 # oO0OoO0OoO0Oo Redis is starting oO0OoO0OoO0Oo
129:C 15 Apr 2024 01:29:49.837 # Redis version=6.2.6, bits=64, commit=00000000, modified=0, pid=129, just started
129:C 15 Apr 2024 01:29:49.837 # Configuration loaded
129:M 15 Apr 2024 01:29:49.839 * monotonic clock: POSIX clock_gettime
129:M 15 Apr 2024 01:29:49.842 * Running mode=standalone, port=6379.
129:M 15 Apr 2024 01:29:49.843 # Server initialized
129:M 15 Apr 2024 01:29:49.844 # Can't handle RDB format version 10
129:M 15 Apr 2024 01:29:49.844 # Fatal error loading the DB: Invalid argument. Exiting.
Updating files: 100% (31151/31151), done.
I, [2024-04-15T01:29:55.772184 #1]  INFO -- : HEAD is now at 54a518b2 FIX: Quoting local dates bbcode regeneration (#17141)

I, [2024-04-15T01:29:55.773207 #1]  INFO -- : > cd /var/www/discourse && git clean -f
I, [2024-04-15T01:29:56.053284 #1]  INFO -- : 
I, [2024-04-15T01:29:56.054826 #1]  INFO -- : > cd /var/www/discourse && git remote set-branches --add origin main
I, [2024-04-15T01:29:56.064364 #1]  INFO -- : 
I, [2024-04-15T01:29:56.065324 #1]  INFO -- : > cd /var/www/discourse && git remote set-branches origin v2.9.0.beta6
I, [2024-04-15T01:29:56.073576 #1]  INFO -- : 
I, [2024-04-15T01:29:56.074501 #1]  INFO -- : > cd /var/www/discourse && git fetch --depth 1 origin v2.9.0.beta6
From https://github.com/discourse/discourse
 * tag                 v2.9.0.beta6 -> FETCH_HEAD
I, [2024-04-15T01:29:57.220378 #1]  INFO -- : 
I, [2024-04-15T01:29:57.221277 #1]  INFO -- : > cd /var/www/discourse && git checkout v2.9.0.beta6
error: pathspec 'v2.9.0.beta6' did not match any file(s) known to git
I, [2024-04-15T01:29:57.241696 #1]  INFO -- : 
I, [2024-04-15T01:29:57.242641 #1]  INFO -- : Terminating async processes
I, [2024-04-15T01:29:57.243043 #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: 41
2024-04-15 01:29:57.243 UTC [41] LOG:  received fast shutdown request
2024-04-15 01:29:57.258 UTC [41] LOG:  aborting any active transactions
2024-04-15 01:29:57.270 UTC [41] LOG:  background worker "logical replication launcher" (PID 50) exited with exit code 1
2024-04-15 01:29:57.271 UTC [45] LOG:  shutting down
2024-04-15 01:29:57.308 UTC [41] LOG:  database system is shut down


FAILED
--------------------
Pups::ExecError: cd /var/www/discourse && git checkout v2.9.0.beta6 failed with return #<Process::Status: pid 153 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"=>"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.
37c827d8fec787b69e0f8ee38b06dbbebf2003a7fd7065f65032828897a17d1f

Seems like you still have a new format RDB file (originating from Redis 7) around.
Try to remove /var/discourse/shared/standalone/redis_data/dump.rdb and retry.

1 Like

@RGJ Thanks for answering, I just remove it, and the redis didn’t returning an error anymore, but it’s still failing
here is the new log.

I already tried to update the ruby version to 3.0.0 on image/base/install-ruby, but it’s doesnt solve it

x86_64 arch detected.
fatal: ref HEAD is not a symbolic ref
fatal: ref HEAD is not a symbolic ref
2.0.20220621-0049: Pulling from discourse/base
Digest: sha256:086668a3aa42a62fa4de6ea146e6fded1793cba470b4c19269e204983cf9518c
Status: Image is up to date for discourse/base:2.0.20220621-0049
docker.io/discourse/base:2.0.20220621-0049
/usr/local/lib/ruby/gems/2.7.0/gems/pups-1.1.1/lib/pups.rb
/usr/local/bin/pups --stdin
I, [2024-04-15T02:48:40.725158 #1]  INFO -- : Reading from stdin
I, [2024-04-15T02:48:40.735004 #1]  INFO -- : > locale-gen $LANG && update-locale
I, [2024-04-15T02:48:40.815408 #1]  INFO -- : Generating locales (this might take a while)...
Generation complete.

I, [2024-04-15T02:48:40.816247 #1]  INFO -- : > mkdir -p /shared/postgres_run
I, [2024-04-15T02:48:40.820830 #1]  INFO -- : 
I, [2024-04-15T02:48:40.821809 #1]  INFO -- : > chown postgres:postgres /shared/postgres_run
I, [2024-04-15T02:48:40.825663 #1]  INFO -- : 
I, [2024-04-15T02:48:40.826444 #1]  INFO -- : > chmod 775 /shared/postgres_run
I, [2024-04-15T02:48:40.831170 #1]  INFO -- : 
I, [2024-04-15T02:48:40.831973 #1]  INFO -- : > rm -fr /var/run/postgresql
I, [2024-04-15T02:48:40.835762 #1]  INFO -- : 
I, [2024-04-15T02:48:40.836434 #1]  INFO -- : > ln -s /shared/postgres_run /var/run/postgresql
I, [2024-04-15T02:48:40.839495 #1]  INFO -- : 
I, [2024-04-15T02:48:40.840129 #1]  INFO -- : > socat /dev/null UNIX-CONNECT:/shared/postgres_run/.s.PGSQL.5432 || exit 0 && echo postgres already running stop container ; exit 1
2024/04/15 02:48:40 socat[18] E connect(6, AF=1 "/shared/postgres_run/.s.PGSQL.5432", 36): No such file or directory
I, [2024-04-15T02:48:40.867006 #1]  INFO -- : 
I, [2024-04-15T02:48:40.867719 #1]  INFO -- : > rm -fr /shared/postgres_run/.s*
I, [2024-04-15T02:48:40.873414 #1]  INFO -- : 
I, [2024-04-15T02:48:40.874167 #1]  INFO -- : > rm -fr /shared/postgres_run/*.pid
I, [2024-04-15T02:48:40.879131 #1]  INFO -- : 
I, [2024-04-15T02:48:40.879819 #1]  INFO -- : > mkdir -p /shared/postgres_run/13-main.pg_stat_tmp
I, [2024-04-15T02:48:40.884242 #1]  INFO -- : 
I, [2024-04-15T02:48:40.885310 #1]  INFO -- : > chown postgres:postgres /shared/postgres_run/13-main.pg_stat_tmp
I, [2024-04-15T02:48:40.889880 #1]  INFO -- : 
I, [2024-04-15T02:48:40.898444 #1]  INFO -- : File > /etc/service/postgres/run  chmod: +x  chown: 
I, [2024-04-15T02:48:40.906371 #1]  INFO -- : File > /etc/service/postgres/log/run  chmod: +x  chown: 
I, [2024-04-15T02:48:40.914846 #1]  INFO -- : File > /etc/runit/3.d/99-postgres  chmod: +x  chown: 
I, [2024-04-15T02:48:40.922000 #1]  INFO -- : File > /root/upgrade_postgres  chmod: +x  chown: 
I, [2024-04-15T02:48:40.922895 #1]  INFO -- : > chown -R root /var/lib/postgresql/13/main
I, [2024-04-15T02:48:44.093219 #1]  INFO -- : 
I, [2024-04-15T02:48:44.094630 #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, [2024-04-15T02:48:44.098759 #1]  INFO -- : 
I, [2024-04-15T02:48:44.099534 #1]  INFO -- : > chown -R postgres:postgres /shared/postgres_data
I, [2024-04-15T02:48:44.118568 #1]  INFO -- : 
I, [2024-04-15T02:48:44.119707 #1]  INFO -- : > chown -R postgres:postgres /var/run/postgresql
I, [2024-04-15T02:48:44.124499 #1]  INFO -- : 
I, [2024-04-15T02:48:44.125431 #1]  INFO -- : > /root/upgrade_postgres
I, [2024-04-15T02:48:44.137254 #1]  INFO -- : 
I, [2024-04-15T02:48:44.138164 #1]  INFO -- : > rm /root/upgrade_postgres
I, [2024-04-15T02:48:44.142004 #1]  INFO -- : 
I, [2024-04-15T02:48:44.143442 #1]  INFO -- : Replacing data_directory = '/var/lib/postgresql/13/main' with data_directory = '/shared/postgres_data' in /etc/postgresql/13/main/postgresql.conf
I, [2024-04-15T02:48:44.144441 #1]  INFO -- : Replacing (?-mix:#?listen_addresses *=.*) with listen_addresses = '*' in /etc/postgresql/13/main/postgresql.conf
I, [2024-04-15T02:48:44.145145 #1]  INFO -- : Replacing (?-mix:#?synchronous_commit *=.*) with synchronous_commit = $db_synchronous_commit in /etc/postgresql/13/main/postgresql.conf
I, [2024-04-15T02:48:44.145771 #1]  INFO -- : Replacing (?-mix:#?shared_buffers *=.*) with shared_buffers = $db_shared_buffers in /etc/postgresql/13/main/postgresql.conf
I, [2024-04-15T02:48:44.146530 #1]  INFO -- : Replacing (?-mix:#?work_mem *=.*) with work_mem = $db_work_mem in /etc/postgresql/13/main/postgresql.conf
I, [2024-04-15T02:48:44.147219 #1]  INFO -- : Replacing (?-mix:#?default_text_search_config *=.*) with default_text_search_config = '$db_default_text_search_config' in /etc/postgresql/13/main/postgresql.conf
I, [2024-04-15T02:48:44.147901 #1]  INFO -- : > install -d -m 0755 -o postgres -g postgres /shared/postgres_backup
I, [2024-04-15T02:48:44.154434 #1]  INFO -- : 
I, [2024-04-15T02:48:44.155531 #1]  INFO -- : Replacing (?-mix:#?checkpoint_segments *=.*) with checkpoint_segments = $db_checkpoint_segments in /etc/postgresql/13/main/postgresql.conf
I, [2024-04-15T02:48:44.156349 #1]  INFO -- : Replacing (?-mix:#?logging_collector *=.*) with logging_collector = $db_logging_collector in /etc/postgresql/13/main/postgresql.conf
I, [2024-04-15T02:48:44.157048 #1]  INFO -- : Replacing (?-mix:#?log_min_duration_statement *=.*) with log_min_duration_statement = $db_log_min_duration_statement in /etc/postgresql/13/main/postgresql.conf
I, [2024-04-15T02:48:44.158239 #1]  INFO -- : Replacing (?-mix:^#local +replication +postgres +peer$) with local replication postgres  peer in /etc/postgresql/13/main/pg_hba.conf
I, [2024-04-15T02:48:44.158915 #1]  INFO -- : Replacing (?-mix:^host.*all.*all.*127.*$) with host all all 0.0.0.0/0 md5 in /etc/postgresql/13/main/pg_hba.conf
I, [2024-04-15T02:48:44.159539 #1]  INFO -- : Replacing (?-mix:^host.*all.*all.*::1\/128.*$) with host all all ::/0 md5 in /etc/postgresql/13/main/pg_hba.conf
I, [2024-04-15T02:48:44.160185 #1]  INFO -- : > HOME=/var/lib/postgresql USER=postgres exec chpst -u postgres:postgres:ssl-cert -U postgres:postgres:ssl-cert /usr/lib/postgresql/13/bin/postmaster -D /etc/postgresql/13/main
I, [2024-04-15T02:48:44.163464 #1]  INFO -- : > sleep 5
2024-04-15 02:48:44.240 UTC [41] LOG:  starting PostgreSQL 13.7 (Debian 13.7-1.pgdg110+1) on x86_64-pc-linux-gnu, compiled by gcc (Debian 10.2.1-6) 10.2.1 20210110, 64-bit
2024-04-15 02:48:44.243 UTC [41] LOG:  listening on IPv4 address "0.0.0.0", port 5432
2024-04-15 02:48:44.244 UTC [41] LOG:  listening on IPv6 address "::", port 5432
2024-04-15 02:48:44.248 UTC [41] LOG:  listening on Unix socket "/var/run/postgresql/.s.PGSQL.5432"
2024-04-15 02:48:44.255 UTC [44] LOG:  database system was shut down at 2024-04-15 02:46:30 UTC
2024-04-15 02:48:44.267 UTC [41] LOG:  database system is ready to accept connections
I, [2024-04-15T02:48:49.170925 #1]  INFO -- : 
I, [2024-04-15T02:48:49.171368 #1]  INFO -- : > su postgres -c 'createdb discourse' || true
2024-04-15 02:48:49.331 UTC [54] postgres@postgres ERROR:  database "discourse" already exists
2024-04-15 02:48:49.331 UTC [54] postgres@postgres STATEMENT:  CREATE DATABASE discourse;
createdb: error: database creation failed: ERROR:  database "discourse" already exists
I, [2024-04-15T02:48:49.336540 #1]  INFO -- : 
I, [2024-04-15T02:48:49.337415 #1]  INFO -- : > su postgres -c 'psql discourse -c "create user discourse;"' || true
2024-04-15 02:48:49.461 UTC [58] postgres@discourse ERROR:  role "discourse" already exists
2024-04-15 02:48:49.461 UTC [58] postgres@discourse STATEMENT:  create user discourse;
ERROR:  role "discourse" already exists
I, [2024-04-15T02:48:49.465561 #1]  INFO -- : 
I, [2024-04-15T02:48:49.466280 #1]  INFO -- : > su postgres -c 'psql discourse -c "grant all privileges on database discourse to discourse;"' || true
I, [2024-04-15T02:48:49.563477 #1]  INFO -- : GRANT

I, [2024-04-15T02:48:49.565273 #1]  INFO -- : > su postgres -c 'psql discourse -c "alter schema public owner to discourse;"'
I, [2024-04-15T02:48:49.658308 #1]  INFO -- : ALTER SCHEMA

I, [2024-04-15T02:48:49.659275 #1]  INFO -- : > su postgres -c 'psql template1 -c "create extension if not exists hstore;"'
NOTICE:  extension "hstore" already exists, skipping
I, [2024-04-15T02:48:49.757214 #1]  INFO -- : CREATE EXTENSION

I, [2024-04-15T02:48:49.757892 #1]  INFO -- : > su postgres -c 'psql template1 -c "create extension if not exists pg_trgm;"'
NOTICE:  extension "pg_trgm" already exists, skipping
I, [2024-04-15T02:48:49.851932 #1]  INFO -- : CREATE EXTENSION

I, [2024-04-15T02:48:49.852928 #1]  INFO -- : > su postgres -c 'psql discourse -c "create extension if not exists hstore;"'
NOTICE:  extension "hstore" already exists, skipping
I, [2024-04-15T02:48:49.932626 #1]  INFO -- : CREATE EXTENSION

I, [2024-04-15T02:48:49.933741 #1]  INFO -- : > su postgres -c 'psql discourse -c "create extension if not exists pg_trgm;"'
NOTICE:  extension "pg_trgm" already exists, skipping
I, [2024-04-15T02:48:50.009770 #1]  INFO -- : CREATE EXTENSION

I, [2024-04-15T02:48:50.010905 #1]  INFO -- : > sudo -u postgres psql discourse
I, [2024-04-15T02:48:50.020446 #1]  INFO -- : update pg_database set encoding = pg_char_to_encoding('UTF8') where datname = 'discourse' AND encoding = pg_char_to_encoding('SQL_ASCII');

I, [2024-04-15T02:48:50.148895 #1]  INFO -- : File > /var/lib/postgresql/take-database-backup  chmod: +x  chown: postgres:postgres
I, [2024-04-15T02:48:50.153666 #1]  INFO -- : File > /var/spool/cron/crontabs/postgres  chmod:   chown: 
I, [2024-04-15T02:48:50.154379 #1]  INFO -- : > echo postgres installed!
I, [2024-04-15T02:48:50.157391 #1]  INFO -- : postgres installed!

I, [2024-04-15T02:48:50.164069 #1]  INFO -- : File > /etc/service/redis/run  chmod: +x  chown: 
I, [2024-04-15T02:48:50.171156 #1]  INFO -- : File > /etc/service/redis/log/run  chmod: +x  chown: 
I, [2024-04-15T02:48:50.177945 #1]  INFO -- : File > /etc/runit/3.d/10-redis  chmod: +x  chown: 
I, [2024-04-15T02:48:50.179722 #1]  INFO -- : Replacing daemonize yes with  in /etc/redis/redis.conf
I, [2024-04-15T02:48:50.180883 #1]  INFO -- : Replacing (?-mix:^pidfile.*$) with  in /etc/redis/redis.conf
I, [2024-04-15T02:48:50.181795 #1]  INFO -- : > install -d -m 0755 -o redis -g redis /shared/redis_data
I, [2024-04-15T02:48:50.187120 #1]  INFO -- : 
I, [2024-04-15T02:48:50.188641 #1]  INFO -- : Replacing (?-mix:^logfile.*$) with logfile "" in /etc/redis/redis.conf
I, [2024-04-15T02:48:50.189652 #1]  INFO -- : Replacing (?-mix:^bind .*$) with  in /etc/redis/redis.conf
I, [2024-04-15T02:48:50.190569 #1]  INFO -- : Replacing (?-mix:^dir .*$) with dir /shared/redis_data in /etc/redis/redis.conf
I, [2024-04-15T02:48:50.191455 #1]  INFO -- : Replacing (?-mix:^protected-mode yes) with protected-mode no in /etc/redis/redis.conf
I, [2024-04-15T02:48:50.192334 #1]  INFO -- : Replacing # io-threads 4 with io-threads $redis_io_threads in /etc/redis/redis.conf
I, [2024-04-15T02:48:50.193279 #1]  INFO -- : > echo redis installed
I, [2024-04-15T02:48:50.197790 #1]  INFO -- : redis installed

I, [2024-04-15T02:48:50.198833 #1]  INFO -- : > cat /etc/redis/redis.conf | grep logfile
I, [2024-04-15T02:48:50.209063 #1]  INFO -- : logfile ""

I, [2024-04-15T02:48:50.210039 #1]  INFO -- : > exec chpst -u redis -U redis /usr/bin/redis-server /etc/redis/redis.conf
I, [2024-04-15T02:48:50.213799 #1]  INFO -- : > sleep 10
102:C 15 Apr 2024 02:48:50.228 # oO0OoO0OoO0Oo Redis is starting oO0OoO0OoO0Oo
102:C 15 Apr 2024 02:48:50.229 # Redis version=6.2.6, bits=64, commit=00000000, modified=0, pid=102, just started
102:C 15 Apr 2024 02:48:50.229 # Configuration loaded
102:M 15 Apr 2024 02:48:50.230 * monotonic clock: POSIX clock_gettime
102:M 15 Apr 2024 02:48:50.231 * Running mode=standalone, port=6379.
102:M 15 Apr 2024 02:48:50.232 # Server initialized
102:M 15 Apr 2024 02:48:50.233 * Loading RDB produced by version 6.2.6
102:M 15 Apr 2024 02:48:50.233 * RDB age 140 seconds
102:M 15 Apr 2024 02:48:50.233 * RDB memory usage when created 0.77 Mb
102:M 15 Apr 2024 02:48:50.233 # Done loading RDB, keys loaded: 0, keys expired: 0.
102:M 15 Apr 2024 02:48:50.234 * DB loaded from disk: 0.001 seconds
102:M 15 Apr 2024 02:48:50.234 * Ready to accept connections
I, [2024-04-15T02:49:00.222749 #1]  INFO -- : 
I, [2024-04-15T02:49:00.223782 #1]  INFO -- : > thpoff echo "thpoff is installed!"
I, [2024-04-15T02:49:00.231670 #1]  INFO -- : thpoff is installed!

I, [2024-04-15T02:49:00.232666 #1]  INFO -- : > /usr/local/bin/ruby -e 'if ENV["DISCOURSE_SMTP_ADDRESS"] == "smtp.example.com"; puts "Aborting! Mail is not configured!"; exit 1; end'
I, [2024-04-15T02:49:00.335493 #1]  INFO -- : 
I, [2024-04-15T02:49:00.336507 #1]  INFO -- : > /usr/local/bin/ruby -e 'if ENV["DISCOURSE_HOSTNAME"] == "discourse.example.com"; puts "Aborting! Domain is not configured!"; exit 1; end'
I, [2024-04-15T02:49:00.439794 #1]  INFO -- : 
I, [2024-04-15T02:49:00.440772 #1]  INFO -- : > /usr/local/bin/ruby -e 'if (ENV["DISCOURSE_CDN_URL"] || "")[0..1] == "//"; puts "Aborting! CDN must have a protocol specified. Once fixed you should rebake your posts now to correct all posts."; exit 1; end'
I, [2024-04-15T02:49:00.534408 #1]  INFO -- : 
I, [2024-04-15T02:49:00.535453 #1]  INFO -- : > rm -f /etc/cron.d/anacron
I, [2024-04-15T02:49:00.540142 #1]  INFO -- : 
I, [2024-04-15T02:49:00.545481 #1]  INFO -- : File > /etc/cron.d/anacron  chmod:   chown: 
I, [2024-04-15T02:49:00.554232 #1]  INFO -- : File > /etc/runit/1.d/copy-env  chmod: +x  chown: 
I, [2024-04-15T02:49:00.562824 #1]  INFO -- : File > /etc/service/unicorn/run  chmod: +x  chown: 
I, [2024-04-15T02:49:00.571888 #1]  INFO -- : File > /etc/service/nginx/run  chmod: +x  chown: 
I, [2024-04-15T02:49:00.581527 #1]  INFO -- : File > /etc/runit/3.d/01-nginx  chmod: +x  chown: 
I, [2024-04-15T02:49:00.591205 #1]  INFO -- : File > /etc/runit/3.d/02-unicorn  chmod: +x  chown: 
I, [2024-04-15T02:49:00.592102 #1]  INFO -- : Replacing # postgres with sv start postgres || exit 1 in /etc/service/unicorn/run
I, [2024-04-15T02:49:00.592915 #1]  INFO -- : > exec chpst -u redis -U redis /usr/bin/redis-server /etc/redis/redis.conf
I, [2024-04-15T02:49:00.597158 #1]  INFO -- : > cd /var/www/discourse && git reset --hard
129:C 15 Apr 2024 02:49:00.613 # oO0OoO0OoO0Oo Redis is starting oO0OoO0OoO0Oo
129:C 15 Apr 2024 02:49:00.614 # Redis version=6.2.6, bits=64, commit=00000000, modified=0, pid=129, just started
129:C 15 Apr 2024 02:49:00.615 # Configuration loaded
129:M 15 Apr 2024 02:49:00.617 * monotonic clock: POSIX clock_gettime
129:M 15 Apr 2024 02:49:00.618 # Warning: Could not create server TCP listening socket *:6379: bind: Address already in use
129:M 15 Apr 2024 02:49:00.619 # Failed listening on port 6379 (TCP), aborting.
Updating files: 100% (31151/31151), done.
I, [2024-04-15T02:49:07.035463 #1]  INFO -- : HEAD is now at 54a518b2 FIX: Quoting local dates bbcode regeneration (#17141)

I, [2024-04-15T02:49:07.036531 #1]  INFO -- : > cd /var/www/discourse && git clean -f
I, [2024-04-15T02:49:07.291236 #1]  INFO -- : 
I, [2024-04-15T02:49:07.292247 #1]  INFO -- : > cd /var/www/discourse && git remote set-branches --add origin main
I, [2024-04-15T02:49:07.300380 #1]  INFO -- : 
I, [2024-04-15T02:49:07.301437 #1]  INFO -- : > cd /var/www/discourse && git remote set-branches origin tests-passed
I, [2024-04-15T02:49:07.309865 #1]  INFO -- : 
I, [2024-04-15T02:49:07.310985 #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, [2024-04-15T02:49:13.565602 #1]  INFO -- : 
I, [2024-04-15T02:49:13.566195 #1]  INFO -- : > cd /var/www/discourse && git checkout tests-passed
Switched to a new branch 'tests-passed'
I, [2024-04-15T02:49:16.449113 #1]  INFO -- : Branch 'tests-passed' set up to track remote branch 'tests-passed' from 'origin'.

I, [2024-04-15T02:49:16.449835 #1]  INFO -- : > cd /var/www/discourse && mkdir -p tmp
I, [2024-04-15T02:49:16.467290 #1]  INFO -- : 
I, [2024-04-15T02:49:16.468178 #1]  INFO -- : > cd /var/www/discourse && chown discourse:www-data tmp
I, [2024-04-15T02:49:16.475931 #1]  INFO -- : 
I, [2024-04-15T02:49:16.476633 #1]  INFO -- : > cd /var/www/discourse && mkdir -p tmp/pids
I, [2024-04-15T02:49:16.482546 #1]  INFO -- : 
I, [2024-04-15T02:49:16.483395 #1]  INFO -- : > cd /var/www/discourse && mkdir -p tmp/sockets
I, [2024-04-15T02:49:16.489360 #1]  INFO -- : 
I, [2024-04-15T02:49:16.490157 #1]  INFO -- : > cd /var/www/discourse && touch tmp/.gitkeep
I, [2024-04-15T02:49:16.496566 #1]  INFO -- : 
I, [2024-04-15T02:49:16.497304 #1]  INFO -- : > cd /var/www/discourse && mkdir -p                    /shared/log/rails
I, [2024-04-15T02:49:16.505772 #1]  INFO -- : 
I, [2024-04-15T02:49:16.506706 #1]  INFO -- : > cd /var/www/discourse && bash -c "touch -a           /shared/log/rails/{production,production_errors,unicorn.stdout,unicorn.stderr,sidekiq}.log"
I, [2024-04-15T02:49:16.526664 #1]  INFO -- : 
I, [2024-04-15T02:49:16.527559 #1]  INFO -- : > cd /var/www/discourse && bash -c "ln    -s           /shared/log/rails/{production,production_errors,unicorn.stdout,unicorn.stderr,sidekiq}.log /var/www/discourse/log"
I, [2024-04-15T02:49:16.537312 #1]  INFO -- : 
I, [2024-04-15T02:49:16.538098 #1]  INFO -- : > cd /var/www/discourse && bash -c "mkdir -p           /shared/{uploads,backups}"
I, [2024-04-15T02:49:16.546162 #1]  INFO -- : 
I, [2024-04-15T02:49:16.546977 #1]  INFO -- : > cd /var/www/discourse && bash -c "ln    -s           /shared/{uploads,backups} /var/www/discourse/public"
I, [2024-04-15T02:49:16.554482 #1]  INFO -- : 
I, [2024-04-15T02:49:16.555198 #1]  INFO -- : > cd /var/www/discourse && bash -c "mkdir -p           /shared/tmp/{backups,restores}"
I, [2024-04-15T02:49:16.563069 #1]  INFO -- : 
I, [2024-04-15T02:49:16.563749 #1]  INFO -- : > cd /var/www/discourse && bash -c "ln    -s           /shared/tmp/{backups,restores} /var/www/discourse/tmp"
I, [2024-04-15T02:49:16.570566 #1]  INFO -- : 
I, [2024-04-15T02:49:16.571223 #1]  INFO -- : > cd /var/www/discourse && chown -R discourse:www-data /shared/log/rails /shared/uploads /shared/backups /shared/tmp
I, [2024-04-15T02:49:16.578439 #1]  INFO -- : 
I, [2024-04-15T02:49:16.579380 #1]  INFO -- : > cd /var/www/discourse && find public/plugins/ -maxdepth 1 -xtype l -delete
I, [2024-04-15T02:49:16.593180 #1]  INFO -- : 
I, [2024-04-15T02:49:16.595818 #1]  INFO -- : Replacing # redis with sv start redis || exit 1 in /etc/service/unicorn/run
I, [2024-04-15T02:49:16.596916 #1]  INFO -- : > cd /var/www/discourse/plugins && git clone https://github.com/discourse/docker_manager.git
Cloning into 'docker_manager'...
I, [2024-04-15T02:49:18.528890 #1]  INFO -- : 
I, [2024-04-15T02:49:18.530092 #1]  INFO -- : > cp /var/www/discourse/config/nginx.sample.conf /etc/nginx/conf.d/discourse.conf
I, [2024-04-15T02:49:18.538962 #1]  INFO -- : 
I, [2024-04-15T02:49:18.539966 #1]  INFO -- : > rm /etc/nginx/sites-enabled/default
I, [2024-04-15T02:49:18.546460 #1]  INFO -- : 
I, [2024-04-15T02:49:18.547278 #1]  INFO -- : > mkdir -p /var/nginx/cache
I, [2024-04-15T02:49:18.552743 #1]  INFO -- : 
I, [2024-04-15T02:49:18.554102 #1]  INFO -- : Replacing pid /run/nginx.pid; with daemon off; in /etc/nginx/nginx.conf
I, [2024-04-15T02:49:18.555544 #1]  INFO -- : Replacing (?m-ix:upstream[^\}]+\}) with upstream discourse { server 127.0.0.1:3000; } in /etc/nginx/conf.d/discourse.conf
I, [2024-04-15T02:49:18.556204 #1]  INFO -- : Replacing (?-mix:server_name.+$) with server_name _ ; in /etc/nginx/conf.d/discourse.conf
I, [2024-04-15T02:49:18.556825 #1]  INFO -- : Replacing (?-mix:client_max_body_size.+$) with client_max_body_size $upload_size ; in /etc/nginx/conf.d/discourse.conf
I, [2024-04-15T02:49:18.560440 #1]  INFO -- : Replacing (?-mix:worker_connections.+$) with worker_connections $nginx_worker_connections ; in /etc/nginx/nginx.conf
I, [2024-04-15T02:49:18.561087 #1]  INFO -- : > echo "done configuring web"
I, [2024-04-15T02:49:18.565304 #1]  INFO -- : done configuring web

I, [2024-04-15T02:49:18.566004 #1]  INFO -- : > cd /var/www/discourse && gem install bundler --conservative -v $(awk '/BUNDLED WITH/ { getline; gsub(/ /,""); print $0 }' Gemfile.lock)
ERROR:  Error installing bundler:
        bundler-2.5.3 requires Ruby version >= 3.0.0. The current ruby version is 2.7.6.
I, [2024-04-15T02:49:19.593447 #1]  INFO -- : 
I, [2024-04-15T02:49:19.594586 #1]  INFO -- : Terminating async processes
I, [2024-04-15T02:49:19.594993 #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: 41
I, [2024-04-15T02:49:19.595402 #1]  INFO -- : Sending TERM to exec chpst -u redis -U redis /usr/bin/redis-server /etc/redis/redis.conf pid: 102
2024-04-15 02:49:19.595 UTC [41] LOG:  received fast shutdown request
102:signal-handler (1713149359) Received SIGTERM scheduling shutdown...
2024-04-15 02:49:19.607 UTC [41] LOG:  aborting any active transactions
2024-04-15 02:49:19.616 UTC [41] LOG:  background worker "logical replication launcher" (PID 50) exited with exit code 1
2024-04-15 02:49:19.617 UTC [45] LOG:  shutting down
102:M 15 Apr 2024 02:49:19.668 # User requested shutdown...
102:M 15 Apr 2024 02:49:19.669 * Saving the final RDB snapshot before exiting.
102:M 15 Apr 2024 02:49:19.673 * DB saved on disk
102:M 15 Apr 2024 02:49:19.673 # Redis is now ready to exit, bye bye...
2024-04-15 02:49:19.676 UTC [41] LOG:  database system is shut down


FAILED
--------------------
Pups::ExecError: cd /var/www/discourse && gem install bundler --conservative -v $(awk '/BUNDLED WITH/ { getline; gsub(/ /,""); print $0 }' Gemfile.lock) failed with return #<Process::Status: pid 231 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"=>"web", "cmd"=>["gem install bundler --conservative -v $(awk '/BUNDLED WITH/ { getline; gsub(/ /,\"\"); print $0 }' Gemfile.lock)", "find $home ! -user discourse -exec chown discourse {} \\+"]}
bootstrap failed with exit code 1
** FAILED TO BOOTSTRAP ** please scroll up and look for earlier error messages, there may be more than one.

and here is the log when I tried to specify the version on container/app.yml

Pups::ExecError: cd /var/www/discourse && git checkout v2.9.0.beta6 failed with return #<Process::Status: pid 149 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"=>"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.
8df2a28a3a9f1a20015aeed1f72952ca28fd71f73ffd22b6376cd09ca27e1aec

I would recommend that you build a new server on the current version and restore your databse and see what happens. I don’t think you’re going to learn anything useful moving it to an old Discourse.

It sounds like you’ll also need to update your plugin, but as a first step you could just remove it and test restoring your database to current Discourse.

1 Like

@pfaffman I see, but I need to make sure our current production will be ok when upgrading, as it’s already really old, and I need to make sure after upgrading the plugins etc everything will be working.

But I already able to make it running, but the weird thing is, the admin site is inaccesible, do you know why?
I got tons of network errors

and here is the admin site

and this is what happened after I reload the page

I also already match the version our production server docker_manager plugin with the staging, but it’s still not working.

You really don’t. Your current production system is working fine now.

Here’s what I’d do:

  • set up new system
  • have new and old systems share an S3 bucket for backups
  • restore current production database to new system
  • fix your plugin, do testing
  • when it works, make the old site read only
  • backup old system, restore to new,
  • switch DNS to the new system,
  • destroy old system a few days later
1 Like