Build failed for specific commit hash

I need to build Discourse against specific commit “dc5b37c01131bfc42eb666ec2bc779433df309cb” but if fail.

# ./launcher rebuild app
Device "docker0" does not exist.
x86_64 arch detected.
WARNING: containers/app.yml file is world-readable. You can secure this file by running: chmod o-rwx containers/app.yml
Ensuring launcher is up to date
Launcher is up-to-date
Stopping old container
+ /usr/bin/docker stop -t 60 app
app
2.0.20230313-1023: Pulling from discourse/base
Digest: sha256:f7467469ab9e39c3548d4478e3f416c05b34a0ee58eb6e40b963e562005669cc
Status: Image is up to date for discourse/base:2.0.20230313-1023
docker.io/discourse/base:2.0.20230313-1023
/usr/local/lib/ruby/gems/3.2.0/gems/pups-1.1.1/lib/pups.rb
/usr/local/bin/pups --stdin
I, [2023-04-05T15:11:07.535403 #1]  INFO -- : Reading from stdin
I, [2023-04-05T15:11:07.537775 #1]  INFO -- : > locale-gen $LANG && update-locale
I, [2023-04-05T15:11:07.572821 #1]  INFO -- : Generating locales (this might take a while)...
Generation complete.

I, [2023-04-05T15:11:07.572972 #1]  INFO -- : > mkdir -p /shared/postgres_run
I, [2023-04-05T15:11:07.574699 #1]  INFO -- : 
I, [2023-04-05T15:11:07.574816 #1]  INFO -- : > chown postgres:postgres /shared/postgres_run
I, [2023-04-05T15:11:07.576296 #1]  INFO -- : 
I, [2023-04-05T15:11:07.576405 #1]  INFO -- : > chmod 775 /shared/postgres_run
I, [2023-04-05T15:11:07.577600 #1]  INFO -- : 
I, [2023-04-05T15:11:07.577742 #1]  INFO -- : > rm -fr /var/run/postgresql
I, [2023-04-05T15:11:07.579598 #1]  INFO -- : 
I, [2023-04-05T15:11:07.579717 #1]  INFO -- : > ln -s /shared/postgres_run /var/run/postgresql
I, [2023-04-05T15:11:07.581535 #1]  INFO -- : 
I, [2023-04-05T15:11:07.581607 #1]  INFO -- : > socat /dev/null UNIX-CONNECT:/shared/postgres_run/.s.PGSQL.5432 || exit 0 && echo postgres already running stop container ; exit 1
2023/04/05 15:11:07 socat[19] E connect(6, AF=1 "/shared/postgres_run/.s.PGSQL.5432", 36): No such file or directory
I, [2023-04-05T15:11:07.599263 #1]  INFO -- : 
I, [2023-04-05T15:11:07.599391 #1]  INFO -- : > rm -fr /shared/postgres_run/.s*
I, [2023-04-05T15:11:07.601296 #1]  INFO -- : 
I, [2023-04-05T15:11:07.601464 #1]  INFO -- : > rm -fr /shared/postgres_run/*.pid
I, [2023-04-05T15:11:07.603233 #1]  INFO -- : 
I, [2023-04-05T15:11:07.603317 #1]  INFO -- : > mkdir -p /shared/postgres_run/13-main.pg_stat_tmp
I, [2023-04-05T15:11:07.604655 #1]  INFO -- : 
I, [2023-04-05T15:11:07.604738 #1]  INFO -- : > chown postgres:postgres /shared/postgres_run/13-main.pg_stat_tmp
I, [2023-04-05T15:11:07.606021 #1]  INFO -- : 
I, [2023-04-05T15:11:07.608870 #1]  INFO -- : File > /etc/service/postgres/run  chmod: +x  chown: 
I, [2023-04-05T15:11:07.611356 #1]  INFO -- : File > /etc/service/postgres/log/run  chmod: +x  chown: 
I, [2023-04-05T15:11:07.614115 #1]  INFO -- : File > /etc/runit/3.d/99-postgres  chmod: +x  chown: 
I, [2023-04-05T15:11:07.616574 #1]  INFO -- : File > /root/upgrade_postgres  chmod: +x  chown: 
I, [2023-04-05T15:11:07.616711 #1]  INFO -- : > chown -R root /var/lib/postgresql/13/main
I, [2023-04-05T15:11:08.725425 #1]  INFO -- : 
I, [2023-04-05T15:11:08.725588 #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-04-05T15:11:08.727170 #1]  INFO -- : 
I, [2023-04-05T15:11:08.727201 #1]  INFO -- : > chown -R postgres:postgres /shared/postgres_data
I, [2023-04-05T15:11:08.738009 #1]  INFO -- : 
I, [2023-04-05T15:11:08.738126 #1]  INFO -- : > chown -R postgres:postgres /var/run/postgresql
I, [2023-04-05T15:11:08.739967 #1]  INFO -- : 
I, [2023-04-05T15:11:08.740125 #1]  INFO -- : > /root/upgrade_postgres
I, [2023-04-05T15:11:08.743817 #1]  INFO -- : 
I, [2023-04-05T15:11:08.743941 #1]  INFO -- : > rm /root/upgrade_postgres
I, [2023-04-05T15:11:08.745191 #1]  INFO -- : 
I, [2023-04-05T15:11:08.746217 #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-04-05T15:11:08.746641 #1]  INFO -- : Replacing (?-mix:#?listen_addresses *=.*) with listen_addresses = '*' in /etc/postgresql/13/main/postgresql.conf
I, [2023-04-05T15:11:08.747008 #1]  INFO -- : Replacing (?-mix:#?synchronous_commit *=.*) with synchronous_commit = $db_synchronous_commit in /etc/postgresql/13/main/postgresql.conf
I, [2023-04-05T15:11:08.747165 #1]  INFO -- : Replacing (?-mix:#?shared_buffers *=.*) with shared_buffers = $db_shared_buffers in /etc/postgresql/13/main/postgresql.conf
I, [2023-04-05T15:11:08.747294 #1]  INFO -- : Replacing (?-mix:#?work_mem *=.*) with work_mem = $db_work_mem in /etc/postgresql/13/main/postgresql.conf
I, [2023-04-05T15:11:08.747425 #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-04-05T15:11:08.747548 #1]  INFO -- : > install -d -m 0755 -o postgres -g postgres /shared/postgres_backup
I, [2023-04-05T15:11:08.750851 #1]  INFO -- : 
I, [2023-04-05T15:11:08.751034 #1]  INFO -- : Replacing (?-mix:#?checkpoint_segments *=.*) with checkpoint_segments = $db_checkpoint_segments in /etc/postgresql/13/main/postgresql.conf
I, [2023-04-05T15:11:08.751277 #1]  INFO -- : Replacing (?-mix:#?logging_collector *=.*) with logging_collector = $db_logging_collector in /etc/postgresql/13/main/postgresql.conf
I, [2023-04-05T15:11:08.751672 #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-04-05T15:11:08.752098 #1]  INFO -- : Replacing (?-mix:^#local +replication +postgres +peer$) with local replication postgres  peer in /etc/postgresql/13/main/pg_hba.conf
I, [2023-04-05T15:11:08.752249 #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-04-05T15:11:08.752356 #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-04-05T15:11:08.752459 #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-04-05T15:11:08.753675 #1]  INFO -- : > sleep 5
2023-04-05 15:11:08.866 UTC [42] LOG:  starting PostgreSQL 13.10 (Debian 13.10-1.pgdg110+1) on x86_64-pc-linux-gnu, compiled by gcc (Debian 10.2.1-6) 10.2.1 20210110, 64-bit
2023-04-05 15:11:08.866 UTC [42] LOG:  listening on IPv4 address "0.0.0.0", port 5432
2023-04-05 15:11:08.866 UTC [42] LOG:  listening on IPv6 address "::", port 5432
2023-04-05 15:11:08.868 UTC [42] LOG:  listening on Unix socket "/var/run/postgresql/.s.PGSQL.5432"
2023-04-05 15:11:08.873 UTC [45] LOG:  database system was shut down at 2023-04-05 06:16:39 UTC
2023-04-05 15:11:08.883 UTC [42] LOG:  database system is ready to accept connections
I, [2023-04-05T15:11:13.755663 #1]  INFO -- : 
I, [2023-04-05T15:11:13.756280 #1]  INFO -- : > su postgres -c 'createdb discourse' || true
2023-04-05 15:11:13.829 UTC [55] postgres@postgres ERROR:  database "discourse" already exists
2023-04-05 15:11:13.829 UTC [55] postgres@postgres STATEMENT:  CREATE DATABASE discourse;
createdb: error: database creation failed: ERROR:  database "discourse" already exists
I, [2023-04-05T15:11:13.830921 #1]  INFO -- : 
I, [2023-04-05T15:11:13.831090 #1]  INFO -- : > su postgres -c 'psql discourse -c "create user discourse;"' || true
2023-04-05 15:11:13.871 UTC [59] postgres@discourse ERROR:  role "discourse" already exists
2023-04-05 15:11:13.871 UTC [59] postgres@discourse STATEMENT:  create user discourse;
ERROR:  role "discourse" already exists
I, [2023-04-05T15:11:13.873063 #1]  INFO -- : 
I, [2023-04-05T15:11:13.873258 #1]  INFO -- : > su postgres -c 'psql discourse -c "grant all privileges on database discourse to discourse;"' || true
I, [2023-04-05T15:11:13.902751 #1]  INFO -- : GRANT

I, [2023-04-05T15:11:13.902932 #1]  INFO -- : > su postgres -c 'psql discourse -c "alter schema public owner to discourse;"'
I, [2023-04-05T15:11:13.933017 #1]  INFO -- : ALTER SCHEMA

I, [2023-04-05T15:11:13.933227 #1]  INFO -- : > su postgres -c 'psql template1 -c "create extension if not exists hstore;"'
NOTICE:  extension "hstore" already exists, skipping
I, [2023-04-05T15:11:13.969476 #1]  INFO -- : CREATE EXTENSION

I, [2023-04-05T15:11:13.969619 #1]  INFO -- : > su postgres -c 'psql template1 -c "create extension if not exists pg_trgm;"'
NOTICE:  extension "pg_trgm" already exists, skipping
I, [2023-04-05T15:11:14.001740 #1]  INFO -- : CREATE EXTENSION

I, [2023-04-05T15:11:14.001885 #1]  INFO -- : > su postgres -c 'psql discourse -c "create extension if not exists hstore;"'
NOTICE:  extension "hstore" already exists, skipping
I, [2023-04-05T15:11:14.031644 #1]  INFO -- : CREATE EXTENSION

I, [2023-04-05T15:11:14.031827 #1]  INFO -- : > su postgres -c 'psql discourse -c "create extension if not exists pg_trgm;"'
NOTICE:  extension "pg_trgm" already exists, skipping
I, [2023-04-05T15:11:14.062186 #1]  INFO -- : CREATE EXTENSION

I, [2023-04-05T15:11:14.062353 #1]  INFO -- : > sudo -u postgres psql discourse
I, [2023-04-05T15:11:14.064363 #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-04-05T15:11:14.111348 #1]  INFO -- : File > /var/lib/postgresql/take-database-backup  chmod: +x  chown: postgres:postgres
I, [2023-04-05T15:11:14.113559 #1]  INFO -- : File > /var/spool/cron/crontabs/postgres  chmod:   chown: 
I, [2023-04-05T15:11:14.113612 #1]  INFO -- : > echo postgres installed!
I, [2023-04-05T15:11:14.114734 #1]  INFO -- : postgres installed!

I, [2023-04-05T15:11:14.117530 #1]  INFO -- : File > /etc/service/redis/run  chmod: +x  chown: 
I, [2023-04-05T15:11:14.120181 #1]  INFO -- : File > /etc/service/redis/log/run  chmod: +x  chown: 
I, [2023-04-05T15:11:14.122880 #1]  INFO -- : File > /etc/runit/3.d/10-redis  chmod: +x  chown: 
I, [2023-04-05T15:11:14.123505 #1]  INFO -- : Replacing daemonize yes with  in /etc/redis/redis.conf
I, [2023-04-05T15:11:14.124199 #1]  INFO -- : Replacing (?-mix:^pidfile.*$) with  in /etc/redis/redis.conf
I, [2023-04-05T15:11:14.124445 #1]  INFO -- : > install -d -m 0755 -o redis -g redis /shared/redis_data
I, [2023-04-05T15:11:14.126384 #1]  INFO -- : 
I, [2023-04-05T15:11:14.126590 #1]  INFO -- : Replacing (?-mix:^logfile.*$) with logfile "" in /etc/redis/redis.conf
I, [2023-04-05T15:11:14.127138 #1]  INFO -- : Replacing (?-mix:^bind .*$) with  in /etc/redis/redis.conf
I, [2023-04-05T15:11:14.127515 #1]  INFO -- : Replacing (?-mix:^dir .*$) with dir /shared/redis_data in /etc/redis/redis.conf
I, [2023-04-05T15:11:14.127883 #1]  INFO -- : Replacing (?-mix:^protected-mode yes) with protected-mode no in /etc/redis/redis.conf
I, [2023-04-05T15:11:14.128139 #1]  INFO -- : Replacing # io-threads 4 with io-threads $redis_io_threads in /etc/redis/redis.conf
I, [2023-04-05T15:11:14.128483 #1]  INFO -- : > echo redis installed
I, [2023-04-05T15:11:14.130199 #1]  INFO -- : redis installed

I, [2023-04-05T15:11:14.130276 #1]  INFO -- : > cat /etc/redis/redis.conf | grep logfile
I, [2023-04-05T15:11:14.134491 #1]  INFO -- : logfile ""

I, [2023-04-05T15:11:14.134662 #1]  INFO -- : > exec chpst -u redis -U redis /usr/bin/redis-server /etc/redis/redis.conf
I, [2023-04-05T15:11:14.135963 #1]  INFO -- : > sleep 10
103:C 05 Apr 2023 15:11:14.149 # oO0OoO0OoO0Oo Redis is starting oO0OoO0OoO0Oo
103:C 05 Apr 2023 15:11:14.149 # Redis version=7.0.7, bits=64, commit=00000000, modified=0, pid=103, just started
103:C 05 Apr 2023 15:11:14.149 # Configuration loaded
103:M 05 Apr 2023 15:11:14.149 * monotonic clock: POSIX clock_gettime
103:M 05 Apr 2023 15:11:14.151 * Running mode=standalone, port=6379.
103:M 05 Apr 2023 15:11:14.151 # Server initialized
103:M 05 Apr 2023 15:11:14.151 # 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 05 Apr 2023 15:11:14.152 * Loading RDB produced by version 7.0.7
103:M 05 Apr 2023 15:11:14.152 * RDB age 32075 seconds
103:M 05 Apr 2023 15:11:14.152 * RDB memory usage when created 0.82 Mb
103:M 05 Apr 2023 15:11:14.152 * Done loading RDB, keys loaded: 0, keys expired: 0.
103:M 05 Apr 2023 15:11:14.152 * DB loaded from disk: 0.000 seconds
103:M 05 Apr 2023 15:11:14.152 * Ready to accept connections
I, [2023-04-05T15:11:24.137467 #1]  INFO -- : 
I, [2023-04-05T15:11:24.137853 #1]  INFO -- : > thpoff echo "thpoff is installed!"
I, [2023-04-05T15:11:24.149387 #1]  INFO -- : thpoff is installed!

I, [2023-04-05T15:11:24.149681 #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-04-05T15:11:24.200993 #1]  INFO -- : 
I, [2023-04-05T15:11:24.201152 #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-04-05T15:11:24.243718 #1]  INFO -- : 
I, [2023-04-05T15:11:24.243859 #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-04-05T15:11:24.281161 #1]  INFO -- : 
I, [2023-04-05T15:11:24.281311 #1]  INFO -- : > rm -f /etc/cron.d/anacron
I, [2023-04-05T15:11:24.288045 #1]  INFO -- : 
I, [2023-04-05T15:11:24.289881 #1]  INFO -- : File > /etc/cron.d/anacron  chmod:   chown: 
I, [2023-04-05T15:11:24.293565 #1]  INFO -- : File > /etc/runit/1.d/copy-env  chmod: +x  chown: 
I, [2023-04-05T15:11:24.296532 #1]  INFO -- : File > /etc/service/unicorn/run  chmod: +x  chown: 
I, [2023-04-05T15:11:24.299442 #1]  INFO -- : File > /etc/service/nginx/run  chmod: +x  chown: 
I, [2023-04-05T15:11:24.301992 #1]  INFO -- : File > /etc/runit/3.d/01-nginx  chmod: +x  chown: 
I, [2023-04-05T15:11:24.305284 #1]  INFO -- : File > /etc/runit/3.d/02-unicorn  chmod: +x  chown: 
I, [2023-04-05T15:11:24.305369 #1]  INFO -- : Replacing # postgres with sv start postgres || exit 1 in /etc/service/unicorn/run
I, [2023-04-05T15:11:24.305639 #1]  INFO -- : > exec chpst -u redis -U redis /usr/bin/redis-server /etc/redis/redis.conf
I, [2023-04-05T15:11:24.307095 #1]  INFO -- : > cd /var/www/discourse && sudo -H -E -u discourse git reset --hard
130:C 05 Apr 2023 15:11:24.310 # oO0OoO0OoO0Oo Redis is starting oO0OoO0OoO0Oo
130:C 05 Apr 2023 15:11:24.310 # Redis version=7.0.7, bits=64, commit=00000000, modified=0, pid=130, just started
130:C 05 Apr 2023 15:11:24.310 # Configuration loaded
130:M 05 Apr 2023 15:11:24.310 * monotonic clock: POSIX clock_gettime
130:M 05 Apr 2023 15:11:24.310 # Warning: Could not create server TCP listening socket *:6379: bind: Address already in use
130:M 05 Apr 2023 15:11:24.310 # Failed listening on port 6379 (TCP), aborting.
Updating files: 100% (32972/32972), done.
I, [2023-04-05T15:11:26.455124 #1]  INFO -- : HEAD is now at 59e548540 Build(deps): Bump sass from 1.58.3 to 1.59.2 in /app/assets/javascripts (#20656)

I, [2023-04-05T15:11:26.455203 #1]  INFO -- : > cd /var/www/discourse && sudo -H -E -u discourse git clean -f
I, [2023-04-05T15:11:26.537625 #1]  INFO -- : 
I, [2023-04-05T15:11:26.537707 #1]  INFO -- : > cd /var/www/discourse && sudo -H -E -u discourse bash -c '
  if [ $(git rev-parse --is-shallow-repository) == "true" ]; then
      git remote set-branches --add origin main
      git remote set-branches origin dc5b37c01131bfc42eb666ec2bc779433df309cb
      git fetch --depth 1 origin dc5b37c01131bfc42eb666ec2bc779433df309cb
  else
      git fetch --prune --prune-tags origin dc5b37c01131bfc42eb666ec2bc779433df309cb
  fi
'
fatal: remote error: upload-pack: not our ref dc5b37c01131bfc42eb666ec2bc779433df309cb
I, [2023-04-05T15:11:28.603419 #1]  INFO -- : 
I, [2023-04-05T15:11:28.604132 #1]  INFO -- : Terminating async processes
I, [2023-04-05T15:11:28.604192 #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: 42
2023-04-05 15:11:28.604 UTC [42] LOG:  received fast shutdown request
I, [2023-04-05T15:11:28.604310 #1]  INFO -- : Sending TERM to exec chpst -u redis -U redis /usr/bin/redis-server /etc/redis/redis.conf pid: 103
103:signal-handler (1680707488) Received SIGTERM scheduling shutdown...
2023-04-05 15:11:28.610 UTC [42] LOG:  aborting any active transactions
2023-04-05 15:11:28.613 UTC [42] LOG:  background worker "logical replication launcher" (PID 51) exited with exit code 1
2023-04-05 15:11:28.614 UTC [46] LOG:  shutting down
2023-04-05 15:11:28.653 UTC [42] LOG:  database system is shut down
103:M 05 Apr 2023 15:11:28.692 # User requested shutdown...
103:M 05 Apr 2023 15:11:28.692 * Saving the final RDB snapshot before exiting.
103:M 05 Apr 2023 15:11:28.695 * DB saved on disk
103:M 05 Apr 2023 15:11:28.695 # Redis is now ready to exit, bye bye...


FAILED
--------------------
Pups::ExecError: cd /var/www/discourse && sudo -H -E -u discourse bash -c '
  if [ $(git rev-parse --is-shallow-repository) == "true" ]; then
      git remote set-branches --add origin main
      git remote set-branches origin dc5b37c01131bfc42eb666ec2bc779433df309cb
      git fetch --depth 1 origin dc5b37c01131bfc42eb666ec2bc779433df309cb
  else
      git fetch --prune --prune-tags origin dc5b37c01131bfc42eb666ec2bc779433df309cb
  fi
' failed with return #<Process::Status: pid 138 exit 128>
Location of failure: /usr/local/lib/ruby/gems/3.2.0/gems/pups-1.1.1/lib/pups/exec_command.rb:117:in `spawn'
exec failed with the params {"cd"=>"$home", "hook"=>"code", "cmd"=>["sudo -H -E -u discourse git reset --hard", "sudo -H -E -u discourse git clean -f", "sudo -H -E -u discourse bash -c '\n  if [ $(git rev-parse --is-shallow-repository) == \"true\" ]; then\n      git remote set-branches --add origin main\n      git remote set-branches origin $version\n      git fetch --depth 1 origin $version\n  else\n      git fetch --prune --prune-tags origin $version\n  fi\n'", "sudo -H -E -u discourse bash -c '\n  if [[ $(git symbolic-ref --short HEAD) == $version ]] ; then\n      git pull\n  else\n      git -c advice.detachedHead=false checkout $version\n  fi\n'", "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.
2b9af6c1f823c44dc011edda5c4aa2512a29545fecf926eb47e6dbcb078ab79b

Are you sure that’s the right commit?

https://github.com/discourse/discourse/commit/dc5b37c01131bfc42eb666ec2bc779433df309cb is a 404

1 Like

That’s a discourse_docker commit. Fix checksums · discourse/discourse_docker@dc5b37c · GitHub

You need to pin on a discourse/discourse commit.

1 Like

And perhaps also a compatible discourse_docker commit as whatever Discourse you want might not be compatible with the current Discourse base image.

It’s a bit confusing that discourse_docker gets installed in /var/discourse.

2 Likes

I set the version in container/app.yml and also checked out that commit

params:
    version: 'dc5b37c01131bfc42eb666ec2bc779433df309cb'

What else I should do?

Put the discourse commit in your yml file where you put the discourse_docker commit and, I guess, check out that commit in /var/discourse/ before you rebuild.

But it seems like you don’t know what Discourse commit you want, only what discourse_docker commit you want. If you’re trying to match a running site, you can view source and look at the meta tag for the Discourse commit.

Change it for a commit that exists? https://github.com/discourse/discourse/commit/dc5b37c01131bfc42eb666ec2bc779433df309cb is a 404.

2 Likes

I set a correct commit hash and now it again fail:

I, [2023-04-10T08:33:27.495565 #1]  INFO -- : > cd /var/www/discourse && gem install bundler --conservative -v $(awk '/BUNDLED WITH/ { getline; gsub(/ /,""); print $0 }' Gemfile.lock)
ERROR:  Could not find a valid gem 'bundler' (= 2.3.4), here is why:
          Unable to download data from https://rubygems.org/ - Net::OpenTimeout: Failed to open TCP connection to rubygems.org:443 (execution expired) (https://rubygems.org/specs.4.8.gz)

But I can curl rubygems.org from host fine.

The problem is with ipv6 for Ruby gems and Yarn websites and the solution is to lower ipv6 priority in /etc/gai.conf:

precedence ::1/128 50
precedence ::/0 40
precedence 2002::/16 30
precedence ::/96 20
precedence ::ffff:0:0/96 10
precedence 2a04:4e42::0/32 5
precedence 2606:4700::0/32 5
2 Likes

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.