# 재빌드 실패

**URL:** https://meta.discourse.org/t/rebuild-failed/291469
**Category:** Self-hosting
**Created:** [1월 12, 2024, 7:10오후 UTC](https://meta.discourse.org/t/rebuild-failed/291469 "2024-01-12T19:10:59Z")
**Posts on this page:** 2
**Page:** 1

<div class="post-metadata">

### Author: ![coubeatczech](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/coubeatczech/32/114328_2.png) [@coubeatczech](https://meta.discourse.org/u/coubeatczech)
#### Post date: [1월 12, 2024, 7:10오후 UTC](https://meta.discourse.org/t/rebuild-failed/291469/1 "2024-01-12T19:10:59Z")

</div>

안녕하세요

`/var/discourse`에서 이 커밋에 있습니다.

```plaintext
commit fcce1376043adeb09e21ec1ec079a41e4d29fe6e (HEAD -> main, origin/main, origin/HEAD)
Author: Chris Rendle-Short <chris@discourse.org>
Date: Tue Dec 19 10:30:51 2023 +1100

    Bump default base image to discourse/base:2.0.20231218-0429

```

`./launcher app rebuild`를 실행하면 다음 오류 메시지가 표시됩니다:

```plaintext
Pups::ExecError: cd /var/www/discourse && su discourse -c 'bundle exec rake db:migrate' failed with return #<Process::Status: pid 3074 exit 1>
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"=>"db_migrate", "cmd"=>["su discourse -c 'bundle exec rake db:migrate'"]}
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.
e12109785dd70c9ce038393897cda79aae3ebbf3d1d24cab8536f0ad16d877f6

```

위쪽으로 스크롤하면 ERROR와 관련된 다음 줄들을 찾을 수 있습니다:

```plaintext
2024-01-12 18:59:28.392 UTC [3090] discourse@discourse LOG: duration: 120.113 ms bind <unnamed>: SELECT COUNT(*) FROM (SELECT 1 AS one FROM "users" LIMIT 20) subquery_for_count
2024-01-12 18:59:33.576 UTC [3112] discourse@discourse ERROR: MultiXactId 1127040271 has not been created yet -- apparent wraparound
2024-01-12 18:59:33.576 UTC [3112] discourse@discourse STATEMENT: CREATE INDEX "index_topic_users_on_topic_id_and_notification_level" ON "topic_users" ("topic_id", "notification_level")
rake aborted!
StandardError: An error has occurred, this and all later migrations canceled: (StandardError)

PG::InternalError: ERROR: MultiXactId 1127040271 has not been created yet -- apparent wraparound
/var/www/discourse/vendor/bundle/ruby/3.2.0/gems/rack-mini-profiler-3.3.0/lib/patches/db/pg.rb:110:in `exec'

```

이제 어떻게 진행해야 할지 모르겠습니다. 브라우저를 열면 Discourse UI가 500 오류만 표시합니다.

전체 오류 로그는 다음과 같습니다:  
[error-log.txt](https://meta.discourse.org/uploads/short-url/4D7ZTRR9zpMeyemrpTZvflMH1xX.txt) (59.0 KB)

다음 단계에 대한 도움을 부탁드립니다.

---

<div class="post-metadata">

### Author: ![coubeatczech](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/coubeatczech/32/114328_2.png) [@coubeatczech](https://meta.discourse.org/u/coubeatczech)
#### Post date: [1월 13, 2024, 11:36오전 UTC](https://meta.discourse.org/t/rebuild-failed/291469/2 "2024-01-13T11:36:30Z")

</div>

음, 결국 “topic\_users” 테이블을 삭제하고 다시 생성해서 문제를 "해결"했습니다. 이 테이블이 손상된 것 같았거든요. 이제 모든 토픽이 읽지 않은 상태로 보이긴 하지만, 뭐 어쩔 수 없죠 …
