在重建过程中遇到问题

我正在尝试重建应用程序,但在执行“bundle exec rake db:migrate”时遇到失败。这是一个已经运行了相当长时间的现有安装。我看到的大多数关于此问题的搜索似乎都与插件有关,但我没有使用任何额外的插件。只是标准的 Discourse。磁盘空间充足。相关的日志如下。有什么想法吗?

谢谢!

I, [2024-10-18T01:38:00.111880 #1]  INFO -- : exec chpst -u redis -U redis /usr/bin/redis-server /etc/redis/redis.conf
I, [2024-10-18T01:38:00.114128 #1]  INFO -- : sleep 10
1793:C 18 Oct 2024 01:38:00.127 # oO0OoO0OoO0Oo Redis is starting oO0OoO0OoO0Oo
1793:C 18 Oct 2024 01:38:00.127 # Redis version=7.0.7, bits=64, commit=00000000, modified=0, pid=1793, just started
1793:C 18 Oct 2024 01:38:00.128 # Configuration loaded
1793:M 18 Oct 2024 01:38:00.129 * monotonic clock: POSIX clock_gettime
1793:M 18 Oct 2024 01:38:00.129 # Warning: Could not create server TCP listening socket *:6379: bind: Address already in use
1793:M 18 Oct 2024 01:38:00.130 # Failed listening on port 6379 (TCP), aborting.
I, [2024-10-18T01:38:10.121847 #1]  INFO -- :
I, [2024-10-18T01:38:10.125839 #1]  INFO -- : cd /var/www/discourse && su discourse -c 'bundle exec rake db:migrate'
rake aborted!
[checklist] Javascript files under `assets/javascripts` are automatically included in JS bundles.
Manual register_asset calls should be removed. (attempted to add javascripts/checklist_ui.js)
/var/www/discourse/lib/plugin/instance.rb:723:in `register_asset'
/var/www/discourse/plugins/discourse-plugin-checklist/plugin.rb:7:in `activate!'
/var/www/discourse/lib/plugin/instance.rb:780:in `instance_eval'
/var/www/discourse/lib/plugin/instance.rb:780:in `activate!'
/var/www/discourse/lib/discourse.rb:348:in `block in activate_plugins!'
/var/www/discourse/lib/discourse.rb:345:in `each'
/var/www/discourse/lib/discourse.rb:345:in `activate_plugins!'
/var/www/discourse/config/application.rb:232:in `block in <class:Application>'
/var/www/discourse/lib/plugin.rb:6:in `initialization_guard'
/var/www/discourse/config/application.rb:232:in `<class:Application>'
/var/www/discourse/config/application.rb:75:in `<module:Discourse>'
/var/www/discourse/config/application.rb:74:in `<top (required)>'
/var/www/discourse/Rakefile:7:in `<top (required)>'
/var/www/discourse/vendor/bundle/ruby/3.3.0/gems/rake-13.2.1/exe/rake:27:in `<top (required)>'
/usr/local/bin/bundle:25:in `load'
/usr/local/bin/bundle:25:in `<main>'
(See full trace by running task with --trace)
I, [2024-10-18T01:38:12.504780 #1]  INFO -- :
I, [2024-10-18T01:38:12.506202 #1]  INFO -- : Terminating async processes
I, [2024-10-18T01:38:12.507158 #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: 38
2024-10-18 01:38:12.507 UTC [38] LOG:  received fast shutdown request
I, [2024-10-18T01:38:12.508420 #1]  INFO -- : Sending TERM to exec chpst -u redis -U redis /usr/bin/redis-server /etc/redis/redis.conf pid: 106
106:signal-handler (1729215492) Received SIGTERM scheduling shutdown...
2024-10-18 01:38:12.514 UTC [38] LOG:  aborting any active transactions
2024-10-18 01:38:12.529 UTC [38] LOG:  background worker "logical replication launcher" (PID 53) exited with exit code 1
2024-10-18 01:38:12.530 UTC [48] LOG:  shutting down
2024-10-18 01:38:12.550 UTC [38] LOG:  database system is shut down
106:M 18 Oct 2024 01:38:12.583 # User requested shutdown...
106:M 18 Oct 2024 01:38:12.584 * Saving the final RDB snapshot before exiting.
106:M 18 Oct 2024 01:38:12.746 * DB saved on disk
106:M 18 Oct 2024 01:38:12.747 # Redis is now ready to exit, bye bye...


FAILED
--------------------
Pups::ExecError: cd /var/www/discourse && su discourse -c 'bundle exec rake db:migrate' failed with return #<Process::Status: pid 1796 exit 1>
Location of failure: /usr/local/lib/ruby/gems/3.3.0/gems/pups-1.2.1/lib/pups/exec_command.rb:132:in `spawn'
exec failed with the params {"cd"=>"$home", "tag"=>"migrate", "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.
aa541b3e83ae7262e9352dc3a8f5da689f39fba35f9b43aa5643ea6e11109dd8
==================== END REBUILD LOG ====================
Failed to rebuild app.

你好,你试过问 Dr 吗?./discourse-doctor
另外,重启服务器,虽然是个极端的方法,但在过去对我来说是有效的。

你是在从一个非常旧的版本升级吗?

1 个赞

我确实尝试了 discourse doctor。它似乎只是再次尝试重建,除此之外没有给我太多有用的信息。重启服务器没有任何效果 :confused:

我落后了两个小版本,所以不算太旧。

2 个赞

我今晚在进行一些更新时遇到了类似的错误。第二次运行 ./launcher rebuild app 解决了问题。也许可以再试一次??

1 个赞

这是问题所在

您能否通过 git status 检查您正在使用的 Discourse 分支并在此处分享?

您的错误消息对我来说没什么意义,因为如果您查看源代码,并没有这样的命令。

6 个赞

“在 main 分支上”

我仍然遇到此问题,并且我尝试解决它的所有方法都失败了。有人有什么想法吗?

我终于解决了这个问题。在检查我的构建输出时,我发现有一行提到了一个未识别的插件。我查看了我的 app.yml 文件,发现只列出了两个插件——docker_manager 和 discourse-checklist。当我查看 discourse-checklist 时,我注意到它已被合并到核心,所以我从 app.yml 中删除了它。之后,我的构建成功进行了。

1 个赞

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.