재빌드 중 예상치 못한 오류로 업데이트 실패

안녕하세요,

Discourse 업데이트 문제로 막혀 있습니다. 재빌드 명령이 실패하여 업데이트를 완료할 수 없습니다. bundle install 단계와 관련이 있는 것 같습니다…

FAILED
Pups::ExecError: cd /var/www/discourse && su discourse -c 'bundle install --retry 3 --jobs 4' failed with return #<Process::Status: pid 6677 exit 5>
Location of failure: /pups/lib/pups/exec_command.rb:112: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 install --retry 3 --jobs 4'"]}
d5f6cd1fd76403647c95480f36207ae014cd548ec8eb9914fdf280998b5597d
** FAILED TO BOOTSTRAP ** please scroll up and look for earlier error messages, there may be more than one.
bootstrap failed with exit code 5

하지만 어떻게 수정해야 할지 모르겠습니다. 어떤 조언이 있을까요?

도움 주시면 감사하겠습니다!

해당 부분만으로는 큰 의미가 없으므로, 전체 로그(또는 이전 오류)를 올려주세요.

디스코ourse 포맷팅 툴바 없이 시도해 볼 수도 있습니다.

네, 나머지 플러그인들과 함께 해당 플러그인을 제거했지만, 불행히도 문제가 여전히 지속되고 있습니다.

거의 모든 플러그인을 제거한 후, ./discourse-doctor 실행 시 출력된 최신 내용을 추가했지만, 문제는 여전히 남아 있습니다. 템플릿 중 일부도 제거해야 하는지, 아니면 오류가 다른 곳에 있는 것인지 궁금합니다. 업데이트를 시도하기 전까지는 모든 것이 정상적으로 작동했지만, 이제 사이트가 다운된 상태입니다. ./discourse-doctor 출력에서 이 문제에 대한 더 많은 통찰을 줄 수 있는 추가 텍스트는 다음과 같습니다:

2023-12-14 22:38:53.291 UTC [42] LOG: database system is shut down
11:14 Mi Dec 2023 22:38:53.536 +0000 Saved on disk
11:14 Mi Dec 2023 22:38:53.346 # 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 518 exit 5>
Location of failure: /usr/local/lib/ruby/gems/2.3.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 \"development test\"'", "su discourse -c 'bundle install --retry 3 --jobs 4'"]}
** 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.
0cbe5f54cc4be6fd4475fdad523d75c5cd36cded997f6b3cab34e4e908896
==================== END REBUILD LOG ====================
Failed to rebuild app.

Checking your domain name...
Connection to forospyware.com 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 (1a8bb1f1f3267284b55ed1620db877010454d9932112d71de80bac3e5ff7d7): Error starting userland proxy: listen tcp 0.0.0.0:443: bind: 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 ====================
Discourse version at forospyware.com: NOT FOUND
Discourse version at localhost: NOT FOUND

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

total used free shared buff/cache available
Mem: 7983 195 4275 80 3512 7326
Swap: 0 0 0

==================== DISK SPACE CHECK ====================
-- OS Disk Space
Filesystem Size Used Avail Use% Mounted on
/dev/vda1 155G 107G 49G 69% /

==================== DISK INFORMATION ====================
Disk /dev/vda: 160 GiB, 171798691840 bytes, 335544320 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: 603625F3-7AE2-40CB-B05E-08D7EAD257E4

Device Start End Sectors Size Type
/dev/vda1 227328 335544286 335316959 159.9G Linux filesystem
/dev/vda14 2048 10239 8192 4M BIOS boot
/dev/vda15 10240 227327 217088 106M Microsoft basic data

Partition table entries are not in disk order.
==================== 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.
Email address for mail test? ('n' to skip) [ ]: n
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
/ -- search for the word 'error'
n -- search for the next occurrence
N -- go to the

빌드 로그의 첫 부분을 공유해야 합니다. bundle install 줄이 포함된 부분입니다.

이 부분을 말씀하시는 건가요? - 죄송합니다, DigitalOcean 콘솔에서 여기저기 이동하면서 모든 코드를 확인하는 것이 매우 어렵습니다.

긴 로그를 살펴봐서 오류가 있는 부분을 찾아줄 수 있을까요? 마지막에 있는 것만이 유일한 오류는 아닐 텐데.

그게 너무 번거롭다면, 로그 전체를 보내줘도 괜찮습니다.

다음은 치명적인 실패였던 것 같습니다:

I, [2023-12-14T22:38:19.544278 #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.

해당 로그 파일(/var/www/discourse/vendor/bundle/ruby/3.2.0/extensions/x86_64-linux/3.2.0/rbtrace-0.5.0/mkmf.log)을 공유해 주시겠습니까?

Jay도 동일한 문제를 겪었습니다(Rebuild failure: "extconf failed, exit code 1" -- due to old Docker?). 다만, 최종적으로 문제를 해결했는지는 알 수 없습니다.

@TroyaNO 혹시 모르니 ./launcher rebuild app을 다시 실행하기 전에 git pull을 입력해 볼 수 있을까요?

그것은 오래된 Docker라고 판단했지만, 사실은 그 말이 잘 통하지 않았습니다.

하지만 이 서버는 2018년부터 같은 VM에서 실행되고 있고 OS가 업데이트되지 않았을 거라고 추정됩니다.

그래서 제가 할 일은 새로운 드롭렛을 생성하고 rsync를 사용하여 Discourse 사이트를 다른 VPS로 이동하는 것입니다.