升级失败,“引导失败”,错误 137

我定期升级(大约每个月一次),之前从未遇到过这种阻止构建的问题。我的服务器目前无法访问。

我认为我的安装非常标准。有充足的可用磁盘空间。discourse-doctor 没有产生任何错误或看起来可疑的内容。系统没有任何变化。在尝试 launcher rebuild app 之前执行了 git pull。如果需要更多信息来进行正确诊断,请告诉我。我不太清楚日志中的问题是什么。如果有人更熟悉这个软件,希望能帮忙看看,我将不胜感激。

我正在使用的插件是:

          - git clone https://github.com/discourse/docker_manager.git
          - git clone https://github.com/discourse/discourse-akismet.git
          - git clone https://github.com/discourse/discourse-spoiler-alert.git
          - git clone https://github.com/discourse/discourse-yearly-review.git
          - git clone https://github.com/discourse/discourse-patreon
          - git clone https://github.com/discourse/discourse-solved
          - git clone https://github.com/discourse/discourse-github
          - git clone https://github.com/discourse/discourse-checklist
          - git clone https://github.com/discourse/discourse-tooltips.git
          - git clone https://github.com/discourse/discourse-docs
          - git clone https://github.com/discourse/discourse-user-notes
          - git clone https://github.com/discourse/discourse-math
          - git clone https://github.com/discourse/discourse-chat-integration
          - git clone https://github.com/discourse/discourse-encrypt.git
          - git clone https://github.com/discourse/discourse-footnote
          - git clone https://github.com/discourse/discourse-follow
          - git clone https://github.com/discourse/discourse-push-notifications

这是我的构建日志的结尾:

I, [2022-10-12T15:47:04.673293 #1]  INFO -- : cd /var/www/discourse && su discourse -c 'LOAD_PLUGINS=0 bundle exec rake plugin:pull_compatible_all'
I, [2022-10-12T15:47:09.943126 #1]  INFO -- : discourse-math is already at latest compatible version
discourse-chat-integration is already at latest compatible version
discourse-spoiler-alert is already at latest compatible version
discourse-encrypt is already at latest compatible version
discourse-tooltips is already at latest compatible version
discourse-follow is already at latest compatible version
docker_manager is already at latest compatible version
discourse-github is already at latest compatible version
discourse-push-notifications is already at latest compatible version
discourse-solved is already at latest compatible version
discourse-akismet is already at latest compatible version
discourse-footnote is already at latest compatible version
discourse-yearly-review is already at latest compatible version
discourse-checklist is already at latest compatible version
discourse-patreon is already at latest compatible version
discourse-docs is already at latest compatible version
discourse-user-notes is already at latest compatible version

I, [2022-10-12T15:47:09.944907 #1]  INFO -- : cd /var/www/discourse && su discourse -c 'bundle exec rake db:migrate'
I, [2022-10-12T15:47:23.023114 #1]  INFO -- : gem install sawyer -v 0.9.2 -i /var/www/discourse/plugins/discourse-github/gems/2.7.6 --no-document --ignore-dependencies --no-user-install
Successfully installed sawyer-0.9.2
1 gem installed
gem install octokit -v 5.6.1 -i /var/www/discourse/plugins/discourse-github/gems/2.7.6 --no-document --ignore-dependencies --no-user-install
Successfully installed octokit-5.6.1
1 gem installed

I, [2022-10-12T15:47:23.024237 #1]  INFO -- : cd /var/www/discourse && su discourse -c 'bundle exec rake themes:update assets:precompile'
103:M 12 Oct 2022 15:47:34.098 * 100 changes in 300 seconds. Saving...
103:M 12 Oct 2022 15:47:34.102 * Background saving started by pid 1695
1695:C 12 Oct 2022 15:47:34.384 * DB saved on disk
1695:C 12 Oct 2022 15:47:34.386 * RDB: 0 MB of memory used by copy-on-write
103:M 12 Oct 2022 15:47:34.407 * Background saving terminated with success
- Building
- Building
- building...
Though the "loose" option was set to "false" in your @babel/preset-env config, it will not be used for @babel/plugin-proposal-private-property-in-object since the "loose" mode option was set to "true" for @babel/plugin-proposal-class-properties.
The "loose" option must be the same for @babel/plugin-proposal-class-properties, @babel/plugin-proposal-private-methods and @babel/plugin-proposal-private-property-in-object (when they are enabled): you can silence this warning by explicitly adding
        ["@babel/plugin-proposal-private-property-in-object", { "loose": true }]
to the "plugins" section of your Babel config.
Though the "loose" option was set to "false" in your @babel/preset-env config, it will not be used for @babel/plugin-proposal-private-methods since the "loose" mode option was set to "true" for @babel/plugin-proposal-private-property-in-object.
The "loose" option must be the same for @babel/plugin-proposal-class-properties, @babel/plugin-proposal-private-methods and @babel/plugin-proposal-private-property-in-object (when they are enabled): you can silence this warning by explicitly adding
        ["@babel/plugin-proposal-private-methods", { "loose": true }]
to the "plugins" section of your Babel config.
[WARN] (broccoli-terser-sourcemap) Minifying "assets/discourse.js" took: 26102ms (more than 20,000ms)
Killed
error Command failed with exit code 137.
I, [2022-10-12T15:51:18.234000 #1]  INFO -- : Checking 'discourse-homepage-feature-component' for 'default'... up to date
Checking 'Versatile Banner' for 'default'... up to date
Checking 'Custom Header Links' for 'default'... yarn run v1.22.19
$ /var/www/discourse/app/assets/javascripts/node_modules/.bin/ember build -prod
Environment: production
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.

I, [2022-10-12T15:51:18.245871 #1]  INFO -- : Terminating async processes
I, [2022-10-12T15:51:18.246532 #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: 42
I, [2022-10-12T15:51:18.247499 #1]  INFO -- : Sending TERM to exec chpst -u redis -U redis /usr/bin/redis-server /etc/redis/redis.conf pid: 103
103:signal-handler (1665589878) Received SIGTERM scheduling shutdown...
2022-10-12 15:51:18.249 UTC [42] LOG:  received fast shutdown request
103:M 12 Oct 2022 15:51:18.327 # User requested shutdown...
103:M 12 Oct 2022 15:51:18.327 * Saving the final RDB snapshot before exiting.
2022-10-12 15:51:19.052 UTC [42] LOG:  aborting any active transactions
2022-10-12 15:51:19.100 UTC [42] LOG:  background worker "logical replication launcher" (PID 51) exited with exit code 1
2022-10-12 15:51:19.102 UTC [46] LOG:  shutting down
2022-10-12 15:51:19.188 UTC [42] LOG:  database system is shut down
103:M 12 Oct 2022 15:51:20.072 * DB saved on disk
103:M 12 Oct 2022 15:51:20.073 # Redis is now ready to exit, bye bye...


FAILED
--------------------
Pups::ExecError: cd /var/www/discourse && su discourse -c 'bundle exec rake themes:update assets:precompile' failed with return #<Process::Status: pid 1601 exit 137>
Location of failure: /usr/local/lib/ruby/gems/2.7.0/gems/pups-1.1.1/lib/pups/exec_command.rb:117:in `spawn'
exec failed with the params {"cd"=>"$home", "hook"=>"assets_precompile", "cmd"=>["su discourse -c 'bundle exec rake themes:update assets:precompile'"]}
bootstrap failed with exit code 137
** 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.
5354ffedbf56742079333cb69face684193aaa0afa7f1ff492666e17a2e1f51d

我认为错误 137 是内存不足。您是否进行了标准安装,并在出现选项时允许它添加一些交换空间?

如果听起来可能是这种情况,那么在这个主题中有一个关于类似错误的非常有信息量的讨论:

5 个赞

我不记得了,但这是一个拥有 2 GB 内存和 2 GB 交换空间的 VSP。

$ free -h
              total        used        free      shared  buff/cache   available
Mem:          1.9Gi       688Mi        64Mi        33Mi       1.2Gi       1.1Gi
Swap:         2.0Gi       1.0Gi       1.0Gi

你好!:wave:

你能运行 free -h 并分享输出吗?:slight_smile:

1 个赞

我编辑了我的最后一篇帖子。

这似乎是可能的原因。我一直在清理磁盘空间并通过 apt 进行升级,重启后,我再次构建,它实际上完成了。尽管有软件包更改,但我认为重启恢复了足够的内存/交换空间来完成构建。有趣的是,我不得不停止通过 UI 进行升级,因为内存不足(我只通过命令行进行升级),但我从未在命令行中遇到构建失败的情况。我将尝试再增加 1 GB 的交换空间以防止将来发生这种情况,并看看我是否能恢复通过 UI 进行升级的能力。

3 个赞

又有一个更新。我不得不等到升级后才能测试新的升级。以前,通过 UI 升级是不可能的,因为它会在升级过程中因内存不足而崩溃。通过增加交换文件大小解决了这个命令行构建问题后,我终于能够通过 UI 成功升级了。感谢您的帮助。

2 个赞

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