安装插件失败

你好 :wave:
我正在使用最新的 Discourse 版本,在尝试安装插件时遇到此错误:GitHub - discourse/discourse-encrypt: A plugin that provides a secure communication channel through Discourse.
如何修复此错误以安装插件?

--- JS stacktrace ---

FATAL ERROR: Ineffective mark-compacts near heap limit Allocation failed - JavaScript heap out of memory
 1: 0xb00e10 node::Abort() [ember]
 2: 0xa1823b node::FatalError(char const*, char const*) [ember]
 3: 0xcee09e v8::Utils::ReportOOMFailure(v8::internal::Isolate*, char const*, bool) [ember]
 4: 0xcee417 v8::internal::V8::FatalProcessOutOfMemory(v8::internal::Isolate*, char const*, bool) [ember]
 5: 0xea65d5  [ember]
 6: 0xea70b6  [ember]
 7: 0xeb4fee  [ember]
 8: 0xeb5a30 v8::internal::Heap::CollectGarbage(v8::internal::AllocationSpace, v8::internal::GarbageCollectionReason, v8::GCCallbackFlags) [ember]
 9: 0xeb89ae v8::internal::Heap::AllocateRawWithRetryOrFailSlowPath(int, v8::internal::AllocationType, v8::internal::AllocationOrigin, v8::internal::AllocationAlignment) [ember]
10: 0xe79b12 v8::internal::Factory::AllocateRaw(int, v8::internal::AllocationType, v8::internal::AllocationAlignment) [ember]
11: 0xe7443c v8::internal::FactoryBase<v8::internal::Factory>::AllocateRawArray(int, v8::internal::AllocationType) [ember]
12: 0xe74515 v8::internal::FactoryBase<v8::internal::Factory>::NewFixedArrayWithFiller(v8::internal::Handle<v8::internal::Map>, int, v8::internal::Handle<v8::internal::Oddball>, v8::internal::AllocationType) [ember]
13: 0x10d2afd v8::internal::Handle<v8::internal::NumberDictionary> v8::internal::HashTable<v8::internal::NumberDictionary, v8::internal::NumberDictionaryShape>::New<v8::internal::Isolate>(v8::internal::Isolate*, int, v8::internal::AllocationType, v8::internal::MinimumCapacity) [ember]
14: 0xd53916 v8::internal::Builtin_ArrayConcat(int, unsigned long*, v8::internal::Isolate*) [ember]
15: 0x15e7dd9  [ember]
Aborted (core dumped)
error Command failed with exit code 134.
Error running ember build
I, [2022-02-07T04:26:54.469601 #1]  INFO -- : yarn run v1.22.17
$ /var/www/discourse/app/assets/javascripts/node_modules/.bin/ember build -prod
WARNING: Node v16.13.2 is not tested against Ember CLI on your platform. We recommend that you use the most-recent "Active LTS" version of Node.js. See https://git.io/v7S5n for details.
DEPRECATION: The integration of jQuery into Ember has been deprecated and will be removed with Ember 4.0. You can either opt-out of using jQuery, or install the `@ember/jquery` addon to provide the jQuery integration. Please consult the deprecation guide for further details: https://emberjs.com/deprecations/v3.x#toc_jquery-apis
Environment: production
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.

I, [2022-02-07T04:26:54.503554 #1]  INFO -- : Terminating async processes
I, [2022-02-07T04:26:54.505728 #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-02-07T04:26:54.508010 #1]  INFO -- : Sending TERM to exec chpst -u redis -U redis /usr/bin/redis-server /etc/redis/redis.conf pid: 103
103:signal-handler (1644208014) Received SIGTERM scheduling shutdown...
2022-02-07 04:26:54.510 UTC [42] LOG:  received fast shutdown request
2022-02-07 04:26:54.517 UTC [42] LOG:  aborting any active transactions
2022-02-07 04:26:54.532 UTC [42] LOG:  background worker "logical replication launcher" (PID 51) exited with exit code 1
2022-02-07 04:26:54.534 UTC [46] LOG:  shutting down
103:M 07 Feb 2022 04:26:54.565 # User requested shutdown...
103:M 07 Feb 2022 04:26:54.565 * Saving the final RDB snapshot before exiting.
2022-02-07 04:26:54.569 UTC [42] LOG:  database system is shut down
103:M 07 Feb 2022 04:26:54.678 * DB saved on disk
103:M 07 Feb 2022 04:26:54.678 # Redis is now ready to exit, bye bye...

FAILED
--------------------
Pups::ExecError: cd /var/www/discourse &amp;&amp; su discourse -c 'bundle exec rake themes:update assets:precompile' failed with return #<Process::Status: pid 1116 exit 1>
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'"]}
a1604b58388b06dbcfbad098806d3fece924a8fdef43e77cd037d5cc3f65fdb3
** 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 个赞

在安装此插件之前,您是否启用了 HTTPS?

1 个赞

是的,当然,我已按照此说明安装了 Discourse:https://github.com/discourse/discourse/blob/main/docs/install-cloud.md

1 个赞

您有多少内存和交换空间?

1 个赞

如何查看?我非常不擅长使用 Docker 的终端命令。
我的服务器是 Ubuntu 20.04, 1024 MB, 1 CPU

1 个赞

这个。

如今这可能还不够。尝试将其调整为更大的尺寸。如果磁盘大小不变,那么之后总可以将其缩小(假设使用的是 DigitalOcean 等平台)。

3 个赞

我昨天尝试在一个 1GB 的 DO 实例上启动一个新的测试站点,结果遇到了同样的错误。将实例大小调整到 2GB 后再次尝试,对我来说是有效的。:+1:

2 个赞

谢谢!

也许 Discourse 会在安装说明中移除这一行。

因为 Discourse 在使用 1 GB RAM 时会出现此错误。

默认的 1 GB RAM 对于小型 Discourse 社区来说运行良好。我们建议大型社区使用 2 GB RAM。

您这台1GB的服务器有2GB的交换空间在运行吗?

@RedBear 尝试现在重建

1 个赞

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