重建失败(版本号字符串格式错误)

我正在尝试重建一个旧的安装(3.1.0.beta5)来更新一个插件而不更新 Discourse。在 containers/app.yaml 中,我们将 version 锁定在一个特定的 git hash。

这在我们过去是有效的,但今天重建失败了。日志中的错误是:

ArgumentError: Malformed version number string < 3.3.0.beta1-dev

我发现了一些关于这个问题的旧帖子,其中提到 CLI 重建应该可以解决任何问题,但我已经尝试了几次,但它仍然无法通过。

有什么想法吗?

这是错误的一部分(加上一些上面的/下面的行)。

Bundle complete! 137 Gemfile dependencies, 173 gems now installed.
Gems in the groups 'development' and 'test' were not installed.
Bundled gems are installed into `./vendor/bundle`

I, [2024-05-15T20:59:06.357437 #1]  INFO -- : > cd /var/www/discourse && su discourse -c 'LOAD_PLUGINS=0 bundle exec rake plugin:pull_compatible_all'
rake aborted!
ArgumentError: Malformed version number string < 3.3.0.beta1-dev
/var/www/discourse/lib/version.rb:44:in `block in find_compatible_resource'
/var/www/discourse/lib/version.rb:44:in `each'
/var/www/discourse/lib/version.rb:44:in `sort_by'
/var/www/discourse/lib/version.rb:44:in `find_compatible_resource'
/var/www/discourse/lib/version.rb:79:in `find_compatible_git_resource'
/var/www/discourse/lib/tasks/plugin.rake:140:in `block in <main>'
/var/www/discourse/lib/tasks/plugin.rake:121:in `block (2 levels) in <main>'
/var/www/discourse/lib/tasks/plugin.rake:119:in `each'
/var/www/discourse/lib/tasks/plugin.rake:119:in `block in <main>'
/var/www/discourse/vendor/bundle/ruby/3.2.0/gems/rake-13.0.6/exe/rake:27:in `<top (required)>'
/usr/local/bin/bundle:25:in `load'
/usr/local/bin/bundle:25:in `<main>'
Tasks: TOP => plugin:pull_compatible
(See full trace by running task with --trace)
I, [2024-05-15T20:59:08.586468 #1]  INFO -- :
I, [2024-05-15T20:59:08.586890 #1]  INFO -- : > exec chpst -u redis -U redis /usr/bin/redis-server /etc/redis/redis.conf
I, [2024-05-15T20:59:08.589266 #1]  INFO -- : > sleep 10
4224:C 15 May 2024 20:59:08.593 # oO0OoO0OoO0Oo Redis is starting oO0OoO0OoO0Oo
4224:C 15 May 2024 20:59:08.593 # Redis version=7.0.7, bits=64, commit=00000000, modified=0, pid=4224, just started
4224:C 15 May 2024 20:59:08.593 # Configuration loaded
4224:M 15 May 2024 20:59:08.594 * monotonic clock: POSIX clock_gettime
4224:M 15 May 2024 20:59:08.594 # Warning: Could not create server TCP listening socket *:6379: bind: Address already in use
4224:M 15 May 2024 20:59:08.594 # Failed listening on port 6379 (TCP), aborting.
I, [2024-05-15T20:59:18.592023 #1]  INFO -- :
I, [2024-05-15T20:59:18.592525 #1]  INFO -- : > cd /var/www/discourse && su discourse -c 'bundle exec rake db:migrate'
I, [2024-05-15T20:59:22.569878 #1]  INFO -- :
I, [2024-05-15T20:59:22.570279 #1]  INFO -- : > cd /var/www/discourse && su discourse -c 'bundle exec rake assets:precompile:build'
rake aborted!
Don't know how to build task 'assets:precompile:build' (See the list of available tasks with `rake --tasks`)
Did you mean?  assets:precompile
               assets:precompile:css
               assets:precompile:before
/var/www/discourse/vendor/bundle/ruby/3.2.0/gems/rake-13.0.6/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-05-15T20:59:23.600115 #1]  INFO -- :
I, [2024-05-15T20:59:23.600637 #1]  INFO -- : Terminating async processes
I, [2024-05-15T20:59:23.600673 #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: 35
2024-05-15 20:59:23.600 UTC [35] LOG:  received fast shutdown request
I, [2024-05-15T20:59:23.600751 #1]  INFO -- : Sending TERM to exec chpst -u redis -U redis /usr/bin/redis-server /etc/redis/redis.conf pid: 97
97:signal-handler (1715806763) Received SIGTERM scheduling shutdown...
2024-05-15 20:59:23.605 UTC [35] LOG:  aborting any active transactions
2024-05-15 20:59:23.607 UTC [35] LOG:  background worker "logical replication launcher" (PID 50) exited with exit code 1
2024-05-15 20:59:23.609 UTC [45] LOG:  shutting down
2024-05-15 20:59:23.651 UTC [35] LOG:  database system is shut down
97:M 15 May 2024 20:59:23.666 # User requested shutdown...
97:M 15 May 2024 20:59:23.666 * Saving the final RDB snapshot before exiting.
97:M 15 May 2024 20:59:23.715 * DB saved on disk
97:M 15 May 2024 20:59:23.715 # Redis is now ready to exit, bye bye...


FAILED
--------------------
Pups::ExecError: cd /var/www/discourse && su discourse -c 'bundle exec rake assets:precompile:build' failed with return #<Process::Status: pid 4246 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", "tag"=>"build", "hook"=>"assets_precompile_build", "cmd"=>["su discourse -c 'bundle exec rake assets:precompile:build'"]}
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.
d64132a4857117bb081fcc96afed62539cf84318342a258d42bf23b4736b0d9b

我建议你更新东西,但这并不是你问的。

你是否也把 discourse_docker 钉到了多年前的同一个版本?我认为错误就是由此产生的。

将当前启动器中的 image (discourse/base:2.0.20230825-1850) 提取出来,然后运行带有 --run-image=discourse/base:2.0.20230825-1850 选项的 rebuild,这是最好的方法吗?或者有其他/更好的方法将我们固定到同一个 Docker 版本?

从在线升级(可以单独完成)来更新插件有什么问题?

4 个赞

我不知道为什么我没有先尝试那个。谢谢 @merefield

2 个赞