Hi!
I am running an Ubuntu 18.04 server with Apache installed. I am wanting to install Discourse on a different port then use a reverse proxy via apache to make it accessible via a URL. I tried making an app.yml & changing the settings in there then ran: ./launcher rebuild app and everything goes well until the end where I get a ‘Failed’ error with this:
FAILED
Pups::ExecError: cd /var/www/discourse && su discourse -c ‘bundle exec rake themes:update assets:precompile’ failed w ith 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 t hemes:update assets:precompile’”]}
2beda643ff51279f145c96cdede83a1d6b65f67e00225be74100c8fb9fe3f790
** 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.
I tried using discourse-doctor but this told me nothing. Does anyone have a way to fix this? Also, I am using Apache as I find it easier to use and have more experience with Apache. So switching to Nginx isn’t an option.
Here is some logs from above the failed section:
MaxMind IP database updates require a license
Please set DISCOURSE_MAXMIND_LICENSE_KEY to one you generated at https://www.maxmind.com
MaxMind IP database updates require a license
Please set DISCOURSE_MAXMIND_LICENSE_KEY to one you generated at https://www.maxmind.com
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:in
block (4 levels) in ’
/var/www/discourse/lib/tasks/assets.rake:182:inblock in concurrent?' /var/www/discourse/lib/tasks/assets.rake:284:in
block (3 levels) in ’
/var/www/discourse/lib/tasks/assets.rake:273:ineach' /var/www/discourse/lib/tasks/assets.rake:273:in
block (2 levels) in ’
/var/www/discourse/lib/tasks/assets.rake:182:inconcurrent?' /var/www/discourse/lib/tasks/assets.rake:270:in
block 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:in
load’
/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
Thanks,
Kian