重建失败

你好

我当前位于 /var/discourse 的此提交:

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 时,我会收到此错误消息:

Pups::ExecError: cd /var/www/discourse &amp;&amp; su discourse -c 'bundle exec rake db:migrate' failed with return #&lt;Process::Status: pid 3074 exit 1&gt;
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 周围找到这些行:

2024-01-12 18:59:28.392 UTC [3090] discourse@discourse LOG:  duration: 120.113 ms  bind &lt;unnamed&gt;: 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 (59.0 KB)

如果您能提供下一步该怎么做的帮助,我将不胜感激。

好的,我通过删除并重新创建“topic_users”表来“解决”了这个问题,该表似乎已损坏。现在我可以看到所有主题都未读,但无所谓……

4 个赞