こんにちは!
Ubuntu 18.04 サーバーに Apache がインストールされた環境で Discourse をインストールしようとしています。別のポートで Discourse を実行し、Apache を経由してリバースプロキシを設定して URL からアクセスできるようにしたいと考えています。app.yml を作成して設定を変更した後、./launcher rebuild appを実行しましたが、すべて順調に進むものの、最後に「Failed」というエラーが発生しました。エラー内容は以下の通りです:
FAILED
Pups::ExecError: cd /var/www/discourse && su discourse -c ‘bundle exec rake themes:update assets:precompile’ failed with return #<Process::Status: pid 3801 exit 134>
Location of failure: /pups/lib/pups/exec_command.rb:112:in `spawn’
exec failed with the params {“cd”=>“$home”, “hook”=>“assets_precompile”, “cmd”=>[“su discourse -c ‘bundle exec rake themes:update assets:precompile’”]}
2beda643ff51279f145c96cdede83a1d6b65f67e00225be74100c8fb9fe3f790
** FAILED TO BOOTSTRAP ** 上記のメッセージより上をスクロールして、より早期のエラーメッセージを確認してください。複数のエラーが存在する可能性があります。
./discourse-doctor で問題の特定に役立つ場合があります。
discourse-doctor を試してみましたが、何もヒントを得られませんでした。この問題を解決する方法をご存知でしょうか?また、Apache の方が使いやすく、経験も豊富であるため、Nginx への切り替えは選択肢として考えていません。
失敗したセクションより前のログの一部を以下に示します:
MaxMind IP データベースの更新にはライセンスが必要です
https://www.maxmind.com で生成したライセンスキーを DISCOURSE_MAXMIND_LICENSE_KEY に設定してください
MaxMind IP データベースの更新にはライセンスが必要です
https://www.maxmind.com で生成したライセンスキーを DISCOURSE_MAXMIND_LICENSE_KEY に設定してください
98765.375844045 Compressing: vendor-9297d3b5d396b76cde3e1a19c960cf10c5edf8be99b1f5aeff21012e3ae57a34.js
terser ‘/var/www/discourse/public/assets/_vendor-9297d3b5d396b76cde3e1a19c960cf10c5edf8be99b1f5aeff21012e3ae57a34.js’ -m -c -o ‘/var/www/discourse/public/assets/vendor-9297d3b5d396b76cde3e1a19c960cf10c5edf8be99b1f5aeff21012e3ae57a34.js’ --source-map “base=‘/var/www/discourse/public/assets’,root=‘/assets’,url=‘/assets/vendor-9297d3b5d396b76cde3e1a19c960cf10c5edf8be99b1f5aeff21012e3ae57a34.js.map’”
<— Last few GCs —[3798:0x4872980] 2679 ms: Scavenge 108.1 (126.5) → 97.8 (129.8) MB, 9.0 / 0.0 ms (average mu = 1.000, current mu = 1.000) allocation failure
[3798:0x4872980] 2823 ms: Scavenge 111.4 (129.8) → 101.3 (132.8) MB, 8.4 / 0.0 ms (average mu = 1.000, current mu = 1.000) allocation failure
[3798:0x4872980] 2964 ms: Scavenge 114.8 (133.0) → 104.8 (135.3) MB, 32.7 / 0.0 ms (average mu = 1.000, current mu = 1.000) allocation failure<— JS stacktrace —
FATAL ERROR: NewSpace::Rebalance Allocation failed - JavaScript heap out of memory
1: 0xa89e60 node::Abort() [node]
2: 0x9ade29 node::FatalError(char const*, char const*) [node]
3: 0xc7583e v8::Utils::ReportOOMFailure(v8::internal::Isolate*, char const*, bool) [node]
4: 0xc75bb7 v8::internal::V8::FatalProcessOutOfMemory(v8::internal::Isolate*, char const*, bool) [node]
5: 0xe3f6d5 [node]
6: 0xe7ec67 [node]
7: 0xe90b11 v8::internal::MarkCompactCollector::CollectGarbage() [node]
8: 0xe4c9d8 v8::internal::Heap::MarkCompact() [node]
9: 0xe4e368 v8::internal::Heap::CollectGarbage(v8::internal::AllocationSpace, v8::internal::GarbageCollectionReason, v8::GCCallbackFlags) [node]
10: 0xe5190c v8::internal::Heap::AllocateRawWithRetryOrFailSlowPath(int, v8::internal::AllocationType, v8::internal::AllocationOrigin, v8::internal::AllocationAlignment) [node]
11: 0xe157da v8::internal::NewFillerObject(int, bool, v8::internal::AllocationType, v8::internal::AllocationOrigin) [node]
12: 0x116d5e8 v8::internal::Runtime_AllocateInOldGeneration(int, unsigned long*, v8::internal::Isolate*) [node]
13: 0x15045f9 [node]
Aborted (core dumped)
rake aborted!
Errno::ENOENT: No such file or directory @ rb_file_s_size - /var/www/discourse/public/assets/vendor-9297d3b5d396b76cde3e1a19c960cf10c5edf8be99b1f5aeff21012e3ae57a34.js
/var/www/discourse/lib/tasks/assets.rake:293:insize' /var/www/discourse/lib/tasks/assets.rake:293:inblock (4 levels) in ’
/var/www/discourse/lib/tasks/assets.rake:182:inblock in concurrent?' /var/www/discourse/lib/tasks/assets.rake:284:inblock (3 levels) in ’
/var/www/discourse/lib/tasks/assets.rake:273:ineach' /var/www/discourse/lib/tasks/assets.rake:273:inblock (2 levels) in ’
/var/www/discourse/lib/tasks/assets.rake:182:inconcurrent?' /var/www/discourse/lib/tasks/assets.rake:270:inblock in ’
/var/www/discourse/vendor/bundle/ruby/2.7.0/gems/rake-13.0.6/exe/rake:27:in<top (required)>' /usr/local/bin/bundle:23:inload’
/usr/local/bin/bundle:23:in `’
Tasks: TOP => assets:precompile
(See full trace by running task with --trace)
I, [2021-07-21T16:25:26.467914 #1] INFO – : Downloading MaxMindDB…
Compressing Javascript and Generating Source MapsI, [2021-07-21T16:25:26.469702 #1] INFO – : Terminating async processes
I, [2021-07-21T16:25:26.469947 #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: 56
I, [2021-07-21T16:25:26.470157 #1] INFO – : Sending TERM to exec chpst -u redis -U redis /usr/bin/redis-server /etc/redis/redis.conf pid: 174
2021-07-21 16:25:26.470 UTC [56] LOG: received fast shutdown request
174:signal-handler (1626884726) Received SIGTERM scheduling shutdown…
2021-07-21 16:25:26.473 UTC [56] LOG: aborting any active transactions
174:M 21 Jul 2021 16:25:26.473 # User requested shutdown…
174:M 21 Jul 2021 16:25:26.474 * Saving the final RDB snapshot before exiting.
2021-07-21 16:25:26.479 UTC [56] LOG: background worker “logical replication launcher” (PID 65) exited with exit code 1
174:M 21 Jul 2021 16:25:26.480 * DB saved on disk
2021-07-21 16:25:26.480 UTC [60] LOG: shutting down
174:M 21 Jul 2021 16:25:26.480 # Redis is now ready to exit, bye bye…
2021-07-21 16:25:26.515 UTC [56] LOG: database system is shut down
よろしくお願いいたします、
Kian