"Zlib::BufError:缓冲区错误" - Discourse 更新失败

I, [2024-06-10T06:40:50.951638 #1]  INFO -- : cd /var/www/discourse & su discourse -c 'SKIP_EMBER_CLI_COMPILE=1 bundle exec rake themes:update assets:precompile'
插件名称为“discourse-education-group-custom-fields”,但插件目录名为“discourse-group-custom-fields”
正在清除临时文件
正在打包资源
I, [2024-06-10T06:41:22.964825 #1211]  INFO -- : Writing /var/www/discourse/public/assets/break_string-cc617154cd957804f2f6a1f3bc68258c9cdca3d4b9a322bf777d145fed04790e.js
I, [2024-06-10T06:41:22.986328 #1211]  INFO -- : Writing /var/www/discourse/public/assets/service-worker-5ed284060464db53e2bfcd15aca57982a183382ef3e0c86921be9a2ac5ecc196.js
I, [2024-06-10T06:41:22.993446 #1211]  INFO -- : Writing /var/www/discourse/public/assets/locales/i18n-3b40e842fd72b9bcc74ea83e094c823cd9ca535e4ecc5e78722e6f99d3656137.js
I, [2024-06-10T06:41:22.997323 #1211]  INFO -- : Writing /var/www/discourse/public/assets/scripts/discourse-test-listen-boot-9b14a0fc65c689577e6a428dcfd680205516fe211700a71c7adb5cbcf4df2cc5.js
rake aborted!
Zlib::BufError: buffer error (Zlib::BufError)
/var/www/discourse/vendor/bundle/ruby/3.3.0/gems/sprockets-3.7.3/lib/sprockets/cache/file_store.rb:100:in `<'
/var/www/discourse/vendor/bundle/ruby/3.3.0/gems/sprockets-3.7.3/lib/sprockets/cache/file_store.rb:100:in `set'
/var/www/discourse/vendor/bundle/ruby/3.3.0/gems/sprockets-3.7.3/lib/sprockets/cache.rb:212:in `set'

...

FAILED
--------------------
Pups::ExecError: cd /var/www/discourse & su discourse -c 'SKIP_EMBER_CLI_COMPILE=1 bundle exec rake themes:update assets:precompile' failed with return #<Process::Status: pid 1209 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"=>"precompile", "hook"=>"assets_precompile", "cmd"=>["su discourse -c 'SKIP_EMBER_CLI_COMPILE=1 bundle exec rake themes:update assets:precompile'"]}
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.
1 个赞

最近有几份关于类似错误的报告:

不确定是否已找到确切原因,但其中一个被认为是“Animated Avatars”,另一个是“Subscriptions”(尽管“Subscriptions”对我来说重建得很好)。

2 个赞

我没有使用这些插件:

   2   │ discourse_plugins:
   3   │   - https://github.com/discourse/docker_manager
   4   │   - https://github.com/discourse/discourse-rss-polling
   5   │   - https://github.com/discourse/discourse-chat-integration
   6   │   - https://github.com/discourse/discourse-yearly-review
   7   │   - https://github.com/discourse/discourse-perspective-api
   8   │   - https://github.com/discourse/discourse-policy
   9   │   - https://github.com/discourse/discourse-shared-edits
  10   │   - https://github.com/discourse/discourse-akismet
  11   │   - https://github.com/discourse/discourse-solved
  12   │   - https://github.com/discourse/discourse-user-notes
  13   │   - https://github.com/discourse/discourse-templates
  14   │   - https://github.com/discourse/discourse-assign
  15   │   - https://github.com/discourse/discourse-docs
  16   │   - https://github.com/discourse/discourse-encrypt
  17   │   - https://github.com/discourse/discourse-cakeday
  18   │   - https://github.com/discourse/discourse-calendar
  19 _ │   - https://github.com/discourse/discourse-data-explorer
  20   │   - https://github.com/kees-closed/discourse-group-custom-fields
  21   │   - https://github.com/discourse/discourse-activity-pub

我确实使用了 MaxMind,所以也许这可能是问题所在。我还注释掉了非 Discourse 插件。这并没有解决问题,所以我认为问题不是由非官方插件引起的。

我还重启了容器主机,但对构建结果没有影响。过去,网络问题曾通过重启解决。

你尝试过在不使用它的情况下重建吗?

我现在最好的解释是 Maxmind 出现了一些错误的错误。但再次查看一些错误,那也不合理。

我在更新 Discourse 安装时遇到了这个问题……

我认为原因是 .yml 容器文件中指定了 DISCOURSE_MAXMIND_LICENSE_KEY,但没有相应的 DISCOURSE_MAXMIND_ACCOUNT_ID

@tgxworld 的拉取请求在多个地方添加了 DISCOURSE_MAXMIND_ACCOUNT_ID 的使用,并解释了对“账户 ID”的需求:

对我来说,修复方法是添加 DISCOURSE_MAXMIND_ACCOUNT_ID 并重新构建(我重新构建了两次,但这很可能是一个临时问题)。

7 个赞

最近的重建工作正常。如果再次失败,我会看看 @DeanMarkTaylor 的建议。谢谢大家!

FWIW 我刚刚遇到了 Zlib::BufError: buffer error (Zlib::BufError) 重建错误,添加 DISCOURSE_MAXMIND_ACCOUNT_ID 后,第一次就成功重建了。:+1:

4 个赞

我也是。添加帐户 ID 并重新生成后可以再次工作。:slight_smile:

1 个赞

3.3.0.beta3 版本发布时,我曾偶尔遇到此错误;它失败了一次,然后重建就成功了。(当时没找到这篇帖子,我还担心内存损坏!:grimacing:)今晚,在进行重建时,它一直失败,直到我找到这篇帖子,并将 DISCOURSE_MAXMIND_ACCOUNT_ID 添加到现有的 DISCOURSE_MAXMIND_LICENSE_KEY 中,然后它才可靠地成功了。

(我猜想 MaxMind 推出了一项更改,并进行了蓝绿部署,而我之前每次都遇到了不同的后端服务版本……)

重建因 MaxMind 行而失败。它之前一直正常工作,并且在 app.yml 没有更改的情况下现在失败了。所以有些更大的东西坏了。

不管怎样,我在 Discourse 中不需要它,所以我让它被注释掉了。但可以肯定的是,问题不仅仅是 account_id。

同意。即使在 app.yml 中设置了 DISCOURSE_MAXMIND_ACCOUNT_ID,我的重建也失败了。

一旦我注释掉了所有关于 Maxmind 的提及,重建就成功了。

2 个赞

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