" undefined method `deprecated?' for nil:NilClass" on rebuild

Hi !
We are using Discourse on community.museomix.org since many years

But I encounter a strange problem when I rebuild the container, it fails with this message:

 undefined method `deprecated?' for nil:NilClass

Here is the full rebuild discourse-doctor output if it can help

DISCOURSE DOCTOR Fri Jan 13 03:57:02 PM EST 2023
OS: Linux Community 3.13.0-52-generic #85-Ubuntu SMP Wed Apr 29 16:44:17 UTC 2015 x86_64 x86_64 x86_64 GNU/Linux


Found containers/app.yml

==================== YML SETTINGS ====================
DISCOURSE_HOSTNAME=community.museomix.org
SMTP_ADDRESS=
DEVELOPER_EMAILS=foo@foo.com
SMTP_PASSWORD=
SMTP_PORT=587
SMTP_USER_NAME=
LETSENCRYPT_ACCOUNT_EMAIL='foo@foo.com' #LETSENCRYPT_ACCOUNT_EMAIL

==================== DOCKER INFO ====================
DOCKER VERSION: Docker version 20.10.22, build 3a2c30b

DOCKER PROCESSES (docker ps -a)

CONTAINER ID   IMAGE                 COMMAND        CREATED         STATUS                      PORTS     NAMES
f264bbb9a068   hello-world           "/hello"       9 minutes ago   Exited (0) 9 minutes ago              sharp_pare
6cf48eb9791f   local_discourse/app   "/sbin/boot"   4 days ago      Exited (6) 12 minutes ago             app

==================== SERIOUS PROBLEM!!!! ====================
app not running!
Attempting to rebuild
==================== REBUILD LOG ====================
x86_64 arch detected.
Ensuring launcher is up to date
Fetching origin
Launcher is up-to-date
Stopping old container
+ /usr/bin/docker stop -t 60 app
app
2.0.20221221-0050: Pulling from discourse/base
Digest: sha256:7ac6489e34a0f40f32457bffaa331940a98447b46451a6a1279a79868ee5420b
Status: Image is up to date for discourse/base:2.0.20221221-0050
docker.io/discourse/base:2.0.20221221-0050
/usr/local/lib/ruby/gems/3.1.0/gems/pups-1.1.1/lib/pups.rb
/usr/local/bin/pups --stdin
I, [2023-01-13T20:57:14.087807 #1]  INFO -- : Reading from stdin
I, [2023-01-13T20:57:14.092670 #1]  INFO -- : > locale-gen $LANG && update-locale
I, [2023-01-13T20:57:14.350231 #1]  INFO -- : Generating locales (this might take a while)...
Generation complete.

I, [2023-01-13T20:57:14.350649 #1]  INFO -- : > mkdir -p /shared/postgres_run
I, [2023-01-13T20:57:14.355407 #1]  INFO -- :
I, [2023-01-13T20:57:14.356158 #1]  INFO -- : > chown postgres:postgres /shared/postgres_run
I, [2023-01-13T20:57:14.359173 #1]  INFO -- :
I, [2023-01-13T20:57:14.359515 #1]  INFO -- : > chmod 775 /shared/postgres_run
I, [2023-01-13T20:57:14.361742 #1]  INFO -- :
I, [2023-01-13T20:57:14.362373 #1]  INFO -- : > rm -fr /var/run/postgresql
I, [2023-01-13T20:57:14.364979 #1]  INFO -- :
I, [2023-01-13T20:57:14.365387 #1]  INFO -- : > ln -s /shared/postgres_run /var/run/postgresql
I, [2023-01-13T20:57:14.368409 #1]  INFO -- :
I, [2023-01-13T20:57:14.368699 #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/13 20:57:14 socat[18] E connect(6, AF=1 "/shared/postgres_run/.s.PGSQL.5432", 36): No such file or directory
I, [2023-01-13T20:57:14.388890 #1]  INFO -- :
I, [2023-01-13T20:57:14.389245 #1]  INFO -- : > rm -fr /shared/postgres_run/.s*
I, [2023-01-13T20:57:14.392196 #1]  INFO -- :
I, [2023-01-13T20:57:14.392487 #1]  INFO -- : > rm -fr /shared/postgres_run/*.pid
I, [2023-01-13T20:57:14.395147 #1]  INFO -- :
I, [2023-01-13T20:57:14.395454 #1]  INFO -- : > mkdir -p /shared/postgres_run/13-main.pg_stat_tmp
I, [2023-01-13T20:57:14.398215 #1]  INFO -- :
I, [2023-01-13T20:57:14.398653 #1]  INFO -- : > chown postgres:postgres /shared/postgres_run/13-main.pg_stat_tmp
I, [2023-01-13T20:57:14.400967 #1]  INFO -- :
I, [2023-01-13T20:57:14.417469 #1]  INFO -- : File > /etc/service/postgres/run  chmod: +x  chown:
I, [2023-01-13T20:57:14.428618 #1]  INFO -- : File > /etc/service/postgres/log/run  chmod: +x  chown:
I, [2023-01-13T20:57:14.434745 #1]  INFO -- : File > /etc/runit/3.d/99-postgres  chmod: +x  chown:
I, [2023-01-13T20:57:14.439755 #1]  INFO -- : File > /root/upgrade_postgres  chmod: +x  chown:
I, [2023-01-13T20:57:14.440185 #1]  INFO -- : > chown -R root /var/lib/postgresql/13/main
I, [2023-01-13T20:57:15.206364 #1]  INFO -- :
I, [2023-01-13T20:57:15.206661 #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-13T20:57:15.208870 #1]  INFO -- :
I, [2023-01-13T20:57:15.209144 #1]  INFO -- : > chown -R postgres:postgres /shared/postgres_data
I, [2023-01-13T20:57:15.231061 #1]  INFO -- :
I, [2023-01-13T20:57:15.231632 #1]  INFO -- : > chown -R postgres:postgres /var/run/postgresql
I, [2023-01-13T20:57:15.234995 #1]  INFO -- :
I, [2023-01-13T20:57:15.235497 #1]  INFO -- : > /root/upgrade_postgres
I, [2023-01-13T20:57:15.243749 #1]  INFO -- :
I, [2023-01-13T20:57:15.244196 #1]  INFO -- : > rm /root/upgrade_postgres
I, [2023-01-13T20:57:15.247241 #1]  INFO -- :
I, [2023-01-13T20:57:15.249344 #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-13T20:57:15.250389 #1]  INFO -- : Replacing (?-mix:#?listen_addresses *=.*) with listen_addresses = '*' in /etc/postgresql/13/main/postgresql.conf
I, [2023-01-13T20:57:15.251310 #1]  INFO -- : Replacing (?-mix:#?synchronous_commit *=.*) with synchronous_commit = $db_synchronous_commit in /etc/postgresql/13/main/postgresql.conf
I, [2023-01-13T20:57:15.251962 #1]  INFO -- : Replacing (?-mix:#?shared_buffers *=.*) with shared_buffers = $db_shared_buffers in /etc/postgresql/13/main/postgresql.conf
I, [2023-01-13T20:57:15.252492 #1]  INFO -- : Replacing (?-mix:#?work_mem *=.*) with work_mem = $db_work_mem in /etc/postgresql/13/main/postgresql.conf
I, [2023-01-13T20:57:15.253049 #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-13T20:57:15.253648 #1]  INFO -- : > install -d -m 0755 -o postgres -g postgres /shared/postgres_backup
I, [2023-01-13T20:57:15.258895 #1]  INFO -- :
I, [2023-01-13T20:57:15.259524 #1]  INFO -- : Replacing (?-mix:#?checkpoint_segments *=.*) with checkpoint_segments = $db_checkpoint_segments in /etc/postgresql/13/main/postgresql.conf
I, [2023-01-13T20:57:15.260000 #1]  INFO -- : Replacing (?-mix:#?logging_collector *=.*) with logging_collector = $db_logging_collector in /etc/postgresql/13/main/postgresql.conf
I, [2023-01-13T20:57:15.260759 #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-13T20:57:15.261995 #1]  INFO -- : Replacing (?-mix:^#local +replication +postgres +peer$) with local replication postgres  peer in /etc/postgresql/13/main/pg_hba.conf
I, [2023-01-13T20:57:15.262518 #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-13T20:57:15.263083 #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-13T20:57:15.263399 #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-13T20:57:15.264639 #1]  INFO -- : > sleep 5
2023-01-13 20:57:15.347 UTC [41] LOG:  starting PostgreSQL 13.9 (Debian 13.9-1.pgdg110+1) on x86_64-pc-linux-gnu, compiled by gcc (Debian 10.2.1-6) 10.2.1 20210110, 64-bit
2023-01-13 20:57:15.348 UTC [41] LOG:  listening on IPv4 address "0.0.0.0", port 5432
2023-01-13 20:57:15.348 UTC [41] LOG:  listening on IPv6 address "::", port 5432
2023-01-13 20:57:15.350 UTC [41] LOG:  listening on Unix socket "/var/run/postgresql/.s.PGSQL.5432"
2023-01-13 20:57:15.356 UTC [44] LOG:  database system was shut down at 2023-01-13 20:52:18 UTC
2023-01-13 20:57:15.364 UTC [41] LOG:  database system is ready to accept connections
I, [2023-01-13T20:57:20.301579 #1]  INFO -- :
I, [2023-01-13T20:57:20.301874 #1]  INFO -- : > su postgres -c 'createdb discourse' || true
2023-01-13 20:57:20.394 UTC [54] postgres@postgres ERROR:  database "discourse" already exists
2023-01-13 20:57:20.394 UTC [54] postgres@postgres STATEMENT:  CREATE DATABASE discourse;
createdb: error: database creation failed: ERROR:  database "discourse" already exists
I, [2023-01-13T20:57:20.396968 #1]  INFO -- :
I, [2023-01-13T20:57:20.397470 #1]  INFO -- : > su postgres -c 'psql discourse -c "create user discourse;"' || true
2023-01-13 20:57:20.471 UTC [58] postgres@discourse ERROR:  role "discourse" already exists
2023-01-13 20:57:20.471 UTC [58] postgres@discourse STATEMENT:  create user discourse;
ERROR:  role "discourse" already exists
I, [2023-01-13T20:57:20.474321 #1]  INFO -- :
I, [2023-01-13T20:57:20.474802 #1]  INFO -- : > su postgres -c 'psql discourse -c "grant all privileges on database discourse to discourse;"' || true
I, [2023-01-13T20:57:20.547104 #1]  INFO -- : GRANT

I, [2023-01-13T20:57:20.547549 #1]  INFO -- : > su postgres -c 'psql discourse -c "alter schema public owner to discourse;"'
I, [2023-01-13T20:57:20.607661 #1]  INFO -- : ALTER SCHEMA

I, [2023-01-13T20:57:20.608077 #1]  INFO -- : > su postgres -c 'psql template1 -c "create extension if not exists hstore;"'
NOTICE:  extension "hstore" already exists, skipping
I, [2023-01-13T20:57:20.668785 #1]  INFO -- : CREATE EXTENSION

I, [2023-01-13T20:57:20.669132 #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-13T20:57:20.729483 #1]  INFO -- : CREATE EXTENSION

I, [2023-01-13T20:57:20.730252 #1]  INFO -- : > su postgres -c 'psql discourse -c "create extension if not exists hstore;"'
NOTICE:  extension "hstore" already exists, skipping
I, [2023-01-13T20:57:20.790467 #1]  INFO -- : CREATE EXTENSION

I, [2023-01-13T20:57:20.790873 #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-13T20:57:20.850443 #1]  INFO -- : CREATE EXTENSION

I, [2023-01-13T20:57:20.850882 #1]  INFO -- : > sudo -u postgres psql discourse
I, [2023-01-13T20:57:20.854666 #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-13T20:57:20.926407 #1]  INFO -- : File > /var/lib/postgresql/take-database-backup  chmod: +x  chown: postgres:postgres
I, [2023-01-13T20:57:20.931661 #1]  INFO -- : File > /var/spool/cron/crontabs/postgres  chmod:   chown:
I, [2023-01-13T20:57:20.932121 #1]  INFO -- : > echo postgres installed!
I, [2023-01-13T20:57:20.935624 #1]  INFO -- : postgres installed!

I, [2023-01-13T20:57:20.942545 #1]  INFO -- : File > /etc/service/redis/run  chmod: +x  chown:
I, [2023-01-13T20:57:20.948661 #1]  INFO -- : File > /etc/service/redis/log/run  chmod: +x  chown:
I, [2023-01-13T20:57:20.953584 #1]  INFO -- : File > /etc/runit/3.d/10-redis  chmod: +x  chown:
I, [2023-01-13T20:57:20.955243 #1]  INFO -- : Replacing daemonize yes with  in /etc/redis/redis.conf
I, [2023-01-13T20:57:20.956050 #1]  INFO -- : Replacing (?-mix:^pidfile.*$) with  in /etc/redis/redis.conf
I, [2023-01-13T20:57:20.957307 #1]  INFO -- : > install -d -m 0755 -o redis -g redis /shared/redis_data
I, [2023-01-13T20:57:20.961081 #1]  INFO -- :
I, [2023-01-13T20:57:20.961686 #1]  INFO -- : Replacing (?-mix:^logfile.*$) with logfile "" in /etc/redis/redis.conf
I, [2023-01-13T20:57:20.962359 #1]  INFO -- : Replacing (?-mix:^bind .*$) with  in /etc/redis/redis.conf
I, [2023-01-13T20:57:20.963776 #1]  INFO -- : Replacing (?-mix:^dir .*$) with dir /shared/redis_data in /etc/redis/redis.conf
I, [2023-01-13T20:57:20.965043 #1]  INFO -- : Replacing (?-mix:^protected-mode yes) with protected-mode no in /etc/redis/redis.conf
I, [2023-01-13T20:57:20.966468 #1]  INFO -- : Replacing # io-threads 4 with io-threads $redis_io_threads in /etc/redis/redis.conf
I, [2023-01-13T20:57:20.967502 #1]  INFO -- : > echo redis installed
I, [2023-01-13T20:57:20.970150 #1]  INFO -- : redis installed

I, [2023-01-13T20:57:20.970503 #1]  INFO -- : > cat /etc/redis/redis.conf | grep logfile
I, [2023-01-13T20:57:20.975752 #1]  INFO -- : logfile ""

I, [2023-01-13T20:57:20.976133 #1]  INFO -- : > exec chpst -u redis -U redis /usr/bin/redis-server /etc/redis/redis.conf
I, [2023-01-13T20:57:20.977296 #1]  INFO -- : > sleep 10
102:C 13 Jan 2023 20:57:21.392 # oO0OoO0OoO0Oo Redis is starting oO0OoO0OoO0Oo
102:C 13 Jan 2023 20:57:21.392 # Redis version=7.0.7, bits=64, commit=00000000, modified=0, pid=102, just started
102:C 13 Jan 2023 20:57:21.392 # Configuration loaded
102:M 13 Jan 2023 20:57:21.393 * monotonic clock: POSIX clock_gettime
102:M 13 Jan 2023 20:57:21.394 * Running mode=standalone, port=6379.
102:M 13 Jan 2023 20:57:21.394 # WARNING: The TCP backlog setting of 511 cannot be enforced because /proc/sys/net/core/somaxconn is set to the lower value of 128.
102:M 13 Jan 2023 20:57:21.395 # Server initialized
102:M 13 Jan 2023 20:57:21.395 # 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.
102:M 13 Jan 2023 20:57:21.395 # WARNING You have Transparent Huge Pages (THP) support enabled in your kernel. This will create latency and memory usage issues with Redis. To fix this issue run the command 'echo madvise > /sys/kernel/mm/transparent_hugepage/enabled' as root, and add it to your /etc/rc.local in order to retain the setting after a reboot. Redis must be restarted after THP is disabled (set to 'madvise' or 'never').
102:M 13 Jan 2023 20:57:21.396 * Loading RDB produced by version 7.0.7
102:M 13 Jan 2023 20:57:21.397 * RDB age 303 seconds
102:M 13 Jan 2023 20:57:21.397 * RDB memory usage when created 12.28 Mb
102:M 13 Jan 2023 20:57:21.434 * Done loading RDB, keys loaded: 12352, keys expired: 0.
102:M 13 Jan 2023 20:57:21.435 * DB loaded from disk: 0.039 seconds
102:M 13 Jan 2023 20:57:21.435 * Ready to accept connections
I, [2023-01-13T20:57:30.983477 #1]  INFO -- :
I, [2023-01-13T20:57:30.983658 #1]  INFO -- : > thpoff echo "thpoff is installed!"
I, [2023-01-13T20:57:30.988243 #1]  INFO -- : thpoff is installed!

I, [2023-01-13T20:57:30.988586 #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-13T20:57:32.884024 #1]  INFO -- :
I, [2023-01-13T20:57:32.884607 #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-13T20:57:32.991609 #1]  INFO -- :
I, [2023-01-13T20:57:32.992131 #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-13T20:57:33.085605 #1]  INFO -- :
I, [2023-01-13T20:57:33.086528 #1]  INFO -- : > rm -f /etc/cron.d/anacron
I, [2023-01-13T20:57:33.089851 #1]  INFO -- :
I, [2023-01-13T20:57:33.092981 #1]  INFO -- : File > /etc/cron.d/anacron  chmod:   chown:
I, [2023-01-13T20:57:33.098976 #1]  INFO -- : File > /etc/runit/1.d/copy-env  chmod: +x  chown:
I, [2023-01-13T20:57:33.104108 #1]  INFO -- : File > /etc/service/unicorn/run  chmod: +x  chown:
I, [2023-01-13T20:57:33.109588 #1]  INFO -- : File > /etc/service/nginx/run  chmod: +x  chown:
I, [2023-01-13T20:57:33.115297 #1]  INFO -- : File > /etc/runit/3.d/01-nginx  chmod: +x  chown:
I, [2023-01-13T20:57:33.120367 #1]  INFO -- : File > /etc/runit/3.d/02-unicorn  chmod: +x  chown:
I, [2023-01-13T20:57:33.120696 #1]  INFO -- : Replacing # postgres with sv start postgres || exit 1 in /etc/service/unicorn/run
I, [2023-01-13T20:57:33.121020 #1]  INFO -- : > exec chpst -u redis -U redis /usr/bin/redis-server /etc/redis/redis.conf
I, [2023-01-13T20:57:33.123102 #1]  INFO -- : > cd /var/www/discourse && git reset --hard
129:C 13 Jan 2023 20:57:33.133 # oO0OoO0OoO0Oo Redis is starting oO0OoO0OoO0Oo
129:C 13 Jan 2023 20:57:33.133 # Redis version=7.0.7, bits=64, commit=00000000, modified=0, pid=129, just started
129:C 13 Jan 2023 20:57:33.133 # Configuration loaded
129:M 13 Jan 2023 20:57:33.134 * monotonic clock: POSIX clock_gettime
129:M 13 Jan 2023 20:57:33.134 # Warning: Could not create server TCP listening socket *:6379: bind: Address already in use
129:M 13 Jan 2023 20:57:33.134 # Failed listening on port 6379 (TCP), aborting.
Updating files: 100% (32637/32637), done.
I, [2023-01-13T20:57:47.114566 #1]  INFO -- : HEAD is now at e775ed1c DEV: Properly include spec examples (#19532)

I, [2023-01-13T20:57:47.115003 #1]  INFO -- : > cd /var/www/discourse && git clean -f
I, [2023-01-13T20:57:47.360028 #1]  INFO -- :
I, [2023-01-13T20:57:47.360436 #1]  INFO -- : > cd /var/www/discourse && git remote set-branches --add origin main
I, [2023-01-13T20:57:47.366539 #1]  INFO -- :
I, [2023-01-13T20:57:47.366909 #1]  INFO -- : > cd /var/www/discourse && git remote set-branches origin tests-passed
I, [2023-01-13T20:57:47.371415 #1]  INFO -- :
I, [2023-01-13T20:57:47.371771 #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-13T20:57:50.960336 #1]  INFO -- :
I, [2023-01-13T20:57:50.960667 #1]  INFO -- : > cd /var/www/discourse && git checkout tests-passed
Switched to a new branch 'tests-passed'
I, [2023-01-13T20:57:52.014831 #1]  INFO -- : Branch 'tests-passed' set up to track remote branch 'tests-passed' from 'origin'.

I, [2023-01-13T20:57:52.015196 #1]  INFO -- : > cd /var/www/discourse && mkdir -p tmp
I, [2023-01-13T20:57:52.019694 #1]  INFO -- :
I, [2023-01-13T20:57:52.020014 #1]  INFO -- : > cd /var/www/discourse && chown discourse:www-data tmp
I, [2023-01-13T20:57:52.023449 #1]  INFO -- :
I, [2023-01-13T20:57:52.023752 #1]  INFO -- : > cd /var/www/discourse && mkdir -p tmp/pids
I, [2023-01-13T20:57:52.026874 #1]  INFO -- :
I, [2023-01-13T20:57:52.027135 #1]  INFO -- : > cd /var/www/discourse && mkdir -p tmp/sockets
I, [2023-01-13T20:57:52.030196 #1]  INFO -- :
I, [2023-01-13T20:57:52.030447 #1]  INFO -- : > cd /var/www/discourse && touch tmp/.gitkeep
I, [2023-01-13T20:57:52.034623 #1]  INFO -- :
I, [2023-01-13T20:57:52.034894 #1]  INFO -- : > cd /var/www/discourse && mkdir -p                    /shared/log/rails
I, [2023-01-13T20:57:52.038374 #1]  INFO -- :
I, [2023-01-13T20:57:52.038629 #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-13T20:57:52.044961 #1]  INFO -- :
I, [2023-01-13T20:57:52.045215 #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-13T20:57:52.050783 #1]  INFO -- :
I, [2023-01-13T20:57:52.051070 #1]  INFO -- : > cd /var/www/discourse && bash -c "mkdir -p           /shared/{uploads,backups}"
I, [2023-01-13T20:57:52.056515 #1]  INFO -- :
I, [2023-01-13T20:57:52.056781 #1]  INFO -- : > cd /var/www/discourse && bash -c "ln    -s           /shared/{uploads,backups} /var/www/discourse/public"
I, [2023-01-13T20:57:52.062351 #1]  INFO -- :
I, [2023-01-13T20:57:52.062666 #1]  INFO -- : > cd /var/www/discourse && bash -c "mkdir -p           /shared/tmp/{backups,restores}"
I, [2023-01-13T20:57:52.068265 #1]  INFO -- :
I, [2023-01-13T20:57:52.068578 #1]  INFO -- : > cd /var/www/discourse && bash -c "ln    -s           /shared/tmp/{backups,restores} /var/www/discourse/tmp"
I, [2023-01-13T20:57:52.073527 #1]  INFO -- :
I, [2023-01-13T20:57:52.074212 #1]  INFO -- : > cd /var/www/discourse && chown -R discourse:www-data /shared/log/rails /shared/uploads /shared/backups /shared/tmp
I, [2023-01-13T20:57:52.117534 #1]  INFO -- :
I, [2023-01-13T20:57:52.117960 #1]  INFO -- : > cd /var/www/discourse && [ ! -d public/plugins ] || find public/plugins/ -maxdepth 1 -xtype l -delete
I, [2023-01-13T20:57:52.123169 #1]  INFO -- :
I, [2023-01-13T20:57:52.123948 #1]  INFO -- : Replacing # redis with sv start redis || exit 1 in /etc/service/unicorn/run
I, [2023-01-13T20:57:52.124352 #1]  INFO -- : > cd /var/www/discourse/plugins && git clone https://github.com/discourse/docker_manager.git
Cloning into 'docker_manager'...
I, [2023-01-13T20:57:54.360521 #1]  INFO -- :
I, [2023-01-13T20:57:54.361091 #1]  INFO -- : > cp /var/www/discourse/config/nginx.sample.conf /etc/nginx/conf.d/discourse.conf
I, [2023-01-13T20:57:54.366047 #1]  INFO -- :
I, [2023-01-13T20:57:54.366535 #1]  INFO -- : > rm /etc/nginx/sites-enabled/default
I, [2023-01-13T20:57:54.369289 #1]  INFO -- :
I, [2023-01-13T20:57:54.369615 #1]  INFO -- : > mkdir -p /var/nginx/cache
I, [2023-01-13T20:57:54.372453 #1]  INFO -- :
I, [2023-01-13T20:57:54.373095 #1]  INFO -- : Replacing pid /run/nginx.pid; with daemon off; in /etc/nginx/nginx.conf
I, [2023-01-13T20:57:54.373542 #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-13T20:57:54.374208 #1]  INFO -- : Replacing (?-mix:server_name.+$) with server_name _ ; in /etc/nginx/conf.d/discourse.conf
I, [2023-01-13T20:57:54.374683 #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-13T20:57:54.375248 #1]  INFO -- : Replacing (?-mix:worker_connections.+$) with worker_connections $nginx_worker_connections ; in /etc/nginx/nginx.conf
I, [2023-01-13T20:57:54.375540 #1]  INFO -- : > echo "done configuring web"
I, [2023-01-13T20:57:54.377017 #1]  INFO -- : done configuring web

I, [2023-01-13T20:57:54.377367 #1]  INFO -- : > cd /var/www/discourse && gem install bundler --conservative -v $(awk '/BUNDLED WITH/ { getline; gsub(/ /,""); print $0 }' Gemfile.lock)
ERROR:  Loading command: install (RuntimeError)
        failed to get urandom
        /usr/local/lib/ruby/3.1.0/securerandom.rb:75:in `urandom'
        /usr/local/lib/ruby/3.1.0/securerandom.rb:75:in `singleton class'
        /usr/local/lib/ruby/3.1.0/securerandom.rb:42:in `<module:SecureRandom>'
        /usr/local/lib/ruby/3.1.0/securerandom.rb:41:in `<top (required)>'
        <internal:/usr/local/lib/ruby/3.1.0/rubygems/core_ext/kernel_require.rb>:85:in `require'
        <internal:/usr/local/lib/ruby/3.1.0/rubygems/core_ext/kernel_require.rb>:85:in `require'
        /usr/local/lib/ruby/3.1.0/resolv.rb:8:in `<top (required)>'
        <internal:/usr/local/lib/ruby/3.1.0/rubygems/core_ext/kernel_require.rb>:85:in `require'
        <internal:/usr/local/lib/ruby/3.1.0/rubygems/core_ext/kernel_require.rb>:85:in `require'
        /usr/local/lib/ruby/3.1.0/net/http.rb:25:in `<top (required)>'
        <internal:/usr/local/lib/ruby/3.1.0/rubygems/core_ext/kernel_require.rb>:85:in `require'
        <internal:/usr/local/lib/ruby/3.1.0/rubygems/core_ext/kernel_require.rb>:85:in `require'
        /usr/local/lib/ruby/3.1.0/rubygems/request.rb:2:in `<top (required)>'
        /usr/local/lib/ruby/3.1.0/rubygems/remote_fetcher.rb:3:in `require_relative'
        /usr/local/lib/ruby/3.1.0/rubygems/remote_fetcher.rb:3:in `<top (required)>'
        /usr/local/lib/ruby/3.1.0/rubygems/spec_fetcher.rb:2:in `require_relative'
        /usr/local/lib/ruby/3.1.0/rubygems/spec_fetcher.rb:2:in `<top (required)>'
        /usr/local/lib/ruby/3.1.0/rubygems/dependency_installer.rb:6:in `require_relative'
        /usr/local/lib/ruby/3.1.0/rubygems/dependency_installer.rb:6:in `<top (required)>'
        /usr/local/lib/ruby/3.1.0/rubygems/commands/install_command.rb:4:in `require_relative'
        /usr/local/lib/ruby/3.1.0/rubygems/commands/install_command.rb:4:in `<top (required)>'
        <internal:/usr/local/lib/ruby/3.1.0/rubygems/core_ext/kernel_require.rb>:85:in `require'
        <internal:/usr/local/lib/ruby/3.1.0/rubygems/core_ext/kernel_require.rb>:85:in `require'
        /usr/local/lib/ruby/3.1.0/rubygems/command_manager.rb:228:in `load_and_instantiate'
        /usr/local/lib/ruby/3.1.0/rubygems/command_manager.rb:135:in `[]'
        /usr/local/lib/ruby/3.1.0/rubygems/command_manager.rb:201:in `find_command'
        /usr/local/lib/ruby/3.1.0/rubygems/command_manager.rb:183:in `process_args'
        /usr/local/lib/ruby/3.1.0/rubygems/command_manager.rb:149:in `run'
        /usr/local/lib/ruby/3.1.0/rubygems/gem_runner.rb:51:in `run'
        /usr/local/bin/gem:21:in `<main>'
ERROR:  While executing gem ... (NoMethodError)
    undefined method `deprecated?' for nil:NilClass

      cmd.deprecation_warning if cmd.deprecated?
                                    ^^^^^^^^^^^^
        /usr/local/lib/ruby/3.1.0/rubygems/command_manager.rb:184:in `process_args'
        /usr/local/lib/ruby/3.1.0/rubygems/command_manager.rb:149:in `run'
        /usr/local/lib/ruby/3.1.0/rubygems/gem_runner.rb:51:in `run'
        /usr/local/bin/gem:21:in `<main>'
I, [2023-01-13T20:57:54.876405 #1]  INFO -- :
I, [2023-01-13T20:57:54.876935 #1]  INFO -- : Terminating async processes
I, [2023-01-13T20:57:54.877081 #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, [2023-01-13T20:57:54.877224 #1]  INFO -- : Sending TERM to exec chpst -u redis -U redis /usr/bin/redis-server /etc/redis/redis.conf pid: 102
102:signal-handler (1673643474) Received SIGTERM scheduling shutdown...
2023-01-13 20:57:54.877 UTC [41] LOG:  received fast shutdown request
2023-01-13 20:57:54.881 UTC [41] LOG:  aborting any active transactions
2023-01-13 20:57:54.886 UTC [41] LOG:  background worker "logical replication launcher" (PID 50) exited with exit code 1
2023-01-13 20:57:54.887 UTC [45] LOG:  shutting down
2023-01-13 20:57:54.907 UTC [41] LOG:  database system is shut down
102:M 13 Jan 2023 20:57:54.944 # User requested shutdown...
102:M 13 Jan 2023 20:57:54.944 * Saving the final RDB snapshot before exiting.
102:M 13 Jan 2023 20:57:55.006 * DB saved on disk
102:M 13 Jan 2023 20:57:55.006 # Redis is now ready to exit, bye bye...


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/3.1.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.
./discourse-doctor may help diagnose the problem.
f284ba6caaf11348ebfe7cf15303e238b24049ee37f12ef3eda4cc38e7b8e351
==================== END REBUILD LOG ====================
Failed to rebuild app.

Checking your domain name . . .

Connection to community.museomix.org succeeded.
You should probably remove any non-standard plugins and rebuild.
Attempting to restart existing container. . .
x86_64 arch detected.

starting up existing container
+ /usr/bin/docker start app
Error response from daemon: driver failed programming external connectivity on endpoint app (1eb09dca2e0d180222adb2130609d364a687eb4bac6a9ff929cd7469253e89f2): Error starting userland proxy: listen tcp4 0.0.0.0:443: listen: address already in use
Error: failed to start containers: app
Failed to restart the container.


==================== PLUGINS ====================
          - git clone https://github.com/discourse/docker_manager.git

No non-official plugins detected.

See https://github.com/discourse/discourse/blob/main/lib/plugin/metadata.rb for the official list.

========================================
Discourse version at community.museomix.org: NOT FOUND
Discourse version at localhost: NOT FOUND


==================== MEMORY INFORMATION ====================
RAM (MB): 2099

               total        used        free      shared  buff/cache   available
Mem:            2001         155         476           0        1369        1680
Swap:           1023          53         970

==================== DISK SPACE CHECK ====================
---------- OS Disk Space ----------
Filesystem                 Size  Used Avail Use% Mounted on
/dev/disk/by-label/DOROOT   50G   25G   23G  53% /

==================== DISK INFORMATION ====================
Disk /dev/vda: 50 GiB, 53687091200 bytes, 104857600 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disklabel type: gpt
Disk identifier: 29B528BA-16C4-402E-BEE9-53555C8B6F10

Device     Start       End   Sectors Size Type
/dev/vda1   2048 104855551 104853504  50G Linux filesystem

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

==================== MAIL TEST ====================
For a robust test, get an address from http://www.mail-tester.com/
Or just send a test message to yourself.
Mail test skipped.
Replacing: SMTP_PASSWORD
Replacing: LETSENCRYPT_ACCOUNT_EMAIL
Replacing: DEVELOPER_EMAILS
Replacing: DISCOURSE_DB_PASSWORD
Replacing: Sending mail to

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

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

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

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

This looks like the issue. I can’t imagine the cause.

1 Like

Me too :frowning: OS is up-to-date, Discourse also

You are running Discourse on a end of life Ubuntu version. You need to move to an up to date Linux install. That kernel version is way too old.

I’m on Ubuntu 22.04 LTS :slight_smile: so not really end-of-life version :wink: but it seems I have a 3.x kernel

Ubuntu 22.04 was launched with Kernel 5.15, so I’d suspect a very nonstandard install / upgrade was in place to get into this state.

3 Likes

I’m trying to switch to a kernel at least more recent than 5.15, but aufs is no longer supported so I’m switching to overlay2

1 Like

I would recommend that you just spin up a new server rather than muck with the overlays.

1 Like

Do I need to only retrieve my last Discourse backup from the current server ? (I don’t want to lose some data)

The backup and the plugin list from your app.yml is all you need. If it’s a really old installation, I’d recommend that you run discourse-setup and then copy over the plugins.

1 Like

no specific plugins on this installation (was on last minor version I guess, I update on a regular basis).

Thanks @pfaffman and @Falco

1 Like

I was finally able to:

  • update OS and kernel to recent versions
  • rebuild Discourse (enabling SSL in app.yml)
  • switch to overlay instead of aufs (without losing data)

So https://community.museomix.org/ is back online.

(I avoid for some time to move to another droplet).

Thanks to Discourse community, I do no post often here, but you are fast to answer and help :heart:

4 Likes

Ugh. This is happening to me right now too. I am on

Welcome to Ubuntu 14.04.5 LTS (GNU/Linux 3.13.0-37-generic x86_64)

System information as of Wed Jan 18 08:37:37 EST 2023

System load: 0.0 Memory usage: 5% Processes: 54
Usage of /: 69.8% of 29.40GB Swap usage: 0% Users logged in: 0

Graph this data and manage this system at:
https://landscape.canonical.com/

New release ‘16.04.7 LTS’ available.
Run ‘do-release-upgrade’ to upgrade to it.

Would running that last line solve my problem for the moment, to get the site back up quickly, or should I skip that and do the new server setup as recommended here?

Make a backup of your discourse data before :slight_smile:

1 Like

Thanks! That’s the plan. :slight_smile:

1 Like

FWIW, I think I’d go for the fresh droplet and a restore option as I think that would be less prone to snags cropping up.

5 Likes

do-release-upgrade is going to take some time (depending on network and disk speed) and might even pause to ask you questions. And you’ll probably need to run it more than once, in your case, as you are so far behind. There’s a good chance that a fresh install will take less time.

But yes, do keep backups! And if you can, build your new server and get it working before you decommission the old.

3 Likes

I’ve updated now to 16.04.7 LTS and am now getting what appears to be a different error. I’ve tried running ./launcher rebuild app a few times. Any suggestions? Now combing through the log…

Pups::ExecError: cd /var/www/discourse && git fetch --depth 1 origin tests-passed failed with return #<Process::Status: pid 140 exit 128>
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", "[ ! -d public/plugins ] || find public/plugins/ -maxdepth 1 -xtype l -delete"]}
bootstrap failed with exit code 128
** 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.
7dd6293725af53fa4ac153d55183fb71c5ef5264b74d8d2267a653225a439127

I’d echo @JammyDodger on using Move your Discourse Instance to a Different Server to update to a recent Debian / Ubuntu droplet.

Otherwise you need to run the super-long do-release-upgrade 5 times just to get to latest. Not worth it.

5 Likes

Ugh this is really bad it should warn you before hand my site is down and I can’t get it back up right now.

Is there a way to tell launcher rebuild to use an old copy?

1 Like