Rebuild app fails due to "a" plugin - help locate plugin needed


(Paul Dorneanu) #1

Hello!

Issue no. 1 - rebuild fails due to some plugin
It is not the first time when I have issues rebuilding the app.

It seems that the rebuild process is caused by a plugin, but frankly, not sure which one it is. I tried loocking into the

Since last time discourse was working was trying to add a new plugin. Meanwhile an upgrade was done.
Now, it does not even works with the plugins I had before the last update/upgrade.

It is always something like this:

Compressing: vendor-20c2f328b5abb11fe184c1b75687e13d2b1ecc3ef8c7a3340da616da2acb03bb.js
uglifyjs '/var/www/discourse/public/assets/_vendor-20c2f328b5abb11fe184c1b75687e13d2b1ecc3ef8c7a3340da616da2acb03bb.js' -p relative -c -m -o '/var/www/discourse/public/assets/vendor-20c2f328b5abb11fe184c1b75687e13d2b1ecc3ef8c7a3340da616da2acb03bb.js' --source-map-root '/assets' --source-map '/var/www/discourse/public/assets/vendor-20c2f328b5abb11fe184c1b75687e13d2b1ecc3ef8c7a3340da616da2acb03bb.js.map' --source-map-url '/assets/vendor-20c2f328b5abb11fe184c1b75687e13d2b1ecc3ef8c7a3340da616da2acb03bb.js.map'
gzip -f -c -9 /var/www/discourse/public/assets/vendor-20c2f328b5abb11fe184c1b75687e13d2b1ecc3ef8c7a3340da616da2acb03bb.js > /var/www/discourse/public/assets/vendor-20c2f328b5abb11fe184c1b75687e13d2b1ecc3ef8c7a3340da616da2acb03bb.js.gz

brotli --quality=11 /var/www/discourse/public/assets/vendor-20c2f328b5abb11fe184c1b75687e13d2b1ecc3ef8c7a3340da616da2acb03bb.js --output=/var/www/discourse/public/assets/vendor-20c2f328b5abb11fe184c1b75687e13d2b1ecc3ef8c7a3340da616da2acb03bb.js.br


Compressing: admin-21c2e0c4ab08f6015fcaf54452a54b8e7442406dbd4739405fb2f8ce31fa6a7b.js
uglifyjs '/var/www/discourse/public/assets/_admin-21c2e0c4ab08f6015fcaf54452a54b8e7442406dbd4739405fb2f8ce31fa6a7b.js' -p relative -c -m -o '/var/www/discourse/public/assets/admin-21c2e0c4ab08f6015fcaf54452a54b8e7442406dbd4739405fb2f8ce31fa6a7b.js' --source-map-root '/assets' --source-map '/var/www/discourse/public/assets/admin-21c2e0c4ab08f6015fcaf54452a54b8e7442406dbd4739405fb2f8ce31fa6a7b.js.map' --source-map-url '/assets/admin-21c2e0c4ab08f6015fcaf54452a54b8e7442406dbd4739405fb2f8ce31fa6a7b.js.map'
gzip -f -c -9 /var/www/discourse/public/assets/admin-21c2e0c4ab08f6015fcaf54452a54b8e7442406dbd4739405fb2f8ce31fa6a7b.js > /var/www/discourse/public/assets/admin-21c2e0c4ab08f6015fcaf54452a54b8e7442406dbd4739405fb2f8ce31fa6a7b.js.gz

brotli --quality=11 /var/www/discourse/public/assets/admin-21c2e0c4ab08f6015fcaf54452a54b8e7442406dbd4739405fb2f8ce31fa6a7b.js --output=/var/www/discourse/public/assets/admin-21c2e0c4ab08f6015fcaf54452a54b8e7442406dbd4739405fb2f8ce31fa6a7b.js.br


Compressing: preload-store-ec90ffab9d7a6d9e507dda7cf7343e9d50b8bce624f7f44486ac8fd6b9814309.js
uglifyjs '/var/www/discourse/public/assets/_preload-store-ec90ffab9d7a6d9e507dda7cf7343e9d50b8bce624f7f44486ac8fd6b9814309.js' -p relative -c -m -o '/var/www/discourse/public/assets/preload-store-ec90ffab9d7a6d9e507dda7cf7343e9d50b8bce624f7f44486ac8fd6b9814309.js' --source-map-root '/assets' --source-map '/var/www/discourse/public/assets/preload-store-ec90ffab9d7a6d9e507dda7cf7343e9d50b8bce624f7f44486ac8fd6b9814309.js.map' --source-map-url '/assets/preload-store-ec90ffab9d7a6d9e507dda7cf7343e9d50b8bce624f7f44486ac8fd6b9814309.js.map'
gzip -f -c -9 /var/www/discourse/public/assets/preload-store-ec90ffab9d7a6d9e507dda7cf7343e9d50b8bce624f7f44486ac8fd6b9814309.js > /var/www/discourse/public/assets/preload-store-ec90ffab9d7a6d9e507dda7cf7343e9d50b8bce624f7f44486ac8fd6b9814309.js.gz

brotli --quality=11 /var/www/discourse/public/assets/preload-store-ec90ffab9d7a6d9e507dda7cf7343e9d50b8bce624f7f44486ac8fd6b9814309.js --output=/var/www/discourse/public/assets/preload-store-ec90ffab9d7a6d9e507dda7cf7343e9d50b8bce624f7f44486ac8fd6b9814309.js.br


Compressing: browser-update-f57286e74ddbc53aa899689b01ef467078911e4138050c561939955849af35dd.js
uglifyjs '/var/www/discourse/public/assets/_browser-update-f57286e74ddbc53aa899689b01ef467078911e4138050c561939955849af35dd.js' -p relative -c -m -o '/var/www/discourse/public/assets/browser-update-f57286e74ddbc53aa899689b01ef467078911e4138050c561939955849af35dd.js' --source-map-root '/assets' --source-map '/var/www/discourse/public/assets/browser-update-f57286e74ddbc53aa899689b01ef467078911e4138050c561939955849af35dd.js.map' --source-map-url '/assets/browser-update-f57286e74ddbc53aa899689b01ef467078911e4138050c561939955849af35dd.js.map'
gzip -f -c -9 /var/www/discourse/public/assets/browser-update-f57286e74ddbc53aa899689b01ef467078911e4138050c561939955849af35dd.js > /var/www/discourse/public/assets/browser-update-f57286e74ddbc53aa899689b01ef467078911e4138050c561939955849af35dd.js.gz

brotli --quality=11 /var/www/discourse/public/assets/browser-update-f57286e74ddbc53aa899689b01ef467078911e4138050c561939955849af35dd.js --output=/var/www/discourse/public/assets/browser-update-f57286e74ddbc53aa899689b01ef467078911e4138050c561939955849af35dd.js.br


Compressing: break_string-cc617154cd957804f2f6a1f3bc68258c9cdca3d4b9a322bf777d145fed04790e.js
uglifyjs '/var/www/discourse/public/assets/_break_string-cc617154cd957804f2f6a1f3bc68258c9cdca3d4b9a322bf777d145fed04790e.js' -p relative -c -m -o '/var/www/discourse/public/assets/break_string-cc617154cd957804f2f6a1f3bc68258c9cdca3d4b9a322bf777d145fed04790e.js' --source-map-root '/assets' --source-map '/var/www/discourse/public/assets/break_string-cc617154cd957804f2f6a1f3bc68258c9cdca3d4b9a322bf777d145fed04790e.js.map' --source-map-url '/assets/break_string-cc617154cd957804f2f6a1f3bc68258c9cdca3d4b9a322bf777d145fed04790e.js.map'
gzip -f -c -9 /var/www/discourse/public/assets/break_string-cc617154cd957804f2f6a1f3bc68258c9cdca3d4b9a322bf777d145fed04790e.js > /var/www/discourse/public/assets/break_string-cc617154cd957804f2f6a1f3bc68258c9cdca3d4b9a322bf777d145fed04790e.js.gz

brotli --quality=11 /var/www/discourse/public/assets/break_string-cc617154cd957804f2f6a1f3bc68258c9cdca3d4b9a322bf777d145fed04790e.js --output=/var/www/discourse/public/assets/break_string-cc617154cd957804f2f6a1f3bc68258c9cdca3d4b9a322bf777d145fed04790e.js.br


Compressing: ember_jquery-27e777857b8c0730dacfe09cb11711365d21a5db4f9ee0b85d494e4259cf6cda.js
uglifyjs '/var/www/discourse/public/assets/_ember_jquery-27e777857b8c0730dacfe09cb11711365d21a5db4f9ee0b85d494e4259cf6cda.js' -p relative -c -m -o '/var/www/discourse/public/assets/ember_jquery-27e777857b8c0730dacfe09cb11711365d21a5db4f9ee0b85d494e4259cf6cda.js' --source-map-root '/assets' --source-map '/var/www/discourse/public/assets/ember_jquery-27e777857b8c0730dacfe09cb11711365d21a5db4f9ee0b85d494e4259cf6cda.js.map' --source-map-url '/assets/ember_jquery-27e777857b8c0730dacfe09cb11711365d21a5db4f9ee0b85d494e4259cf6cda.js.map'
gzip -f -c -9 /var/www/discourse/public/assets/ember_jquery-27e777857b8c0730dacfe09cb11711365d21a5db4f9ee0b85d494e4259cf6cda.js > /var/www/discourse/public/assets/ember_jquery-27e777857b8c0730dacfe09cb11711365d21a5db4f9ee0b85d494e4259cf6cda.js.gz

brotli --quality=11 /var/www/discourse/public/assets/ember_jquery-27e777857b8c0730dacfe09cb11711365d21a5db4f9ee0b85d494e4259cf6cda.js --output=/var/www/discourse/public/assets/ember_jquery-27e777857b8c0730dacfe09cb11711365d21a5db4f9ee0b85d494e4259cf6cda.js.br


Compressing: pretty-text-bundle-cacf6e68fbea63bd19c98cb4c3e2c394c74ba69187d3e7b15be4072beabd9526.js
uglifyjs '/var/www/discourse/public/assets/_pretty-text-bundle-cacf6e68fbea63bd19c98cb4c3e2c394c74ba69187d3e7b15be4072beabd9526.js' -p relative -c -m -o '/var/www/discourse/public/assets/pretty-text-bundle-cacf6e68fbea63bd19c98cb4c3e2c394c74ba69187d3e7b15be4072beabd9526.js' --source-map-root '/assets' --source-map '/var/www/discourse/public/assets/pretty-text-bundle-cacf6e68fbea63bd19c98cb4c3e2c394c74ba69187d3e7b15be4072beabd9526.js.map' --source-map-url '/assets/pretty-text-bundle-cacf6e68fbea63bd19c98cb4c3e2c394c74ba69187d3e7b15be4072beabd9526.js.map'
gzip -f -c -9 /var/www/discourse/public/assets/pretty-text-bundle-cacf6e68fbea63bd19c98cb4c3e2c394c74ba69187d3e7b15be4072beabd9526.js > /var/www/discourse/public/assets/pretty-text-bundle-cacf6e68fbea63bd19c98cb4c3e2c394c74ba69187d3e7b15be4072beabd9526.js.gz

brotli --quality=11 /var/www/discourse/public/assets/pretty-text-bundle-cacf6e68fbea63bd19c98cb4c3e2c394c74ba69187d3e7b15be4072beabd9526.js --output=/var/www/discourse/public/assets/pretty-text-bundle-cacf6e68fbea63bd19c98cb4c3e2c394c74ba69187d3e7b15be4072beabd9526.js.br


Compressing: wizard-application-ad20bb51507113eb970080ec5a286f934d8c60cb91c8e335c4d84389c6f0328c.js
uglifyjs '/var/www/discourse/public/assets/_wizard-application-ad20bb51507113eb970080ec5a286f934d8c60cb91c8e335c4d84389c6f0328c.js' -p relative -c -m -o '/var/www/discourse/public/assets/wizard-application-ad20bb51507113eb970080ec5a286f934d8c60cb91c8e335c4d84389c6f0328c.js' --source-map-root '/assets' --source-map '/var/www/discourse/public/assets/wizard-application-ad20bb51507113eb970080ec5a286f934d8c60cb91c8e335c4d84389c6f0328c.js.map' --source-map-url '/assets/wizard-application-ad20bb51507113eb970080ec5a286f934d8c60cb91c8e335c4d84389c6f0328c.js.map'
gzip -f -c -9 /var/www/discourse/public/assets/wizard-application-ad20bb51507113eb970080ec5a286f934d8c60cb91c8e335c4d84389c6f0328c.js > /var/www/discourse/public/assets/wizard-application-ad20bb51507113eb970080ec5a286f934d8c60cb91c8e335c4d84389c6f0328c.js.gz

brotli --quality=11 /var/www/discourse/public/assets/wizard-application-ad20bb51507113eb970080ec5a286f934d8c60cb91c8e335c4d84389c6f0328c.js --output=/var/www/discourse/public/assets/wizard-application-ad20bb51507113eb970080ec5a286f934d8c60cb91c8e335c4d84389c6f0328c.js.br


Compressing: wizard-vendor-de512c6b1fa732a99b50846017a00cbd8ba8a0392a2bce350e8476a83fa1ccb5.js
uglifyjs '/var/www/discourse/public/assets/_wizard-vendor-de512c6b1fa732a99b50846017a00cbd8ba8a0392a2bce350e8476a83fa1ccb5.js' -p relative -c -m -o '/var/www/discourse/public/assets/wizard-vendor-de512c6b1fa732a99b50846017a00cbd8ba8a0392a2bce350e8476a83fa1ccb5.js' --source-map-root '/assets' --source-map '/var/www/discourse/public/assets/wizard-vendor-de512c6b1fa732a99b50846017a00cbd8ba8a0392a2bce350e8476a83fa1ccb5.js.map' --source-map-url '/assets/wizard-vendor-de512c6b1fa732a99b50846017a00cbd8ba8a0392a2bce350e8476a83fa1ccb5.js.map'
gzip -f -c -9 /var/www/discourse/public/assets/wizard-vendor-de512c6b1fa732a99b50846017a00cbd8ba8a0392a2bce350e8476a83fa1ccb5.js > /var/www/discourse/public/assets/wizard-vendor-de512c6b1fa732a99b50846017a00cbd8ba8a0392a2bce350e8476a83fa1ccb5.js.gz

brotli --quality=11 /var/www/discourse/public/assets/wizard-vendor-de512c6b1fa732a99b50846017a00cbd8ba8a0392a2bce350e8476a83fa1ccb5.js --output=/var/www/discourse/public/assets/wizard-vendor-de512c6b1fa732a99b50846017a00cbd8ba8a0392a2bce350e8476a83fa1ccb5.js.br


Compressing: plugin-884461664fd9d3b63039b030514153a9eaa19eaf50fd0ed5e1c39bc03515ea38.js
uglifyjs '/var/www/discourse/public/assets/_plugin-884461664fd9d3b63039b030514153a9eaa19eaf50fd0ed5e1c39bc03515ea38.js' -p relative -c -m -o '/var/www/discourse/public/assets/plugin-884461664fd9d3b63039b030514153a9eaa19eaf50fd0ed5e1c39bc03515ea38.js' --source-map-root '/assets' --source-map '/var/www/discourse/public/assets/plugin-884461664fd9d3b63039b030514153a9eaa19eaf50fd0ed5e1c39bc03515ea38.js.map' --source-map-url '/assets/plugin-884461664fd9d3b63039b030514153a9eaa19eaf50fd0ed5e1c39bc03515ea38.js.map'
gzip -f -c -9 /var/www/discourse/public/assets/plugin-884461664fd9d3b63039b030514153a9eaa19eaf50fd0ed5e1c39bc03515ea38.js > /var/www/discourse/public/assets/plugin-884461664fd9d3b63039b030514153a9eaa19eaf50fd0ed5e1c39bc03515ea38.js.gz

brotli --quality=11 /var/www/discourse/public/assets/plugin-884461664fd9d3b63039b030514153a9eaa19eaf50fd0ed5e1c39bc03515ea38.js --output=/var/www/discourse/public/assets/plugin-884461664fd9d3b63039b030514153a9eaa19eaf50fd0ed5e1c39bc03515ea38.js.br


Compressing: plugin-third-party-fd030c5fcde57d0ed99c957f6a83da12416e735dc2c5df41768243b7912e29a9.js
uglifyjs '/var/www/discourse/public/assets/_plugin-third-party-fd030c5fcde57d0ed99c957f6a83da12416e735dc2c5df41768243b7912e29a9.js' -p relative -c -m -o '/var/www/discourse/public/assets/plugin-third-party-fd030c5fcde57d0ed99c957f6a83da12416e735dc2c5df41768243b7912e29a9.js' --source-map-root '/assets' --source-map '/var/www/discourse/public/assets/plugin-third-party-fd030c5fcde57d0ed99c957f6a83da12416e735dc2c5df41768243b7912e29a9.js.map' --source-map-url '/assets/plugin-third-party-fd030c5fcde57d0ed99c957f6a83da12416e735dc2c5df41768243b7912e29a9.js.map'
Parse error at _plugin-third-party-fd030c5fcde57d0ed99c957f6a83da12416e735dc2c5df41768243b7912e29a9.js:4936,23
    this.onload = () => {
                   ^
SyntaxError: Unexpected token: punc ())
at JS_Parse_Error.get (eval at <anonymous> (/usr/lib/node_modules/uglify-js/tools/node.js:27:1), <anonymous>:86:23)
at /usr/lib/node_modules/uglify-js/bin/uglifyjs:384:40
at time_it (/usr/lib/node_modules/uglify-js/bin/uglifyjs:620:15)
at /usr/lib/node_modules/uglify-js/bin/uglifyjs:345:9
at FSReqWrap.readFileAfterClose [as oncomplete] (fs.js:511:3)
I, [2018-04-16T10:19:36.659222 #14]  INFO -- : Purging temp files
Bundling assets
Compressing Javascript and Generating Source Maps

I, [2018-04-16T10:19:36.660592 #14]  INFO -- : Terminating async processes
I, [2018-04-16T10:19:36.660689 #14]  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/10/bin/postmaster -D /etc/postgresql/10/main pid: 45
I, [2018-04-16T10:19:36.660919 #14]  INFO -- : Sending TERM to exec chpst -u redis -U redis /usr/bin/redis-server /etc/redis/redis.conf pid: 161
2018-04-16 10:19:36.661 UTC [45] LOG:  received fast shutdown request
2018-04-16 10:19:41.338 UTC [45] LOG:  aborting any active transactions
2018-04-16 10:19:41.342 UTC [45] LOG:  worker process: logical replication launcher (PID 54) exited with exit code 1
2018-04-16 10:19:41.351 UTC [49] LOG:  shutting down
2018-04-16 10:19:43.168 UTC [45] LOG:  database system is shut down
161:signal-handler (1523873976) Received SIGTERM scheduling shutdown...
161:M 16 Apr 10:19:36.710 # User requested shutdown...
161:M 16 Apr 10:19:36.711 * Saving the final RDB snapshot before exiting.
161:M 16 Apr 10:19:42.043 * DB saved on disk
161:M 16 Apr 10:19:42.043 # Redis is now ready to exit, bye bye...


FAILED
--------------------
Pups::ExecError: cd /var/www/discourse && su discourse -c 'bundle exec rake assets:precompile' failed with return #<Process::Status: pid 710 exit 1>
Location of failure: /pups/lib/pups/exec_command.rb:108:in `spawn'
exec failed with the params {"cd"=>"$home", "hook"=>"bundle_exec", "cmd"=>["su discourse -c 'bundle install --deployment --verbose --without test --without development --retry 3 --jobs 4'", "su discourse -c 'bundle exec rake db:migrate'", "su discourse -c 'bundle exec rake assets:precompile'"]}
f9c50d43741fdbc13158aa93f441d5e79930c4ef32c5f1f453e8f43d1a242d56
** FAILED TO BOOTSTRAP ** please scroll up and look for earlier error messages, there may be more than one

Need your help to know what plugin is causing the problem.

My list of plugins are as follows:

Plugins go here

see https://meta.discourse.org/t/19157 for details

hooks:
after_code:
- exec:
cd: $home/plugins
cmd:
- git clone https://github.com/discourse/docker_manager.git
- git clone https://github.com/davidtaylorhq/discourse-telegram-notifications.git
- git clone https://github.com/discourse/discourse-push-notifications.git
- git clone https://github.com/discourse/discourse-spoiler-alert.git
- git clone https://github.com/discourse/twitter-profile-link.git
- git clone https://github.com/discourse/discourse-tooltips.git
- git clone https://github.com/angusmcleod/discourse-locations.git
- git clone https://github.com/angusmcleod/discourse-events.git
- git clone https://github.com/angusmcleod/discourse-ratings.git
- git clone https://github.com/davidtaylorhq/discourse-whos-online.git
- git clone https://github.com/crob611/discourse-image-gallery.git
- git clone https://github.com/angusmcleod/discourse-quick-messages.git
- git clone https://github.com/rux-pizza/discourse-awesome-bbcodes.git
/# - git clone https://github.com/angusmcleod/discourse-topic-previews.git
/# - git clone https://github.com/vinkashq/discourse-autobot.git
/# - git clone https://github.com/discoursehosting/discourse-adsense.git
/# - git clone https://github.com/angusmcleod/discourse-layouts.git
/# - git clone https://github.com/discourse/discourse-canned-replies.git
/# - git clone https://github.com/angusmcleod/discourse-header-search.git
/# - git clone https://github.com/discourse/discourse-chat-integration.git

I have added a / in front of the # because of the formating in this post.

So, the error above is for this app.yml
I am going to comment out discourse-awesome-bbcodes, even though this plugin was compiled in the past, and try another rebuild. Meanwhile discourse is down, not loading (not sure why).

For me, trying to add a plugin is like winning the lottery. :smile:

PS I tried locating the file _plugin-third-party-fd030c5fcde57d0ed99c957f6a83da12416e735dc2c5df41768243b7912e29a9.js in /var/lib/docker/overlay2/************/diff/var/www/discourse/app/assests/
but never able to locate the file in the error after a fail.
the file just dissapears so can not look into it to see who it belongs to.
I have looked inside all JSs after that piece of code and can not locate that either.
So it is a bermuda triangle at this point and my only options it to try rebuilding the app after removing another plugin that worked for me in the past.

Any hint would be highly appreciated.

Thanks

Not to open another thread…

Issue no. 2 - Rebuild take a lot of time

Rebuild process spends a lot of time on chown… and by that I mean around a couple of hours.
What can I do to improve this? It is not an issue of resources or drive speed.

Issue no. 3 - Sometimes I get disconnected when rebuilding app, thus needing to restart.

This is a random issue, it seem… I am connected using putty to my server. In parallel I am running a second session to monitor resources, for example, using top.

Occasionally I get disconnected from the server… putty reports that the connection was reset. Strange is that it only happens sometime when rebuilding the app, but my second session where top runs never gets disconnected. Really, can not blame my connection. I ruled that out. So… it is possible that my pts/0 connection gets killed during the rebuild process? (I know, kind of weird… never happened to me… and I have not had a chance to dig through the system logs, but just asking maybe someone heard about a similar issue).

Thanks


(Daniela) #2

Until you install plugins that are not updated you will always have these problems

and

Start to eliminate these two, are plugins that are not updated for a while, I assume they are not even maintained anymore.


(Paul Dorneanu) #3

Thanks. Will try to eliminate discourse-image-gallery.

The rebuild failed without discourse-awesome-bbcodes plugin.

Right now it is rebuilding without discourse-quick-messages and after that will try without discourse-image-gallery. Thanks for the tip.


(Bart) #4

I recommend you use ‘screen’ - this will allow you to reconnect to your session:

https://kb.iu.edu/d/acuy


(Paul Dorneanu) #5

Totally forgot about it. Indeed, I used it like 20 years ago when the internet connections were poor. Will give it a try next time. Still… wondering, why do I get disconnected only when rebuild runs?


(Kane York) #6

You’re getting disconnected simply because it takes so long to do and your SSH server / client is set up to auto-disconnect after a long period without any user input.

Tapping the spacebar every few minutes would be enough.