# 업그레이드 실패 - 앱 재빌드 시 부트스트랩 오류 발생

**URL:** <https://meta.discourse.org/t/cannot-upgrade-app-rebuild-fails-to-boostrap/310074>\
**Category:** Self-hosting\
**Created:** [5월 31, 2024, 8:33오전 UTC](https://meta.discourse.org/t/cannot-upgrade-app-rebuild-fails-to-boostrap/310074 "2024-05-31T08:33:51Z")\
**Posts on this page:** 1\
**Showing post:** 1

<div class="post-metadata">

**Author:** ![gilgongo](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/gilgongo/32/330356_2.png) [@gilgongo](https://meta.discourse.org/u/gilgongo)\
**Post date:** [5월 31, 2024, 8:33오전 UTC](https://meta.discourse.org/t/cannot-upgrade-app-rebuild-fails-to-boostrap/310074/1 "2024-05-31T08:33:51Z")

</div>

업그레이드가 필요하다는 알림을 받아 관리자로 접속해 보니 다음과 같은 메시지가 표시되었습니다:

 ![discourse](https://global.discourse-cdn.com/meta/original/4X/5/f/2/5f2dc171cdbfa68c09e5c51f18a011af3b142372.png)

업그레이드 링크를 클릭하니 확인 작업이 실행되었지만, 두 항목 모두 "최신 상태"라고 반환되었습니다. 그래서 `./launcher rebuild app`을 실행해 보았는데 다음과 같은 오류가 발생했습니다:

```plaintext
FAILED
--------------------
Pups::ExecError: 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
' failed with return #<Process::Status: pid 130 exit 128>
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"=>"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 set -o errexit\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 --tags --prune-tags --prune --force origin\n fi\n'", "sudo -H -E -u discourse bash -c '\n set -o errexit\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'", "sudo -H -E -u discourse git config user.discourse-version $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.
fd6a747d640a06c375439c5c134aa46ff11ceb8f677d6d16247cb57c9772f731

```

이후 `./discourse-doctor`을 실행했는데 사이트가 다시 정상적으로 올라왔습니다(다만 이상하게도 테스트 이메일이 타임아웃되었는데, 이는 별개의 문제일 수도 있습니다). 그래서 다시 `./launcher rebuild app`을 시도해 보았지만 동일한 문제로 부트스트랩이 실패했습니다.

이 문제에 대해 아이디어가 있는 분이 있을까요? 저는 Ubuntu 22.04에서 Docker를 사용 중입니다.

---

_[View the full topic](https://meta.discourse.org/t/cannot-upgrade-app-rebuild-fails-to-boostrap/310074)._
