재빌드 실패: "extconf 실패, 종료 코드 1" -- 오래된 Docker 때문인가요?

재빌드(fail)가 실패하고 있는데, 이 문제 때문인 것 같습니다. 현재 Ubuntu 16.04와 Docker version 17.05.0-ce, build 89658be를 사용하고 있으며, 이 환경이 의심스럽다는 것은 알고 있지만, 만약 가능하다면 해당 사용자에게 한 번 더 재빌드를 시도해 보고 싶었습니다.

I, [2023-12-06T16:10:12.656984 #1]  INFO -- : > cd /var/www/discourse && su discourse -c 'bundle install --retry 3 --jobs 4'
Gem::Ext::BuildError: ERROR: Failed to build gem native extension.

current directory:
/var/www/discourse/vendor/bundle/ruby/3.2.0/gems/rbtrace-0.5.0/ext
/usr/local/bin/ruby extconf.rb
  -- tar zxvfo msgpack-1.1.0.tar.gz
  -- env CFLAGS=nil LDFLAGS=nil CC=nil
-- ./configure --disable-dependency-tracking --disable-shared --with-pic
--prefix=/var/www/discourse/vendor/bundle/ruby/3.2.0/gems/rbtrace-0.5.0/ext/dst/
--libdir=/var/www/discourse/vendor/bundle/ruby/3.2.0/gems/rbtrace-0.5.0/ext/dst/lib
*** extconf.rb failed ***
Could not create Makefile due to some reason, probably lack of necessary
libraries and/or headers.  Check the mkmf.log file for more details.  You may
need configuration options.

Provided configuration options:
        --with-opt-dir
        --without-opt-dir
        --with-opt-include
        --without-opt-include=${opt-dir}/include
        --with-opt-lib
        --without-opt-lib=${opt-dir}/lib
        --with-make-prog
        --without-make-prog
        --srcdir=.
        --curdir
        --ruby=/usr/local/bin/$(RUBY_BASE_NAME)
extconf.rb:6:in `sys': ./configure --disable-dependency-tracking
--disable-shared --with-pic
--prefix=/var/www/discourse/vendor/bundle/ruby/3.2.0/gems/rbtrace-0.5.0/ext/dst/
--libdir=/var/www/discourse/vendor/bundle/ruby/3.2.0/gems/rbtrace-0.5.0/ext/dst/lib
failed, please report to https://github.com/tmm1/rbtrace/issues (RuntimeError)
        from extconf.rb:42:in `block (2 levels) in <main>'
        extconf.rb:34:in `chdir'에서
        extconf.rb:34:in `block in '에서<main>'
        from extconf.rb:30:in `chdir'
        from extconf.rb:30:in `<main>'

이 확장 기능이 컴파일되지 않은 이유를 확인하려면 다음 경로에 있는 mkmf.log 파일을 확인하십시오:

/var/www/discourse/vendor/bundle/ruby/3.2.0/extensions/x86_64-linux/3.2.0/rbtrace-0.5.0/mkmf.log

extconf 실패, 종료 코드 1

root@www:/var/discourse# ./launcher rebuild app
WARNING: Docker 버전 17.05.0-ce는 더 이상 지원되지 않으며, 17.06.2 또는 최신 버전으로 업그레이드하는 것을 권장합니다.
x86_64 아키텍처가 감지되었습니다.
WARNING: containers/app.yml 파일이 모든 사용자에게 읽기 가능합니다. 다음 명령을 실행하여 이 파일을 보호할 수 있습니다: chmod o-rwx containers/app.yml
Launcher가 최신 상태인지 확인 중
Fetching origin
Launcher가 최신 상태입니다
이전 컨테이너 중지 중
+ /usr/bin/docker stop -t 600 app
app
2.0.20231023-1945: discourse/base에서 가져오는 중
Digest: sha256:2b0eb484d20888cc2daadb690dcfa73522105650c1420212e99345a36a424d77
Status: discourse/base:2.0.20231023-1945 이미지가 최신 상태입니다
/usr/local/lib/ruby/gems/3.2.0/gems/pups-1.2.1/lib/pups.rb
/usr/local/bin/pups --stdin
I, [2023-12-06T16:07:07.394158 #1]  INFO -- : stdin에서 읽는 중
I, [2023-12-06T16:07:07.401986 #1]  INFO -- : > locale-gen $LANG && update-locale
I, [2023-12-06T16:07:07.472801 #1]  INFO -- : 로케일 생성 중 (이 과정에는 시간이 걸릴 수 있습니다)...
생성이 완료되었습니다.

I, [2023-12-06T16:07:07.473766 #1]  INFO -- : > mkdir -p /shared/postgres_run
I, [2023-12-06T16:07:07.483448 #1]  INFO -- :
I, [2023-12-06T16:07:07.485286 #1]  INFO -- : > chown postgres:postgres /shared/postgres_run
I, [2023-12-06T16:07:07.492124 #1]  INFO -- :
I, [2023-12-06T16:07:07.493335 #1]  INFO -- : > chmod 775 /shared/postgres_run
I, [2023-12-06T16:07:07.499353 #1]  INFO -- :
I, [2023-12-06T16:07:07.500588 #1]  INFO -- : > rm -fr /var/run/postgresql
I, [2023-12-06T16:07:07.507193 #1]  INFO -- :
I, [2023-12-06T16:07:07.508374 #1]  INFO -- : > ln -s /shared/postgres_run /var/run/postgresql
I, [2023-12-06T16:07:07.514723 #1]  INFO -- :
I, [2023-12-06T16:07:07.516000 #1]  INFO -- : > socat /dev/null UNIX-CONNECT:/shared/postgres_run/.s.PGSQL.5432 || exit 0 && echo postgres already running stop container ; exit 1
2023/12/06 16:07:07 socat[17] E connect(6, AF=1 "/shared/postgres_run/.s.PGSQL.5432", 36): No such file or directory
I, [2023-12-06T16:07:07.543544 #1]  INFO -- :
I, [2023-12-06T16:07:07.544355 #1]  INFO -- : > rm -fr /shared/postgres_run/.s*
I, [2023-12-06T16:07:07.549264 #1]  INFO -- :
I, [2023-12-06T16:07:07.549978 #1]  INFO -- : > rm -fr /shared/postgres_run/*.pid
I, [2023-12-06T16:07:07.554670 #1]  INFO -- :
I, [2023-12-06T16:07:07.555334 #1]  INFO -- : > mkdir -p /shared/postgres_run/13-main.pg_stat_tmp
I, [2023-12-06T16:07:07.559798 #1]  INFO -- :
I, [2023-12-06T16:07:07.560895 #1]  INFO -- : > chown postgres:postgres /shared/postgres_run/13-main.pg_stat_tmp
I, [2023-12-06T16:07:07.565444 #1]  INFO -- :
I, [2023-12-06T16:07:07.575177 #1]  INFO -- : File > /etc/service/postgres/run  chmod: +x  chown:
I, [2023-12-06T16:07:07.583472 #1]  INFO -- : File > /etc/service/postgres/log/run  chmod: +x  chown:
I, [2023-12-06T16:07:07.593556 #1]  INFO -- : File > /etc/runit/3.d/99-postgres  chmod: +x  chown:
I, [2023-12-06T16:07:07.602131 #1]  INFO -- : File > /root/upgrade_postgres  chmod: +x  chown:
I, [2023-12-06T16:07:07.603040 #1]  INFO -- : > chown -R root /var/lib/postgresql/13/main
I, [2023-12-06T16:07:08.001408 #1]  INFO -- :
I, [2023-12-06T16:07:08.002703 #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-12-06T16:07:08.006516 #1]  INFO -- :
I, [2023-12-06T16:07:08.007156 #1]  INFO -- : > chown -R postgres:postgres /shared/postgres_data
I, [2023-12-06T16:07:08.048363 #1]  INFO -- :
I, [2023-12-06T16:07:08.049524 #1]  INFO -- : > chown -R postgres:postgres /var/run/postgresql
I, [2023-12-06T16:07:08.055285 #1]  INFO -- :
I, [2023-12-06T16:07:08.056635 #1]  INFO -- : > /root/upgrade_postgres
I, [2023-12-06T16:07:08.067823 #1]  INFO -- :
I, [2023-12-06T16:07:08.068692 #1]  INFO -- : > rm /root/upgrade_postgres
I, [2023-12-06T16:07:08.074460 #1]  INFO -- :
I, [2023-12-06T16:07:08.077226 #1]  INFO -- : /etc/postgresql/13/main/postgresql.con
f 파일에서 data_directory = '/var/lib/postgresql/13/main'을 data_directory = '/shared/postgres_data'로 대체
I, [2023-12-06T16:07:08.078863 #1]  INFO -- : /etc/postgresql/13/main/postgresql.conf 파일에서 (?-mix:#?listen_addresses *=.*)을 listen_addresses = '*'로 대체
I, [2023-12-06T16:07:08.080089 #1]  INFO -- : /etc/postgresql/13/main/postgresql.conf 파일에서 (?-mix:#?synchronous_commit *=.*)을 synchronous_commit = $db_synchronous_commit로 대체
I, [2023-12-06T16:07:08.081228 #1]  INFO -- : /etc/postgresql/13/main/postgresql.conf 파일에서 (?-mix:#?shared_buffers *=.*)을 shared_buffers = $db_shared_buffers로 대체
I, [2023-12-06T16:07:08.082315 #1]  INFO -- : /etc/postgresql/13/main/postgresql.conf 파일에서 (?-mix:#?work_mem *=.*)을 work_mem = $db_work_mem으로 대체
I, [2023-12-06T16:07:08.083334 #1]  INFO -- : /etc/postgresql/13/mai
n/postgresql.conf 파일에서 (?-mix:#?default_text_search_config *=.*)을 default_text_search_config = '$db_default_text_search_config'로 대체
I, [2023-12-06T16:07:08.084197 #1]  INFO -- : > install -d -m 0755 -o postgres -g postgres /shared/postgres_backup
I, [2023-12-06T16:07:08.093130 #1]  INFO -- :
I, [2023-12-06T16:07:08.094813 #1]  INFO -- : /etc/postgresql/13/main/postgresql.conf 파일에서 (?-mix:#?checkpoint_segments *=.*)을 checkpoint_segments = $db_checkpoint_segments로 대체
I, [2023-12-06T16:07:08.095967 #1]  INFO -- : /etc/postgresql/13/main/postgresql.conf 파일에서 (?-mix:#?logging_collector *=.*)을 logging_collector = $db_logging_collector로 대체
I, [2023-12-06T16:07:08.097082 #1]  INFO -- : /etc/postgresql/13/main/
postgresql.conf 파일에서 (?-mix:#?log_min_duration_statement *=.*)을 log_min_duration_statement = $db_log_min_duration_statement로 대체
I, [2023-12-06T16:07:08.098475 #1]  INFO -- : /etc/postgresql/13/main/pg_hba.conf 파일에서 (?-mix:^#local +replication +postgres +peer$)을 local replication postgres  peer로 대체
I, [2023-12-06T16:07:08.099453 #1]  INFO -- : /etc/postgresql/13/main/pg_hba.conf 파일에서 (?-mix:^host.*all.*all.*127.*$)을 host all all 0.0.0.0/0 md5로 대체
I, [2023-12-06T16:07:08.100346 #1]  INFO -- : /etc/postgresql/13/main/pg_hba.conf 파일에서 (?-mix:^host.*all.*all.*::1\/128.*$)을 host all all ::/0 md5로 대체
I, [2023-12-06T16:07:08.101225 #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/postm
aster -D /etc/postgresql/13/main
I, [2023-12-06T16:07:08.105497 #1]  INFO -- : > sleep 5
2023-12-06 16:07:08.222 UTC [40] LOG:  starting PostgreSQL 13.12 (Debian 13.12-1.pgdg110+1) on x86_64-pc-linux-gnu, compiled by gcc (Debian 10.2.1-6) 10.2.1 20210110, 64-bit
2023-12-06 16:07:08.223 UTC [40] LOG:  listening on IPv4 address "0.0.0.0", port 5432
2023-12-06 16:07:08.224 UTC [40] LOG:  listening on IPv6 address "::", port 5432
2023-12-06 16:07:08.228 UTC [40] LOG:  listening on Unix socket "/var/run/postgresql/.s.PGSQL.5432"
2023-12-06 16:07:08.236 UTC [43] LOG:  database system was shut down at 2023-12-06 16:06:59 UTC
2023-12-06 16:07:08.249 UTC [40] LOG:  database system is ready to accept connections
I, [2023-12-06T16:07:13.114589 #1]  INFO -- :
I, [2023-12-06T16:07:13.114892 #1]  INFO -- : > su postgres -c 'createdb discourse' || true
2023-12-06 16:07:13.233 UTC [53] postgres@postgres ERROR:  database "discourse" already exists
2023-12-06 16:07:13.233 UTC [53] postgres@postgres STATEMENT:  CREATE DATABASE discourse;
createdb: error: database creation failed: ERROR:  database "discourse" already exists
I, [2023-12-06T16:07:13.238163 #1]  INFO -- :
I, [2023-12-06T16:07:13.239077 #1]  INFO -- : > su postgres -c 'psql discourse -c "create user discourse;"' || true
2023-12-06 16:07:13.337 UTC [57] postgres@discourse ERROR:  role "discourse" already exists
2023-12-06 16:07:13.337 UTC [57] postgres@discourse STATEMENT:  create user discourse;
ERROR:  role "discourse" already exists
I, [2023-12-06T16:07:13.341906 #1]  INFO -- :
I, [2023-12-06T16:07:13.342832 #1]  INFO -- : > su postgres -c 'psql discourse -c "grant all privileges on database discourse to discourse;"' || true
I, [2023-12-06T16:07:13.414866 #1]  INFO -- : GRANT

I, [2023-12-06T16:07:13.415706 #1]  INFO -- : > su postgres -c 'psql discourse -c "alter schema public owner to discourse;"'
I, [2023-12-06T16:07:13.488051 #1]  INFO -- : ALTER SCHEMA

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

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

I, [2023-12-06T16:07:13.632670 #1]  INFO -- : > su postgres -c 'psql template1 -c "create extension if not exists vector;"'
NOTICE:  extension "vector" already exists, skipping
I, [2023-12-06T16:07:13.699897 #1]  INFO -- : CREATE EXTENSION

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

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

I, [2023-12-06T16:07:13.837081 #1]  INFO -- : > su postgres -c 'psql discourse -c "create extension if not exists vector;"'
NOTICE:  extension "vector" already exists, skipping
I, [2023-12-06T16:07:13.904254 #1]  INFO -- : CREATE EXTENSION

I, [2023-12-06T16:07:13.905131 #1]  INFO -- : > sudo -u postgres psql discourse
I, [2023-12-06T16:07:13.911512 #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-12-06T16:07:14.017559 #1]  INFO -- : File > /var/lib/postgresql/take-database-backup  chmod: +x  chown: postgres:postgres
I, [2023-12-06T16:07:14.025808 #1]  INFO -- : File > /var/spool/cron/crontabs/postgres  chmod:   chown:
I, [2023-12-06T16:07:14.026677 #1]  INFO -- : > echo postgres installed!
I, [2023-12-06T16:07:14.031148 #1]  INFO -- : postgres installed!

I, [2023-12-06T16:07:14.039613 #1]  INFO -- : File > /etc/service/redis/run  chmod: +x  chown:
I, [2023-12-06T16:07:14.047348 #1]  INFO -- : File > /etc/service/redis/log/run  chmod: +x  chown:
I, [2023-12-06T16:07:14.054663 #1]  INFO -- : File > /etc/runit/3.d/10-redis  chmod: +x  chown:
I, [2023-12-06T16:07:14.056288 #1]  INFO -- : /etc/redis/redis.conf 파일에서 daemonize yes을(를) (빈 값)으로 대체
I, [2023-12-06T16:07:14.058359 #1]  INFO -- : /etc/redis/redis.conf 파일에서 (?-mix:^pidfile.*$)을(를) (빈 값)으로 대체
I, [2023-12-06T16:07:14.059363 #1]  INFO -- : > install -d -m 0755 -o redis -g redis /shared/redis_data
I, [2023-12-06T16:07:14.063988 #1]  INFO -- :
I, [2023-12-06T16:07:14.065261 #1]  INFO -- : /etc/redis/redis.conf 파일에서 (?-mix:^logfile.*$)을(를) logfile ""로 대체
I, [2023-12-06T16:07:14.066441 #1]  INFO -- : /etc/redis/redis.conf 파일에서 (?-mix:^bind .*$)을(를) (빈 값)으로 대체
I, [2023-12-06T16:07:14.068176 #1]  INFO -- : /etc/redis/redis.conf 파일에서 (?-mix:^dir .*$)을(를) dir /shared/redis_data로 대체
I, [2023-12-06T16:07:14.069623 #1]  INFO -- : /etc/redis/redis.conf 파일에서 (?-mix:^protected-mode yes)을(를) protected-mode no로 대체
I, [2023-12-06T16:07:14.072095 #1]  INFO -- : /etc/redis/redis.conf 파일에서 # io-threads 4을(를) io-threads $redis_io_threads로 대체
I, [2023-12-06T16:07:14.073689 #1]  INFO -- : > echo redis installed
I, [2023-12-06T16:07:14.079558 #1]  INFO -- : redis installed

I, [2023-12-06T16:07:14.080851 #1]  INFO -- : > cat /etc/redis/redis.conf | grep logfile
I, [2023-12-06T16:07:14.092037 #1]  INFO -- : logfile ""

I, [2023-12-06T16:07:14.092862 #1]  INFO -- : > exec chpst -u redis -U redis /usr/bin/redis-server /etc/redis/redis.conf
I, [2023-12-06T16:07:14.095644 #1]  INFO -- : > sleep 10
109:C 06 Dec 2023 16:07:14.118 # oO0OoO0OoO0Oo Redis is starting oO0OoO0OoO0Oo
109:C 06 Dec 2023 16:07:14.119 # Redis version=7.0.7, bits=64, commit=00000000, modified=0, pid=109, just started
109:C 06 Dec 2023 16:07:14.119 # Configuration loaded
109:M 06 Dec 2023 16:07:14.120 * monotonic clock: POSIX clock_gettime
109:M 06 Dec 2023 16:07:14.123 * Running mode=standalone, port=6379.
109:M 06 Dec 2023 16:07:14.123 # WARNING: The TCP backlog setting of 511 cannot be enforced because /proc/sys/net/core/somaxconn is set to the lower value of 128.
109:M 06 Dec 2023 16:07:14.123 # Server initialized
109:M 06 Dec 2023 16:07:14.124 * Loading RDB produced by version 7.0.7
109:M 06 Dec 2023 16:07:14.125 * RDB age 17 seconds
109:M 06 Dec 2023 16:07:14.125 * RDB memory usage when created 16.66 Mb
109:M 06 Dec 2023 16:07:14.212 * Done loading RDB, keys loaded: 24735, keys expired: 2.
109:M 06 Dec 2023 16:07:14.212 * DB loaded from disk: 0.088 seconds
109:M 06 Dec 2023 16:07:14.212 * Ready to accept connections
I, [2023-12-06T16:07:24.102624 #1]  INFO -- :
I, [2023-12-06T16:07:24.103423 #1]  INFO -- : > thpoff echo "thpoff is installed!"
I, [2023-12-06T16:07:24.111028 #1]  INFO -- : thpoff is installed!

I, [2023-12-06T16:07:24.111792 #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-12-06T16:07:24.220317 #1]  INFO -- :
I, [2023-12-06T16:07:24.221265 #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-12-06T16:07:24.335260 #1]  INFO -- :
I, [2023-12-06T16:07:24.336566 #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-12-06T16:07:24.447936 #1]  INFO -- :
I, [2023-12-06T16:07:24.448990 #1]  INFO -- : > rm -f /etc/cron.d/anacron
I, [2023-12-06T16:07:24.456613 #1]  INFO -- :
I, [2023-12-06T16:07:24.462541 #1]  INFO -- : File > /etc/cron.d/anacron  chmod:   chown:
I, [2023-12-06T16:07:24.472173 #1]  INFO -- : File > /etc/runit/1.d/copy-env  chmod: +x  chown:
I, [2023-12-06T16:07:24.483793 #1]  INFO -- : File > /etc/service/unicorn/run  chmod: +x  chown:
I, [2023-12-06T16:07:24.493548 #1]  INFO -- : File > /etc/service/nginx/run  chmod: +x  chown:
I, [2023-12-06T16:07:24.503794 #1]  INFO -- : File > /etc/runit/3.d/01-nginx  chmod: +x  chown:
I, [2023-12-06T16:07:24.511755 #1]  INFO -- : File > /etc/runit/3.d/02-unicorn  chmod: +x  chown:
I, [2023-12-06T16:07:24.512437 #1]  INFO -- : /etc/service/unicorn/run 파일에서 # postgres을(를) sv start postgres || exit 1로 대체
I, [2023-12-06T16:07:24.513223 #1]  INFO -- : > exec chpst -u redis -U redis /usr/bin/redis-server /etc/redis/redis.conf
I, [2023-12-06T16:07:24.517456 #1]  INFO -- : > cd /var/www/discourse && sudo -H -E -u discourse git reset --hard
137:C 06 Dec 2023 16:07:24.534 # oO0OoO0OoO0Oo Redis is starting oO0OoO0OoO0Oo
137:C 06 Dec 2023 16:07:24.534 # Redis version=7.0.7, bits=64, commit=00000000, modified=0, pid=137, just started
137:C 06 Dec 2023 16:07:24.534 # Configuration loaded
137:M 06 Dec 2023 16:07:24.535 * monotonic clock: POSIX clock_gettime
137:M 06 Dec 2023 16:07:24.536 # Warning: Could not create server TCP listening socket *:6379: bind: Address already in use
137:M 06 Dec 2023 16:07:24.536 # Failed listening on port 6379 (TCP), aborting.
Updating files: 100% (33858/33858), done.
I, [2023-12-06T16:07:29.876110 #1]  INFO -- : HEAD is now at 043b4a418 FIX: replaces data-tooltip usage by <DTooltip /> (#24062)

I, [2023-12-06T16:07:29.876964 #1]  INFO -- : > cd /var/www/discourse && sudo -H -E -u discourse git clean -f
I, [2023-12-06T16:07:30.100602 #1]  INFO -- :
I, [2023-12-06T16:07:30.101495 #1]  INFO -- : > cd /var/www/discourse && sudo -H -E -u discourse bash -c '
  set -o errexit
  if [ $(git rev-parse --is-shallow-repository) == "true" ]; then
      git remote set-branches --add origin main
      git remote set-branches origin tests-passed
      git fetch --depth 1 origin tests-passed
  else
      git fetch --tags --prune-tags --prune --force origin
  fi
'
From https://github.com/discourse/discourse
 - [deleted]             (none)     -> origin/0-flake-key
 - [deleted]             (none)     -> origin/0-obscuring
 - [deleted]             (none)     -> origin/0-router-lint
 - [deleted]             (none)     -> origin/0-router-service
 - [deleted]             (none)     -> origin/autoimport-cleanup
 - [deleted]             (none)     -> origin/category-bullet-only
 - [deleted]             (none)     -> origin/dependabot/bundler/syntax_tree-6.2.0
 - [deleted]             (none)     -> origin/dependabot/npm_and_yarn/app/assets/javascripts/uppy/aws-s3-3.4.0
 - [deleted]             (none)     -> origin/dependabot/npm_and_yarn/app/assets/javascripts/uppy/aws-s3-multipart-3.8.0
 - [deleted]             (none)     -> origin/dependabot/npm_and_yarn/app/assets/javascripts/uppy/core-3.6.0
 - [deleted]             (none)     -> origin/dependabot/npm_and_yarn/app/assets/javascripts/uppy/utils-5.5.2
 - [deleted]             (none)     -> origin/dependabot/npm_and_yarn/app/assets/javascripts/uppy/xhr-upload-3.4.2
 - [deleted]             (none)     -> origin/dev-upgrade-reject-reason-reviewable-modal
 - [deleted]             (none)     -> origin/dev/ability-to-collect-stats-without-public-exposing
 - [deleted]             (none)     -> origin/dev/minio-s3-system-specs
 - [deleted]             (none)     -> origin/dev/re-enable-minio-specs
 - [deleted]             (none)     -> origin/dev/switch-over-category-settings
 - [deleted]             (none)     -> origin/dev/switch-over-more-category-settings
 - [deleted]             (none)     -> origin/discovery-named-outlets
 - [deleted]             (none)     -> origin/feature/theme-settings-migration
 - [deleted]             (none)     -> origin/fix/account-for-empty-string-site-settings
 - [deleted]             (none)     -> origin/footnote-plugin
 - [deleted]             (none)     -> origin/metadata-update
 - [deleted]             (none)     -> origin/modal-ux
 - [deleted]             (none)     -> origin/neil-2
 - [deleted]             (none)     -> origin/perf_cache_async_search
 - [deleted]             (none)     -> origin/spoiler-plugin
 - [deleted]             (none)     -> origin/support-search-customizationz
   043b4a418..22bb1c895  main                   -> origin/main
 * [new branch]          0-lint-suffix          -> origin/0-lint-suffix
 * [new branch]          0-rubocop              -> origin/0-rubocop
 * [new branch]          add-custom-emoji-sanitization-clean -> origin/add-custom-emoji-sanitization-clean
 * [new branch]          add-ds-store-to-gitignore -> origin/add-ds-store-to-gitignore
 + 64520a075...ff17131c9 add-new-chat-indicator-preference-only-mentions -> origin/add-new-chat-indicator-preference-only-mentions  (forced update)
 * [new branch]          api-topic-title-decorator -> origin/api-topic-title-decorator
 * [new branch]          array-custom-field-fix -> origin/array-custom-field-fix
 * [new branch]          array-custom-field-order -> origin/array-custom-field-order
 * [new branch]          avatar-notifications   -> origin/avatar-notifications
 * [new branch]          boosted-searches       -> origin/boosted-searches
 * [new branch]          category_definition    -> origin/category_definition
 * [new branch]          chat-github-onebox     -> origin/chat-github-onebox
 * [new branch]          chat-reaction-emoji-alignment -> origin/chat-reaction-emoji-alignment
 * [new branch]          chat/direct-messages   -> origin/chat/direct-messages
 * [new branch]          custom-field-store-cleanup -> origin/custom-field-store-cleanup
 * [new branch]          delete-backups-based-on-time-window -> origin/delete-backups-based-on-time-window
 * [new branch]          dependabot/npm_and_yarn/app/assets/javascripts/uppy/aws-s3-3.5.0 -> origin/dependabot/npm_and_yarn/app/assets/javascripts/uppy/aws-s3-3.5.0
 * [new branch]          dependabot/npm_and_yarn/app/assets/javascripts/uppy/aws-s3-multipart-3.9.0 -> origin/dependabot/npm_and_yarn/app/assets/javascripts/uppy/aws-s3-multipart-3.9.0
 * [new branch]          dependabot/npm_and_yarn/app/assets/javascripts/uppy/core-3.7.1 -> origin/dependabot/npm_and_yarn/app/assets/javascripts/uppy/core-3.7.1
 * [new branch]          dependabot/npm_and_yarn/app/assets/javascripts/uppy/utils-5.6.0 -> origin/dependabot/npm_and_yarn/app/assets/javascripts/uppy/utils-5.6.0
 * [new branch]          dependabot/npm_and_yarn/app/assets/javascripts/uppy/xhr-upload-3.5.0 -> origin/dependabot/npm_and_yarn/app/assets/javascripts/uppy/xhr-upload-3.5.0
 * [new branch]          desktop-notification-handlers -> origin/desktop-notification-handlers
 * [new branch]          dev/add-a-reference-column-to-notifications -> origin/dev/add-a-reference-column-to-notifications
 + ee95e6359...346f9d1cd dev/add-new-chat-metrics -> origin/dev/add-new-chat-metrics  (forced update)
 * [new branch]          dev/dry-up-user-status-serializers -> origin/dev/dry-up-user-status-serializers
 * [new branch]          dev/flaky-chat-details-collapser-spec -> origin/dev/flaky-chat-details-collapser-spec
 * [new branch]          dev/no-need-to-include-user-status-twice -> origin/dev/no-need-to-include-user-status-twice
 * [new branch]          dev/rethink-mass-mentions -> origin/dev/rethink-mass-mentions
 * [new branch]          dev/rethink-mass-mentions-polymorphic -> origin/dev/rethink-mass-mentions-polymorphic
 * [new branch]          dev/revert-guardian-devex -> origin/dev/revert-guardian-devex
 * [new branch]          dev/use-system-user-id-const -> origin/dev/use-system-user-id-const
 + 54940ca5c...1f44361c2 dev_paginate_categories_json -> origin/dev_paginate_categories_json  (forced update)
 * [new branch]          dev_watched_words      -> origin/dev_watched_words
 + 46fe4511f...a9d0e7069 ember-4                -> origin/ember-4  (forced update)
 * [new branch]          ember-5-plugins        -> origin/ember-5-plugins
 * [new branch]          extract_stripper       -> origin/extract_stripper
 * [new branch]          feature/add-copy-share-link-post-functionality -> origin/feature/add-copy-share-link-post-functionality
   9a6c6fd5b..8780daeee  feature/bookmark-menu-and-modal-redesign -> origin/feature/bookmark-menu-and-modal-redesign
 * [new branch]          feature/migrations-schema-generator -> origin/feature/migrations-schema-generator
 * [new branch]          feature_watched_words_validation -> origin/feature_watched_words_validation
 * [new branch]          file-size-restriction  -> origin/file-size-restriction
   43df37774..4393dd37e  filtered-events        -> origin/filtered-events
 * [new branch]          fix-keyboard-shortcuts-modal-double-scrollbar -> origin/fix-keyboard-shortcuts-modal-double-scrollbar
 * [new branch]          fix/count-mass-mentions-correctly -> origin/fix/count-mass-mentions-correctly
 * [new branch]          fix_category_select_kits -> origin/fix_category_select_kits
 * [new branch]          full-page              -> origin/full-page
   ce7fb6906..a6227532d  generic-import-latest  -> origin/generic-import-latest
 * [new branch]          generic-import-latest-snowflake -> origin/generic-import-latest-snowflake
 * [new branch]          generic-import-update  -> origin/generic-import-update
 * [new branch]          image-assets           -> origin/image-assets
 * [new branch]          independent-theme-compiler -> origin/independent-theme-compiler
 * [new branch]          input-text-field-component -> origin/input-text-field-component
 * [new branch]          issue/fix-guardian-init-basic-user -> origin/issue/fix-guardian-init-basic-user
 * [new branch]          keyword-site-setting   -> origin/keyword-site-setting
 + bdcc24f96...92e545292 list-wrapper           -> origin/list-wrapper  (forced update)
   e3636078c..5def32699  mock-chat-index-redesign -> origin/mock-chat-index-redesign
 * [new branch]          move_inflector         -> origin/move_inflector
 * [new branch]          oklab                  -> origin/oklab
 * [new branch]          poc/auto-after-before-plugin-outlets -> origin/poc/auto-after-before-plugin-outlets
 * [new branch]          poc/insert-before-after-wrapping-outlet -> origin/poc/insert-before-after-wrapping-outlet
 * [new branch]          pretty-text-please     -> origin/pretty-text-please
 * [new branch]          revert-maxmind         -> origin/revert-maxmind
   ef3f41543..223626d7a  stable                 -> origin/stable
 * [new branch]          support-load-more-btn  -> origin/support-load-more-btn
 * [new branch]          test-issue-temporary   -> origin/test-issue-temporary
   043b4a418..efcb5bb3d  tests-passed           -> origin/tests-passed
 * [new branch]          transform-hooks        -> origin/transform-hooks
 * [new branch]          transform-post-fn-api  -> origin/transform-post-fn-api
 * [new branch]          tweaks-2-fr            -> origin/tweaks-2-fr
 * [new branch]          use-sassc-embedded     -> origin/use-sassc-embedded
 * [new branch]          username_cache         -> origin/username_cache
 * [new branch]          ux-add-sorting-params-to-outlet -> origin/ux-add-sorting-params-to-outlet
 t [tag update]          beta                   -> beta
 t [tag update]          latest-release         -> latest-release
 * [new tag]             v3.1.3                 -> v3.1.3
 * [new tag]             v3.2.0.beta3           -> v3.2.0.beta3
I, [2023-12-06T16:07:31.685641 #1]  INFO -- :
I, [2023-12-06T16:07:31.686339 #1]  INFO -- : > cd /var/www/discourse && sudo -H -E -u discourse bash -c '
  set -o errexit
  if [[ $(git symbolic-ref --short HEAD) == tests-passed ]] ; then
      git pull
  else
      git -c advice.detachedHead=false checkout tests-passed
  fi
'
Switched to a new branch 'tests-passed'
I, [2023-12-06T16:07:35.620323 #1]  INFO -- : Branch 'tests-passed' set up to track remote branch 'tests-passed' from 'origin'.

I, [2023-12-06T16:07:35.620991 #1]  INFO -- : > cd /var/www/discourse && sudo -H -E -u discourse git config user.discourse-version tests-passed
I, [2023-12-06T16:07:35.636731 #1]  INFO -- :
I, [2023-12-06T16:07:35.637527 #1]  INFO -- : > cd /var/www/discourse && mkdir -p tmp
I, [2023-12-06T16:07:35.643552 #1]  INFO -- :
I, [2023-12-06T16:07:35.644234 #1]  INFO -- : > cd /var/www/discourse && chown discourse:www-data tmp
I, [2023-12-06T16:07:35.650138 #1]  INFO -- :
I, [2023-12-06T16:07:35.650972 #1]  INFO -- : > cd /var/www/discourse && mkdir -p tmp/pids
I, [2023-12-06T16:07:35.656320 #1]  INFO -- :
I, [2023-12-06T16:07:35.657036 #1]  INFO -- : > cd /var/www/discourse && mkdir -p tmp/sockets
I, [2023-12-06T16:07:35.662104 #1]  INFO -- :
I, [2023-12-06T16:07:35.662758 #1]  INFO -- : > cd /var/www/discourse && touch tmp/.gitkeep
I, [2023-12-06T16:07:35.669054 #1]  INFO -- :
I, [2023-12-06T16:07:35.669975 #1]  INFO -- : > cd /var/www/discourse && mkdir -p                    /shared/log/rails
I, [2023-12-06T16:07:35.676933 #1]  INFO -- :
I, [2023-12-06T16:07:35.677771 #1]  INFO -- : > cd /var/www/discourse && bash -c "touch -a           /shared/log/rails/{production,production_errors,unicorn.stdout,unicorn.stderr,sidekiq}.lo
g"
I, [2023-12-06T16:07:35.687445 #1]  INFO -- :
I, [2023-12-06T16:07:35.688203 #1]  INFO -- : > cd /var/www/discourse && bash -c "ln    -s           /shared/log/rails/{production,production_errors,unicorn.stdout,unicorn.stderr,sidekiq}.lo
g /var/www/discourse/log"
I, [2023-12-06T16:07:35.697439 #1]  INFO -- :
I, [2023-12-06T16:07:35.698219 #1]  INFO -- : > cd /var/www/discourse && bash -c "mkdir -p           /shared/{uploads,backups}"
I, [2023-12-06T16:07:35.705472 #1]  INFO -- :
I, [2023-12-06T16:07:35.706224 #1]  INFO -- : > cd /var/www/discourse && bash -c "ln    -s           /shared/{uploads,backups} /var/www/discourse/public"
I, [2023-12-06T16:07:35.714941 #1]  INFO -- :
I, [2023-12-06T16:07:35.715579 #1]  INFO -- : > cd /var/www/discourse && bash -c "mkdir -p           /shared/tmp/{backups,restores}"
I, [2023-12-06T16:07:35.722744 #1]  INFO -- :
I, [2023-12-06T16:07:35.723466 #1]  INFO -- : > cd /var/www/discourse && bash -c "ln    -s           /shared/tmp/{backups,restores} /var/www/discourse/tmp"
I, [2023-12-06T16:07:35.730272 #1]  INFO -- :
I, [2023-12-06T16:07:35.730904 #1]  INFO -- : > cd /var/www/discourse && chown -R discourse:www-data /shared/log/rails /shared/uploads /shared/backups /shared/tmp
I, [2023-12-06T16:07:36.244295 #1]  INFO -- :
I, [2023-12-06T16:07:36.245006 #1]  INFO -- : > cd /var/www/discourse && [ ! -d public/plugins ] || find public/plugins/ -maxdepth 1 -xtype l -delete
I, [2023-12-06T16:07:36.248521 #1]  INFO -- :
I, [2023-12-06T16:07:36.249238 #1]  INFO -- : /etc/service/unicorn/run 파일에서 # redis을(를) sv start redis || exit 1로 대체
I, [2023-12-06T16:07:36.249835 #1]  INFO -- : > cd /var/www/discourse/plugins && git clone https://github.com/discourse/docker_manager.git
Cloning into 'docker_manager'...
I, [2023-12-06T16:07:37.086735 #1]  INFO -- :
I, [2023-12-06T16:07:37.087632 #1]  INFO -- : > cp /var/www/discourse/config/nginx.sample.conf /etc/nginx/conf.d/discourse.conf
I, [2023-12-06T16:07:37.095997 #1]  INFO -- :
I, [2023-12-06T16:07:37.097169 #1]  INFO -- : > rm /etc/nginx/sites-enabled/default
I, [2023-12-06T16:07:37.102877 #1]  INFO -- :
I, [2023-12-06T16:07:37.103777 #1]  INFO -- : > mkdir -p /var/nginx/cache
I, [2023-12-06T16:07:37.109509 #1]  INFO -- :
I, [2023-12-06T16:07:37.110962 #1]  INFO -- : /etc/nginx/nginx.conf 파일에서 pid /run/nginx.pid;을(를) daemon off;로 대체
I, [2023-12-06T16:07:37.111761 #1]  INFO -- : /etc/nginx/conf.d/discourse.conf 파일에서 (?m-ix:upstream[^\}]+\})을(를) upstream discourse { server 127.0.0.1:3000; }로 대체
I, [2023-12-06T16:07:37.112365 #1]  INFO -- : /etc/nginx/conf.d/discourse.conf 파일에서 (?-mix:server_name.+$)을(를) server_name _ ;로 대체
I, [2023-12-06T16:07:37.112934 #1]  INFO -- : /etc/nginx/conf.d/discourse.conf 파일에서 (?-mix:client_max_body_size.+$)을(를) client_max_body_size $upload_size ;로 대체
I, [2023-12-06T16:07:37.113518 #1]  INFO -- : /etc/nginx/nginx.conf 파일에서 (?-mix:worker_connections.+$)을(를) worker_connections $nginx_worker_connections ;로 대체
I, [2023-12-06T16:07:37.113925 #1]  INFO -- : > echo "done configuring web"
I, [2023-12-06T16:07:37.116639 #1]  INFO -- : done configuring web

I, [2023-12-06T16:07:37.117373 #1]  INFO -- : > cd /var/www/discourse && gem install bundler --conservative -v $(awk '/BUNDLED WITH/ { getline; gsub(/ /,""); print $0 }' Gemfile.lock)
I, [2023-12-06T16:07:37.381140 #1]  INFO -- :
I, [2023-12-06T16:07:37.381751 #1]  INFO -- : > cd /var/www/discourse && find /var/www/discourse ! -user discourse -exec chown discourse {} \+
I, [2023-12-06T16:07:42.260626 #1]  INFO -- :
I, [2023-12-06T16:07:42.266374 #1]  INFO -- : > cd /var/www/discourse && if [ "tests-passed" != "tests-passed" ]; then
  rm -rf app/assets/javascripts/node_modules
fi
I, [2023-12-06T16:07:42.275364 #1]  INFO -- :
I, [2023-12-06T16:07:42.276177 #1]  INFO -- : > cd /var/www/discourse && su discourse -c 'yarn install --frozen-lockfile && yarn cache clean'
warning " > @glint/environment-ember-loose@1.1.0" has unmet peer dependency "@glimmer/component@^1.1.2".
warning " > @glint/environment-ember-template-imports@1.1.0" has unmet peer dependency "ember-template-imports@^3.0.0".
warning Resolution field "unset-value@2.0.1" is incompatible with requested version "unset-value@^1.0.0"
warning Pattern ["wrap-ansi@^7.0.0"] is trying to unpack in the same destination "/home/discourse/.cache/yarn/v6/npm-wrap-ansi-cjs-7.0.0-67e145cff510a6a6984bdf1152911d69d2eb9e43-integrity/no
de_modules/wrap-ansi-cjs" as pattern ["wrap-ansi-cjs@npm:wrap-ansi@^7.0.0"]. This could result in non-deterministic behavior, skipping.
warning " > discourse-markdown-it@1.0.0" has unmet peer dependency "xss@*".
warning "workspace-aggregator-91e584d3-820f-4c50-a600-62c805fec825 > discourse > @ember/legacy-built-in-components@0.5.0" has incorrect peer dependency "ember-source@>= 4.8".
warning "workspace-aggregator-91e584d3-820f-4c50-a600-62c805fec825 > discourse > @uppy/aws-s3@3.0.6" has incorrect peer dependency "@uppy/core@^3.1.2".
warning "workspace-aggregator-91e584d3-820f-4c50-a600-62c805fec825 > discourse > @uppy/aws-s3-multipart@3.1.3" has incorrect peer dependency "@uppy/core@^3.1.2".
warning "workspace-aggregator-91e584d3-820f-4c50-a600-62c805fec825 > discourse > @uppy/xhr-upload@3.1.1" has incorrect peer dependency "@uppy/core@^3.1.2".
warning "workspace-aggregator-91e584d3-820f-4c50-a600-62c805fec825 > discourse-plugins > ember-this-fallback@0.4.0" has unmet peer dependency "ember-source@^3.28.11 || ^4.0.0".
warning "workspace-aggregator-91e584d3-820f-4c50-a600-62c805fec825 > discourse > @uppy/aws-s3 > @uppy/xhr-upload@3.3.0" has incorrect peer dependency "@uppy/core@^3.2.1".
I, [2023-12-06T16:10:11.898082 #1]  INFO -- : yarn install v1.22.19
[1/5] Validating package.json...
[2/5] Resolving packages...
[3/5] Fetching packages...
[4/5] Linking dependencies...
[5/5] Building fresh packages...
$ yarn --cwd app/assets/javascripts $(node -e 'const argv = JSON.parse(process.env.npm_config_argv).original; const passthrough = [`--frozen-lockfile`, `-s`].filter(arg => argv.includes(arg)
); console.log(passthrough.join(` `));')
yarn install v1.22.19
[1/4] Resolving packages...
[2/4] Fetching packages...
[3/4] Linking dependencies...
[4/4] Building fresh packages...
$ ./run-patch-package
patch-package 8.0.0
Applying patches...
babel-plugin-debug-macros@0.3.4 ✔
content-tag@1.1.2 ✔
ember-cli@5.0.0 ✔
ember-this-fallback@0.4.0 (1 deprecation-name) ✔
ember-this-fallback@0.4.0 (2 themes) ✔
virtual-dom@2.1.1 ✔
Done in 72.34s.
Done in 135.83s.
yarn cache v1.22.19
success Cleared cache.
Done in 13.11s.

I, [2023-12-06T16:10:11.904393 #1]  INFO -- : > cd /var/www/discourse && su discourse -c 'bundle config --local deployment true'
I, [2023-12-06T16:10:12.394395 #1]  INFO -- :
I, [2023-12-06T16:10:12.395124 #1]  INFO -- : > cd /var/www/discourse && su discourse -c 'bundle config --local without "development test"'
I, [2023-12-06T16:10:12.656177 #1]  INFO -- : You are replacing the current local value of without, which is currently "test:development"

I, [2023-12-06T16:10:12.656984 #1]  INFO -- : > cd /var/www/discourse && su discourse -c 'bundle install --retry 3 --jobs 4'
Gem::Ext::BuildError: ERROR: Failed to build gem native extension.

current directory:
/var/www/discourse/vendor/bundle/ruby/3.2.0/gems/rbtrace-0.5.0/ext
/usr/local/bin/ruby extconf.rb
  -- tar zxvfo msgpack-1.1.0.tar.gz
  -- env CFLAGS=nil LDFLAGS=nil CC=nil
-- ./configure --disable-dependency-tracking --disable-shared --with-pic
--prefix=/var/www/discourse/vendor/bundle/ruby/3.2.0/gems/rbtrace-0.5.0/ext/dst/
--libdir=/var/www/discourse/vendor/bundle/ruby/3.2.0/gems/rbtrace-0.5.0/ext/dst/lib
*** extconf.rb failed ***
Could not create Makefile due to some reason, probably lack of necessary
libraries and/or headers.  Check the mkmf.log file for more details.  You may
need configuration options.

Provided configuration options:
        --with-opt-dir
        --without-opt-dir
        --with-opt-include
        --without-opt-include=${opt-dir}/include
        --with-opt-lib
        --without-opt-lib=${opt-dir}/lib
        --with-make-prog
        --without-make-prog
        --srcdir=.
        --curdir
        --ruby=/usr/local/bin/$(RUBY_BASE_NAME)
extconf.rb:6:in `sys': ./configure --disable-dependency-tracking
--disable-shared --with-pic
--prefix=/var/www/discourse/vendor/bundle/ruby/3.2.0/gems/rbtrace-0.5.0/ext/dst/
--libdir=/var/www/discourse/vendor/bundle/ruby/3.2.0/gems/rbtrace-0.5.0/ext/dst/lib
failed, please report to https://github.com/tmm1/rbtrace/issues (RuntimeError)
        from extconf.rb:42:in `block (2 levels) in <main>'
        from extconf.rb:34:in `chdir'
        from extconf.rb:34:in `block in <main>'
        from extconf.rb:30:in `chdir'
        from extconf.rb:30:in `<main>'

To see why this extension failed to compile, please check the mkmf.log which can
be found here:

/var/www/discourse/vendor/bundle/ruby/3.2.0/extensions/x86_64-linux/3.2.0/rbtrace-0.5.0/mkmf.log

extconf failed, exit code 1

Gem files will remain installed in
/var/www/discourse/vendor/bundle/ruby/3.2.0/gems/rbtrace-0.5.0 for inspection.
Results logged to
/var/www/discourse/vendor/bundle/ruby/3.2.0/extensions/x86_64-linux/3.2.0/rbtrace-0.5.0/gem_make.out

  /usr/local/lib/ruby/site_ruby/3.2.0/rubygems/ext/builder.rb:120:in `run'
/usr/local/lib/ruby/site_ruby/3.2.0/rubygems/ext/ext_conf_builder.rb:28:in
`build'
/usr/local/lib/ruby/site_ruby/3.2.0/rubygems/ext/builder.rb:188:in
`build_extension'
/usr/local/lib/ruby/site_ruby/3.2.0/rubygems/ext/builder.rb:222:in `block in
build_extensions'
  /usr/local/lib/ruby/site_ruby/3.2.0/rubygems/ext/builder.rb:219:in `each'
/usr/local/lib/ruby/site_ruby/3.2.0/rubygems/ext/builder.rb:219:in
`build_extensions'
/usr/local/lib/ruby/site_ruby/3.2.0/rubygems/installer.rb:844:in
`build_extensions'
/usr/local/lib/ruby/gems/3.2.0/gems/bundler-2.4.13/lib/bundler/rubygems_gem_installer.rb:72:in
`build_extensions'
/usr/local/lib/ruby/gems/3.2.0/gems/bundler-2.4.13/lib/bundler/rubygems_gem_installer.rb:28:in
`install'
/usr/local/lib/ruby/gems/3.2.0/gems/bundler-2.4.13/lib/bundler/source/rubygems.rb:198:in
`install'
/usr/local/lib/ruby/gems/3.2.0/gems/bundler-2.4.13/lib/bundler/installer/gem_installer.rb:54:in
`install'
/usr/local/lib/ruby/gems/3.2.0/gems/bundler-2.4.13/lib/bundler/installer/gem_installer.rb:16:in
`install_from_spec'
/usr/local/lib/ruby/gems/3.2.0/gems/bundler-2.4.13/lib/bundler/installer/parallel_installer.rb:156:in
`do_install'
/usr/local/lib/ruby/gems/3.2.0/gems/bundler-2.4.13/lib/bundler/installer/parallel_installer.rb:147:in
`block in worker_pool'
/usr/local/lib/ruby/gems/3.2.0/gems/bundler-2.4.13/lib/bundler/worker.rb:62:in
`apply_func'
/usr/local/lib/ruby/gems/3.2.0/gems/bundler-2.4.13/lib/bundler/worker.rb:57:in
`block in process_queue'
/usr/local/lib/ruby/gems/3.2.0/gems/bundler-2.4.13/lib/bundler/worker.rb:54:in
`loop'
/usr/local/lib/ruby/gems/3.2.0/gems/bundler-2.4.13/lib/bundler/worker.rb:54:in
`process_queue'
/usr/local/lib/ruby/gems/3.2.0/gems/bundler-2.4.13/lib/bundler/worker.rb:90:in
`block (2 levels) in create_threads'

An error occurred while installing rbtrace (0.5.0), and Bundler cannot continue.

In Gemfile:
  rbtrace
I, [2023-12-06T16:10:45.706190 #1]  INFO -- : Fetching gem metadata from https://rubygems.org/.........
Fetching rake 13.1.0
Installing rake 13.1.0
Using concurrent-ruby 1.2.2
Fetching racc 1.7.3
Using builder 3.2.4
Using minitest 5.20.0
Using erubi 1.12.0
Using mini_mime 1.1.5
Fetching date 3.3.4
Using crass 1.0.6
Using rack 2.2.8
Fetching public_suffix 5.0.4
Fetching timeout 0.4.1
Installing timeout 0.4.1
Installing date 3.3.4 with native extensions
Installing racc 1.7.3 with native extensions
Installing public_suffix 5.0.4
Fetching aws-eventstream 1.3.0
Using aws-partitions 1.583.0
Using jmespath 1.6.2
Fetching base64 0.2.0
Installing aws-eventstream 1.3.0
Using msgpack 1.7.2
Using bundler 2.4.13
Installing base64 0.2.0
Using byebug 11.1.3
Using cbor 0.5.9.6
Fetching cgi 0.4.1
Using chunky_png 1.4.0
Using coderay 1.1.3
Using colored2 4.0.0
Using connection_pool 2.4.1
Using openssl 3.2.0
Using cppjieba_rb 0.4.2
Fetching google-protobuf 3.25.1 (x86_64-linux)
Installing cgi 0.4.1 with native extensions
Installing google-protobuf 3.25.1 (x86_64-linux)
Using diffy 3.4.2
Using digest 3.1.1
Using discourse-fonts 0.0.9
Using email_reply_trimmer 0.1.13
Fetching excon 0.105.0
Installing excon 0.105.0
Using execjs 2.9.1
Using exifr 1.4.0
Using faraday-net_http 3.0.2
Using ruby2_keywords 0.0.5
Using fast_blank 1.0.1
Using fast_xs 0.8.0
Using fastimage 2.2.7
Using ffi 1.16.3
Using fspath 3.1.2
Using gc_tracer 1.5.1
Using guess_html_encoding 0.0.11
Using hana 1.3.7
Using hashie 5.0.0
Using highline 2.1.0
Using htmlentities 4.3.4
Using http_accept_language 2.1.1
Using image_size 3.3.0
Using in_threads 1.6.0
Using progress 3.6.0
Fetching json 2.7.1
Installing json 2.7.1 with native extensions
Fetching regexp_parser 2.8.3
Installing regexp_parser 2.8.3
Fetching unf_ext 0.0.9.1
Installing unf_ext 0.0.9.1 with native extensions
Using jwt 2.7.1
Using kgio 2.11.4
Using libv8-node 18.16.0.0 (x86_64-linux)
Using method_source 1.0.0
Using thor 1.3.0
Using zeitwerk 2.6.12
Using logstash-event 1.2.02
Fetching logster 2.13.1
Installing logster 2.13.1
Using lru_redux 1.1.0
Using lz4-ruby 0.3.3
Using maxminddb 0.1.22
Using memory_profiler 1.0.1
Using redis 4.8.1
Using mini_sql 1.5.0
Using multi_json 1.15.0
Using multi_xml 0.6.0
Using mustache 1.1.1
Fetching uri 0.13.0
Installing uri 0.13.0
Fetching nio4r 2.7.0
Installing nio4r 2.7.0 with native extensions
Using version_gem 1.1.3
Using oj 3.16.1
Using optimist 3.1.0
Using pg 1.5.4
Using raindrops 0.20.1
Using rchardet 1.8.0
Using rexml 3.2.6
Using rinku 2.0.6
Using rotp 6.3.0
Using rqrcode_core 1.2.0
Using rubyzip 2.3.2
Using sshkey 3.0.0
Using stackprof 0.2.25
Using i18n 1.14.1
Using tzinfo 2.0.6
Using rack-test 2.1.0
Using request_store 1.5.1
Using message_bus 4.3.8
Using rack-mini-profiler 3.1.1
Using rack-protection 3.1.0
Using sprockets 3.7.2 from https://github.com/rails/sprockets (at 3.x@f4d3dae)
Fetching net-protocol 0.2.2
Installing net-protocol 0.2.2
Using addressable 2.8.5
Using aws-sigv4 1.5.0
Fetching bootsnap 1.17.0
Installing bootsnap 1.17.0 with native extensions
Using openssl-signature_algorithm 1.3.0
Fetching sass-embedded 1.66.1 (x86_64-linux-gnu)
Installing sass-embedded 1.66.1 (x86_64-linux-gnu)
Using uglifier 4.2.0
Fetching faraday 2.7.12
Installing faraday 2.7.12
Using mini_suffix 0.3.3
Using omniauth 1.9.2
Using image_optim 0.31.3
Fetching nokogiri 1.15.5 (x86_64-linux)
Installing nokogiri 1.15.5 (x86_64-linux)
Fetching web-push 3.0.1
Installing web-push 3.0.1
Using mini_racer 0.8.0
Using pry 0.14.2
Using logstash-logger 0.26.1
Using sidekiq 6.5.12
Using redis-namespace 1.11.0
Fetching net-http 0.4.0
Using unf 0.1.4
Using oauth-tty 1.0.5
Using snaky_hash 2.0.1
Fetching rbtrace 0.5.0
Installing rbtrace 0.5.0 with native extensions
Installing net-http 0.4.0
Using unicorn 6.1.0
Using rss 0.3.0
Using rqrcode 2.2.0
Using activesupport 7.0.7
Using tzinfo-data 1.2023.3
Using net-pop 0.1.2
Using net-smtp 0.4.0
Using css_parser 1.16.0
Using aws-sdk-core 3.130.2
Using cose 1.3.0
Fetching dartsass-ruby 3.0.2
Installing dartsass-ruby 3.0.2
Using faraday-retry 2.2.0
Using oauth2 1.4.11
Using rtlcss 0.2.1
Using pry-byebug 3.10.1
Using pry-rails 0.3.9
Fetching loofah 2.22.0
Installing loofah 2.22.0
Using ruby-readability 0.7.0
Using sanitize 6.1.0
Using simpleidn 0.2.1
Using mini_scheduler 0.16.0
Using oauth 1.1.0
Using rails-dom-testing 2.2.0
Using globalid 1.2.1
Using activemodel 7.0.7
Using aws-sdk-kms 1.56.0
Using aws-sdk-sns 1.53.0
Using omniauth-oauth2 1.7.3
Using rails-html-sanitizer 1.6.0
Fetching json_schemer 2.1.1
Installing json_schemer 2.1.1
Using omniauth-oauth 1.2.0
Using activejob 7.0.7
Using active_model_serializers 0.8.4
Using activerecord 7.0.7
Using actionview 7.0.7
Using aws-sdk-s3 1.114.0
Using omniauth-facebook 9.0.0
Using omniauth-github 1.4.0
Using omniauth-google-oauth2 0.8.2
Using omniauth-twitter 1.4.0
Using discourse-seed-fu 2.3.12
Using actionpack 7.0.7
Using actionview_precompiler 0.3.0
Using railties 7.0.7
Using sprockets-rails 3.4.2
Using lograge 0.14.0
Using rails_failover 2.0.1
Using rails_multisite 5.0.0
Using puma 6.4.0
Fetching net-imap 0.4.7
Installing net-imap 0.4.7
Using mail 2.8.1
Using actionmailer 7.0.7

I, [2023-12-06T16:10:45.708604 #1]  INFO -- : Terminating async processes
I, [2023-12-06T16:10:45.708734 #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: 40
I, [2023-12-06T16:10:45.709069 #1]  INFO -- : Sending TERM to exec chpst -u redis -U redis /usr/bin/redis-server /etc/redis/redis.conf pid: 109
2023-12-06 16:10:45.709 UTC [40] LOG:  received fast shutdown request
109:signal-handler (1701879045) Received SIGTERM scheduling shutdown...
2023-12-06 16:10:45.713 UTC [40] LOG:  aborting any active transactions
2023-12-06 16:10:45.721 UTC [40] LOG:  background worker "logical replication launcher" (PID 49) exited with exit code 1
2023-12-06 16:10:45.722 UTC [44] LOG:  shutting down
2023-12-06 16:10:45.746 UTC [40] LOG:  database system is shut down
109:M 06 Dec 2023 16:10:45.749 # User requested shutdown...
109:M 06 Dec 2023 16:10:45.750 * Saving the final RDB snapshot before exiting.
109:M 06 Dec 2023 16:10:45.855 * DB saved on disk
109:M 06 Dec 2023 16:10:45.856 # Redis is now ready to exit, bye bye...


FAILED
--------------------
Pups::ExecError: cd /var/www/discourse && su discourse -c 'bundle install --retry 3 --jobs 4' failed with return #<Process::Status: pid 507 exit 5>
Location of failure: /usr/local/lib/ruby/gems/3.2.0/gems/pups-1.2.1/lib/pups/exec_command.rb:132:in `spawn'
exec failed with the params {"cd"=>"$home", "hook"=>"bundle_exec", "cmd"=>["su discourse -c 'bundle config --local deployment true'", "su discourse -c 'bundle config --local without \"develo
pment test\"'", "su discourse -c 'bundle install --retry 3 --jobs 4'"]}
bootstrap failed with exit code 5
** 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.
a3071aa235f86264227596c04c18b830cff475e4fa809d5a88ead626ab2cdf28

해당 로그 파일을 공유해 주시겠습니까?

그 파일은 빌드가 실패하는 컨테이너 안에 있는 것 같아서, 문제를 파악하기가 좀 어려울 것 같아요. 비슷한 오류를 겪었던 다른 사람이 Docker를 업그레이드한 후에(더 최신 OS를 사용 중이었음) 문제가 해결되었다는 걸 본 적이 있어서, 이번에도 그 문제가 아닐까 싶네요.

감사합니다

그럴 수도 있습니다. 하지만 제 시스템에는 그런 파일들이 여러 개 있어, 단순히 화석(구체적인 파일)이 아니라면 살펴볼 가치가 있을 것 같습니다.

ls -ltr /var/lib/docker/overlay2/*/*/var/www/discourse/vendor/bundle/ruby/3.2.0/extensions/x86_64-linux/3.2.0/rbtrace*/mkmf.log

아니, 정말.

보세요!

root@www:~# find /var/lib/docker -name mkmf.log|grep rbtrac|xargs ls -tl
-rw-r--r-- 1 1000 1000 35035 Oct 23 19:45 /var/lib/docker/aufs/diff/53a65982150d745a518e8e8b3d1c4e5e21df4aeaf387d952d9018f688e676391/var/www/discourse/vendor/bundle/ruby/3.2.0/extensions/x86_64-linux/3.2.0/rbtrace-0.4.14/mkmf.log
-rw-r--r-- 1 1000 1000 35329 Apr  9  2023 /var/lib/docker/aufs/diff/f324a4557c610412bd944c93adb2b1cb93a3e368bbd10b4f3a7b0160d320be6c/var/www/discourse/vendor/bundle/ruby/3.2.0/extensions/x86_64-linux/3.2.0/rbtrace-0.4.14/mkmf.log
-rw-r--r-- 1 1000 1000 35329 Apr  9  2023 /var/lib/docker/aufs/mnt/de948aa2097c3527c79c437dbfae65d2c71bdde2843896306868d409ae4b0937/var/www/discourse/vendor/bundle/ruby/3.2.0/extensions/x86_64-linux/3.2.0/rbtrace-0.4.14/mkmf.log
-rw-r--r-- 1 1000 1000 35147 Dec 21  2022 /var/lib/docker/aufs/diff/484330416e5a8c7cda4005d144c20205d5410d62dd23a599b4e9b2d408510c13/var/www/discourse/vendor/bundle/ruby/3.1.0/extensions/x86_64-linux/3.1.0/rbtrace-0.4.14/mkmf.log

아래와 같은 것이 원인인 것 같습니다:

have_func: checking for rb_gc_add_event_hook() in ruby.h,node.h... -------------------- no

LD_LIBRARY_PATH=.:/usr/local/lib "gcc -o conftest -I/var/www/discourse/vendor/bundle/ruby/3.2.0/gems/rbtrace-0.4.14/ext/dst/include -I/usr/local/include/ruby-3.2.0/x86_64-linux -I/usr/local/include/ruby-3.2.0/ruby/backward -I/usr/local/include/ruby-3.2.0 -I.    -O3 -fno-fast-math -ggdb3 -Wall -Wextra -Wdeprecated-declarations -Wdiv-by-zero -Wduplicated-cond -Wimplicit-function-declaration -Wimplicit-int -Wmisleading-indentation -Wpointer-arith -Wwrite-strings -Wold-style-definition -Wimplicit-fallthrough=0 -Wmissing-noreturn -Wno-cast-function-type -Wno-constant-logical-operand -Wno-long-long -Wno-missing-field-initializers -Wno-overlength-strings -Wno-packed-bitfield-compat -Wno-parentheses-equality -Wno-self-assign -Wno-tautological-compare -Wno-unused-parameter -Wno-unused-value -Wsuggest-attribute=format -Wsuggest-attribute=noreturn -Wunused-variable -Wundef  -fPIC conftest.c  -L. -L/usr/local/lib -Wl,-rpath,/usr/local/lib -L. -fstack-protector-strong -rdynamic -Wl,-export-dynamic -Wl,--no-as-needed    -lmsgpackc_ext  -Wl,-rpath,/usr/local/lib -L/usr/local/lib -lruby -lmsgpackc_ext  -lm -lpthread  -lc"
conftest.c:4:10: fatal error: node.h: No such file or directory

그리고 또한

conftest.c: In function ‘t’:
conftest.c:16:57: error: ‘rb_postponed_job_register_one’ undeclared (first use in this function)
   16 | int t(void) { void ((*volatile p)()); p = (void ((*)()))rb_postponed_job_register_one; return !p; }
      |                                                         ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~

이것이 오래된 Docker 때문일 수 있다는 것은 말이 안 됩니다. 하지만 이유 없이 사이트를 망가뜨릴까 봐 여전히 걱정됩니다.

여기은 12시간 후에 만료되는 링크입니다.

음, 이건 붉은 연막일 수도 있겠네요. 제 경우에도 같은 실패가 나타나는데도 아무것도 깨진 것 같지 않으니까요. 아마 이 로그들은 이미지 안에 남아 있는 어떤 화석 같은 것일지도 모르겠어요.

그럴 수도 있겠네요. 어쨌든 다른 사람은 이 문제를 겪지 않는 것 같으니, 저는 더 이상 신경 쓰지 않고 이 사람에게 discourse를 업그레이드하려면 vm과 OS를 업데이트해야 한다고 말씀드릴 생각입니다.

도와주셔서 감사합니다.

표준 Docker 설치 환경(standard docker installation)에서 재빌드를 시도해 보았는데, 성공했습니다 (Debian Bullseye의 Docker, docker.io apt 패키지 사용). 따라서 자체 호스팅 설치 환경이 깨져 있지는 않으며, rbtrace 의존성 문제로 인해 launcher rebuild가 재현 가능하게 실패하는 것은 아니라는 점이 확인되었습니다.

Docker 버전이 원인이 될 것 같지는 않습니다. rbtrace가 컨테이너 내부에서 빌드되지 않는 것은 컨테이너 내부의 의존성이 누락되었거나 오래되었기 때문일 가능성이 높습니다.

재빌드를 시작하기 전에 discourse_docker 클론에서 git pull을 실행하지 않아 오래된 커밋 상태인 것은 아닌지 확인해 보실 수 있을까요? 수동으로 git pull을 실행하여 main 브랜치의 최신 커밋에 있는지 확인하는 것이 나쁘지 않을 것입니다.

가능성은 있습니다. 최근의 런처는 git pull을 실행합니다(이 기능이 도입된 지 꽤 되었습니다). 한 번 더 시도해 볼 수도 있겠네요.

확실히 어떤 종류의 엣지 케이스인 것 같습니다.

우리는 Ubuntu 16을 업그레이드하지 않고도 이 방법으로 문제를 해결할 수 있었습니다. 다른 분들에게도 도움이 될 수 있을 것 같습니다.

  1. sudo apt update && sudo apt upgrade 명령을 실행합니다.
  2. 그런 다음 discourse launcher ./launcher rebuild app를 실행합니다.

우리에게는 오류가 사라졌습니다.

다른 포럼에서 본 해결 방법을 시도해 보았습니다. launcher 스크립트에서 다음을:

image="discourse/base:2.0.20231218-0429"

다음으로 교체했습니다:

image="discourse/base:2.0.20231230-0022"

이렇게 하면 rbtrace-0.5.1이 포함된 더 새로운 이미지를 가져와서 문제가 해결됩니다.

해당 내용은 여기서 찾았습니다: Discourse Build Error: "An error occurred while installing rbtrace (0.5.1), and Bundler cannot continue." - #50 by Neo - Discourse System Administration - Unix Linux Community.

저는 Oracle Linux 7.7을 사용 중입니다. 오래된 버전이지만, Ubuntu 18.04와 비슷할 것 같습니다.

다만, 왜 운영체제(OS)를 업그레이드하는 것도 해결책이 될 수 있는지는 이해가 되지 않습니다. 특히 Ruby gems와 관련된 이런 경우라면, Docker 컨테이너가 OS와 완전히 격리되어 있다고 생각했거든요. (저는 Docker도 Ruby도 전문가가 아닙니다.)