Impossibile aggiornare l'istanza di discourse al 15 febbraio 2022

L’aggiornamento da Commits · discourse/discourse · GitHub all’ultima versione ha causato il blocco del sito; ecco alcuni segmenti significativi dei log:

I, [2022-02-15T05:27:48.995821 #1]  INFO -- : Sostituzione di (?-mix:^host.*all.*all.*127.*$) con host all all 0.0.0.0/0 md5 in /etc/postgresql/13/main/pg_hba.conf
I, [2022-02-15T05:27:48.997476 #1]  INFO -- : Sostituzione di (?-mix:^host.*all.*all.*::1\/128.*$) con host all all ::/0 md5 in /etc/postgresql/13/main/pg_hba.conf
I, [2022-02-15T05:27:48.998553 #1]  INFO -- : > 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
I, [2022-02-15T05:27:49.003918 #1]  INFO -- : > sleep 5
2022-02-15 05:27:49.151 UTC [41] LOG:  avvio di PostgreSQL 13.5 (Debian 13.5-1.pgdg110+1) su x86_64-pc-linux-gnu, compilato con gcc (Debian 10.2.1-6) 10.2.1 20210110, 64-bit
2022-02-15 05:27:49.152 UTC [41] LOG:  in ascolto sull'indirizzo IPv4 "0.0.0.0", porta 5432
2022-02-15 05:27:49.152 UTC [41] LOG:  in ascolto sull'indirizzo IPv6 "::", porta 5432
2022-02-15 05:27:49.162 UTC [41] LOG:  in ascolto sulla socket Unix "/var/run/postgresql/.s.PGSQL.5432"
2022-02-15 05:27:49.184 UTC [44] LOG:  il sistema di database è stato arrestato alle 2022-02-15 00:12:32 UTC
2022-02-15 05:27:49.209 UTC [41] LOG:  il sistema di database è pronto ad accettare connessioni
I, [2022-02-15T05:27:54.013563 #1]  INFO -- : 
I, [2022-02-15T05:27:54.015179 #1]  INFO -- : > su postgres -c 'createdb discourse' || true
2022-02-15 05:27:54.259 UTC [54] postgres@postgres ERROR:  il database "discourse" esiste già
2022-02-15 05:27:54.259 UTC [54] postgres@postgres STATEMENT:  CREATE DATABASE discourse;
createdb: errore: creazione del database fallita: ERROR:  il database "discourse" esiste già
I, [2022-02-15T05:27:54.270626 #1]  INFO -- : 
I, [2022-02-15T05:27:54.272627 #1]  INFO -- : > su postgres -c 'psql discourse -c "create user discourse;"' || true
2022-02-15 05:27:54.425 UTC [58] postgres@discourse ERROR:  il ruolo "discourse" esiste già
2022-02-15 05:27:54.425 UTC [58] postgres@discourse STATEMENT:  create user discourse;
ERROR:  il ruolo "discourse" esiste già
I, [2022-02-15T05:27:54.431376 #1]  INFO -- : 
I, [2022-02-15T05:27:54.431915 #1]  INFO -- : > su postgres -c 'psql discourse -c "grant all privileges on database discourse to discourse;"' || true
I, [2022-02-15T05:27:54.533010 #1]  INFO -- : GRANT
I, [2022-02-15T05:27:55.303411 #1]  INFO -- : > echo redis installato
I, [2022-02-15T05:27:55.310858 #1]  INFO -- : redis installato

I, [2022-02-15T05:27:55.312551 #1]  INFO -- : > cat /etc/redis/redis.conf | grep logfile
I, [2022-02-15T05:27:55.323276 #1]  INFO -- : logfile ""

I, [2022-02-15T05:27:55.324362 #1]  INFO -- : > exec chpst -u redis -U redis /usr/bin/redis-server /etc/redis/redis.conf
I, [2022-02-15T05:27:55.329352 #1]  INFO -- : > sleep 10
102:C 15 Feb 2022 05:27:55.343 # oO0OoO0OoO0Oo Redis sta avviando oO0OoO0OoO0Oo
102:C 15 Feb 2022 05:27:55.343 # Versione Redis=6.2.6, bits=64, commit=00000000, modified=0, pid=102, appena avviato
102:C 15 Feb 2022 05:27:55.343 # Configurazione caricata
102:M 15 Feb 2022 05:27:55.346 * orologio monotono: POSIX clock_gettime
102:M 15 Feb 2022 05:27:55.349 * Modalità in esecuzione=standalone, porta=6379.
102:M 15 Feb 2022 05:27:55.350 # ATTENZIONE: L'impostazione del backlog TCP di 511 non può essere applicata perché /proc/sys/net/core/somaxconn è impostato sul valore inferiore di 128.
102:M 15 Feb 2022 05:27:55.350 # Server inizializzato
102:M 15 Feb 2022 05:27:55.350 # ATTENZIONE: overcommit_memory è impostato su 0! Il salvataggio in background potrebbe fallire in condizioni di bassa memoria. Per risolvere questo problema, aggiungi 'vm.overcommit_memory = 1' a /etc/sysctl.conf e poi riavvia o esegui il comando 'sysctl vm.overcommit_memory=1' affinché abbia effetto.
102:M 15 Feb 2022 05:27:55.352 * Caricamento RDB prodotto dalla versione 6.2.6
102:M 15 Feb 2022 05:27:55.352 * Età RDB 18923 secondi
102:M 15 Feb 2022 05:27:55.352 * Utilizzo memoria RDB al momento della creazione 133.51 Mb
102:M 15 Feb 2022 05:27:55.912 # Caricamento RDB completato, chiavi caricate: 7294, chiavi scadute: 127.
102:M 15 Feb 2022 05:27:55.912 * DB caricato dal disco: 0.560 secondi
102:M 15 Feb 2022 05:27:55.912 * Pronto ad accettare connessioni
I, [2022-02-15T05:28:05.336548 #1]  INFO -- : 
I, [2022-02-15T05:28:05.337696 #1]  INFO -- : > thpoff echo "thpoff è installato!"
I, [2022-02-15T05:28:05.349534 #1]  INFO -- : thpoff è installato!

I, [2022-02-15T05:28:05.349959 #1]  INFO -- : > /usr/local/bin/ruby -e 'if ENV["DISCOURSE_SMTP_ADDRESS"] == "smtp.example.com"; puts "Annullamento! La posta non è configurata!"; exit 1; end'
I, [2022-02-15T05:28:05.496038 #1]  INFO -- : 
I, [2022-02-15T05:28:05.496604 #1]  INFO -- : > /usr/local/bin/ruby -e 'if ENV["DISCOURSE_HOSTNAME"] == "discourse.example.com"; puts "Annullamento! Il dominio non è configurato!"; exit 1; end'
I, [2022-02-15T05:28:05.617847 #1]  INFO -- : 
I, [2022-02-15T05:28:05.618268 #1]  INFO -- : > /usr/local/bin/ruby -e 'if (ENV["DISCOURSE_CDN_URL"] || "")[0..1] == "//"; puts "Annullamento! Il CDN deve specificare un protocollo. Una volta corretto, dovresti rigenerare ora tutti i tuoi post per correggere tutti i post."; exit 1; end'
I, [2022-02-15T05:28:05.754370 #1]  INFO -- : 
I, [2022-02-15T05:28:05.755864 #1]  INFO -- : > rm -f /etc/cron.d/anacron
I, [2022-02-15T05:28:05.763371 #1]  INFO -- : 
I, [2022-02-15T05:28:05.773372 #1]  INFO -- : File > /etc/cron.d/anacron  chmod:   chown: 
I, [2022-02-15T05:28:05.785161 #1]  INFO -- : File > /etc/runit/1.d/copy-env  chmod: +x  chown: 
I, [2022-02-15T05:28:05.801026 #1]  INFO -- : File > /etc/service/unicorn/run  chmod: +x  chown: 
I, [2022-02-15T05:28:05.816469 #1]  INFO -- : File > /etc/service/nginx/run  chmod: +x  chown: 
I, [2022-02-15T05:28:05.828667 #1]  INFO -- : File > /etc/runit/3.d/01-nginx  chmod: +x  chown: 
I, [2022-02-15T05:28:05.841176 #1]  INFO -- : File > /etc/runit/3.d/02-unicorn  chmod: +x  chown: 
I, [2022-02-15T05:28:05.841464 #1]  INFO -- : Sostituzione di # postgres con sv start postgres || exit 1 in /etc/service/unicorn/run
I, [2022-02-15T05:28:05.842241 #1]  INFO -- : > exec chpst -u redis -U redis /usr/bin/redis-server /etc/redis/redis.conf
I, [2022-02-15T05:28:05.847862 #1]  INFO -- : > cd /var/www/discourse && git reset --hard
130:C 15 Feb 2022 05:28:05.853 # oO0OoO0OoO0Oo Redis sta avviando oO0OoO0OoO0Oo
130:C 15 Feb 2022 05:28:05.854 # Versione Redis=6.2.6, bits=64, commit=00000000, modified=0, pid=130, appena avviato
130:C 15 Feb 2022 05:28:05.855 # Configurazione caricata
130:M 15 Feb 2022 05:28:05.857 * orologio monotono: POSIX clock_gettime
130:M 15 Feb 2022 05:28:05.858 # Attenzione: Impossibile creare la socket TCP di ascolto del server *:6379: bind: Indirizzo già in uso
130:M 15 Feb 2022 05:28:05.859 # Errore nell'ascolto sulla porta 6379 (TCP), annullamento.
Aggiornamento file: 100% (30947/30947), completato.
I, [2022-02-15T05:28:13.624544 #1]  INFO -- : HEAD è ora su e1367cde I18N: Miglioramento dei messaggi di errore per le parole bloccate (#15741)
I, [2022-02-15T05:29:36.205328 #1]  INFO -- : > cd /var/www/discourse && [ ! -d 'node_modules' ] || su discourse -c 'yarn install --production && yarn cache clean'
warning Il campo di risoluzione "lodash@4.17.21" è incompatibile con la versione richiesta "lodash@4.17.15".
warning " > @mixer/parallel-prettier@2.0.1" ha una dipendenza peer non soddisfatta "prettier@^2.0.0".
I, [2022-02-15T05:33:01.692668 #1]  INFO -- : yarn install v1.22.17
[1/5] Validazione di package.json...
[2/5] Risoluzione dei pacchetti...
[3/5] Recupero dei pacchetti...
[4/5] Collegamento delle dipendenze...
[5/5] Creazione di nuovi pacchetti...
$ yarn --cwd app/assets/javascripts/discourse
yarn install v1.22.17
[1/4] Risoluzione dei pacchetti...
[2/4] Recupero dei pacchetti...
[3/4] Collegamento delle dipendenze...
[4/4] Creazione di nuovi pacchetti...
success File di lock salvato.
Completato in 133.99s.
Completato in 195.02s.
yarn cache v1.22.17
success Cache cancellata.
Completato in 9.35s.

I, [2022-02-15T05:33:01.697905 #1]  INFO -- : > cd /var/www/discourse && su discourse -c 'LOAD_PLUGINS=0 bundle exec rake plugin:pull_compatible_all'
I, [2022-02-15T05:33:12.324517 #1]  INFO -- : discourse-github è già all'ultima versione compatibile
discourse-solved è già all'ultima versione compatibile
discourse-chat è già all'ultima versione compatibile

I, [2022-02-15T05:33:12.325695 #1]  INFO -- : > cd /var/www/discourse && su discourse -c 'bundle exec rake db:migrate'
102:M 15 Feb 2022 05:33:37.418 * 100 modifiche in 300 secondi. Salvataggio...
102:M 15 Feb 2022 05:33:37.423 * Salvataggio in background avviato dal pid 1143
1143:C 15 Feb 2022 05:33:38.349 * DB salvato su disco
1143:C 15 Feb 2022 05:33:38.352 * RDB: 2 MB di memoria utilizzati da copy-on-write
102:M 15 Feb 2022 05:33:38.429 * Salvataggio in background terminato con successo
I, [2022-02-15T05:33:38.994811 #1]  INFO -- : gem install sawyer -v 0.8.2 -i /var/www/discourse/plugins/discourse-github/gems/2.7.5 --no-document --ignore-dependencies --no-user-install
Sawyer-0.8.2 installato con successo
1 gem installato
gem install octokit -v 4.21.0 -i /var/www/discourse/plugins/discourse-github/gems/2.7.5 --no-document --ignore-dependencies --no-user-install
Octokit-4.21.0 installato con successo
1 gem installato
== 20220214224506 ResetCustomEmojiPostBakesVersionSecureFix: in migrazione ========
== 20220214224506 ResetCustomEmojiPostBakesVersionSecureFix: migrato (0.0099s) 

== 20220214233625 AddBounceErrorCodeToEmailLog: in migrazione =====================
-- add_column(:email_logs, :bounce_error_code, :string, {:null=>true})
   -> 0.0103s
== 20220214233625 AddBounceErrorCodeToEmailLog: migrato (0.0121s) ============


I, [2022-02-15T05:33:38.996639 #1]  INFO -- : > cd /var/www/discourse && su discourse -c 'bundle exec rake themes:update assets:precompile'
- Creazione
- Creazione
- creazione... 
102:M 15 Feb 2022 05:38:39.069 * 100 modifiche in 300 secondi. Salvataggio...
102:M 15 Feb 2022 05:38:39.080 * Salvataggio in background avviato dal pid 1213
1213:C 15 Feb 2022 05:38:39.863 * DB salvato su disco
1213:C 15 Feb 2022 05:38:39.867 * RDB: 2 MB di memoria utilizzati da copy-on-write
102:M 15 Feb 2022 05:38:39.883 * Salvataggio in background terminato con successo
[WARN] (broccoli-terser-sourcemap) Minificazione di "assets/discourse.js" durata: 35001ms (più di 20.000ms)
Killed
errore Comando fallito con codice di uscita 137.
I, [2022-02-15T05:52:50.058283 #1]  INFO -- : yarn run v1.22.17
$ /var/www/discourse/app/assets/javascripts/node_modules/.bin/ember build -prod
ATTENZIONE: Node v16.13.2 non è stato testato con Ember CLI sulla tua piattaforma. Ti consigliamo di utilizzare la versione più recente "Active LTS" di Node.js. Consulta https://git.io/v7S5n per i dettagli.
DEPRECAZIONE: L'integrazione di jQuery in Ember è stata deprecata e verrà rimossa con Ember 4.0. Puoi scegliere di non utilizzare jQuery o installare l'addon `@ember/jquery` per fornire l'integrazione di jQuery. Consulta la guida alla deprecazione per ulteriori dettagli: https://emberjs.com/deprecations/v3.x#toc_jquery-apis
Ambiente: produzione
info Visita https://yarnpkg.com/en/docs/cli/run per la documentazione su questo comando.

I, [2022-02-15T05:52:50.072549 #1]  INFO -- : Terminazione dei processi asincroni
I, [2022-02-15T05:52:50.072816 #1]  INFO -- : Invio di INT a 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: 41
I, [2022-02-15T05:52:50.073275 #1]  INFO -- : Invio di TERM a exec chpst -u redis -U redis /usr/bin/redis-server /etc/redis/redis.conf pid: 102
102:signal-handler (1644904370) Ricevuto SIGTERM, pianificazione arresto...
2022-02-15 05:52:50.074 UTC [41] LOG:  ricevuto richiesta di arresto rapido
2022-02-15 05:52:50.090 UTC [41] LOG:  annullamento di tutte le transazioni attive
2022-02-15 05:52:50.096 UTC [41] LOG:  worker in background "logical replication launcher" (PID 50) uscito con codice di uscita 1
2022-02-15 05:52:50.102 UTC [45] LOG:  arresto in corso
102:M 15 Feb 2022 05:52:50.118 # Arresto richiesto dall'utente...
102:M 15 Feb 2022 05:52:50.120 * Salvataggio dell'ultimo snapshot RDB prima dell'uscita.
2022-02-15 05:52:50.248 UTC [41] LOG:  il sistema di database è arrestato
102:M 15 Feb 2022 05:52:51.075 * DB salvato su disco
102:M 15 Feb 2022 05:52:51.076 # Redis è ora pronto per uscire, arrivederci...


FALLITO
--------------------
Pups::ExecError: cd /var/www/discourse && su discourse -c 'bundle exec rake themes:update assets:precompile' fallito con return #<Process::Status: pid 1144 exit 137>
Posizione dell'errore: /usr/local/lib/ruby/gems/2.7.0/gems/pups-1.1.1/lib/pups/exec_command.rb:117:in `spawn'
exec fallito con i parametri {"cd"=>"$home", "hook"=>"assets_precompile", "cmd"=>["su discourse -c 'bundle exec rake themes:update assets:precompile'"]}
1716fd9590e21cdfdaccea0ac6faabd133a6423e1a24ef3b3b5be0e68ce422c9
** FALLITO L'AVVIO ** si prega di scorrere verso l'alto e cercare messaggi di errore precedenti, potrebbero essercene più di uno.
./discourse-doctor potrebbe aiutare a diagnosticare il problema.

Eseguo ora discourse-doctor e raccolgo log più dettagliati.

Questo è lo script di aggiornamento che ho creato e utilizzato con successo per un anno o più:

https://github.com/balupton/dotfiles/blob/master/commands/discourse-upgrader

Ci dovrebbe essere un errore più specifico sopra ‘FALLITO’ se scorri verso l’alto.

Sembra che non gradisca un tema/componente. Potresti voler eseguire ./launcher restart app per ripristinare la versione pre-ricostruzione in modo da poter utilizzare l’interfaccia utente normale per disabilitare quello in questione prima di tentare un altro aggiornamento. Lo scorrimento verso l’alto ti ha dato un indizio su quale fosse?

L’unico log significativo di brew doctor era questo:

I, [2022-02-15T06:14:34.823778 #1]  INFO -- : cd /var/www/discourse && su discourse -c 'bundle exec rake themes:update assets:precompile'
- Building
- Building
- building...
Killed
error Command failed with exit code 137.
I, [2022-02-15T06:25:24.689000 #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-15T06:25:24.701625 #1]  INFO -- : Terminating async processes
I, [2022-02-15T06:25:24.702927 #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-15T06:25:24.703765 #1]  INFO -- : Sending TERM to exec chpst -u redis -U redis /usr/bin/redis-server /etc/redis/redis.conf pid: 103
103:signal-handler (1644906324) Received SIGTERM scheduling shutdown...
2022-02-15 06:25:24.710 UTC [42] LOG:  received fast shutdown request
2022-02-15 06:25:24.741 UTC [42] LOG:  aborting any active transactions
103:M 15 Feb 2022 06:25:24.777 # User requested shutdown...
103:M 15 Feb 2022 06:25:24.777 * Saving the final RDB snapshot before exiting.
2022-02-15 06:25:24.796 UTC [42] LOG:  background worker "logical replication launcher" (PID 51) exited with exit code 1
2022-02-15 06:25:24.797 UTC [46] LOG:  shutting down
2022-02-15 06:25:25.023 UTC [42] LOG:  database system is shut down
103:M 15 Feb 2022 06:25:26.383 * DB saved on disk
103:M 15 Feb 2022 06:25:26.385 # 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 1146 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'"]}
a1a2ad7dab631a87852f269d0de01bee80aea384be8a94ba4eb555f1fa5d9094
** 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.
==================== END REBUILD LOG ====================
Failed to rebuild app.

Checking your domain name . . .

Connection to discuss.bevry.me succeeded.
You should probably remove any non-standard plugins and rebuild.
Attempting to restart existing container. . .
x86_64 arch detected.

starting up existing container
+ /usr/bin/docker start app
Error response from daemon: driver failed programming external connectivity on endpoint app (924d10c5f09f04b43e96bd6d1a4a13945cd86ebbb12821a4943914538821b856): Error starting userland proxy: listen tcp 0.0.0.0:443: bind: address already in use
Error: failed to start containers: app
Failed to restart the container.

Ho aggiornato l’OP per includere altri log originali.
Rieseguo discourse-doctor, dato che è fallito perché mancava wget. Pubblicherò il log completo una volta completato.

Posso confermare, ho provato questo su 3 istanze diverse e le build falliscono dopo aver raggiunto lo stato seguente.

I, [2022-02-15T07:09:36.714521 #1]  INFO -- : > cd /var/www/discourse & su discourse -c 'bundle exec rake db:migrate'
I, [2022-02-15T07:09:46.598212 #1]  INFO -- :
I, [2022-02-15T07:09:46.599983 #1]  INFO -- : > cd /var/www/discourse & su discourse -c 'bundle exec rake themes:update assets:precompile'
- Building
- Building
- building...
Killed
error Command failed with exit code 137.
I, [2022-02-15T07:30:11.622116 #1]  INFO -- : Checking 'Easy Footer' for 'default'... up to date
Checking 'Discourse Loading Slider' for 'default'... up to date
Checking 'discourse-search-banner' for 'sandbox'... up to date
Checking 'discourse-category-sidebars' for 'sandbox'... up to date
Checking 'Hide Users Column' for 'sandbox'... up to date
Checking 'discourse-sidebar-nav' for 'sandbox'... up to date
Checking 'Dracula Theme' for 'sandbox'... up to date
Checking 'discourse-buttons' for 'tekduke'... 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.



FAILED
--------------------
Pups::ExecError: cd /var/www/discourse & su discourse -c 'bundle exec rake themes:update assets:precompile' failed with return #<Process::Status: pid 1034 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'"]}
49ed46d025f5fe0a3de022b073b507cc3d94f74f96a60fe2d55042d413def454
** 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.

sembra un problema relativo a ember CLI.

Ehi @balupton potresti provare a cambiare EMBER_CLI_PROD_ASSETS: 0 e riprovare a ricompilare? Ho avuto almeno 1 ricompilazione riuscita dopo la modifica sopra.

Questi sembrano essere gli unici log pertinenti che indicano qualcosa di sbagliato:

I, [2022-02-15T07:15:48.531001 #1]  INFO -- : > cd /var/www/discourse & [ ! -d 'node_modules' ] || su discourse -c 'yarn install --production & yarn cache clean'
warning Resolution field "lodash@4.17.21" is incompatible with requested version "lodash@4.17.15"
warning " > @mixer/parallel-prettier@2.0.1" has unmet peer dependency "prettier@^2.0.0".
I, [2022-02-15T07:19:45.453691 #1]  INFO -- : > cd /var/www/discourse & su discourse -c 'bundle exec rake themes:update assets:precompile'
- Building
- Building
- building...
Killed
error Command failed with exit code 137.
I, [2022-02-15T07:31:39.549100 #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.
FAILED
--------------------
Pups::ExecError: cd /var/www/discourse & su discourse -c 'bundle exec rake themes:update assets:precompile' failed with return #<Process::Status: pid 1145 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'"]}
a262c461f2ae24390cb1397df309c44738cdc2688483d5fb7d52a3fde3155409
** 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.

Ci proverò, come lo applico?

Lascia stare, l’ho trovato:

Ci provo ora.

Guardando il changelog:

Mi chiedo se sia questo:

Poiché uno dei log era:

103:M 15 Feb 2022 06:54:18.720 # WARNING overcommit_memory is set to 0! Background save may fail under low memory condition. To fix this issue add 'vm.overcommit_memory = 1' to /etc/sysctl.conf and then reboot or run the command 'sysctl vm.overcommit_memory=1' for this to take effect.

Esaurimento della memoria.

Assicurati di avere abbastanza memoria (virtuale). 1 GB di memoria e 2 GB di swap sono probabilmente troppo bassi al giorno d’oggi per una ricostruzione.

Sì, ha funzionato.

nvim /var/discourse/containers/app.yml
env:
  # ...
  ## Workaround for: https://meta.discourse.org/t/failed-to-upgrade-discourse-instance-to-feb-15-2022/218204/7?u=balupton
  EMBER_CLI_PROD_ASSETS: 0

Con Discourse ora in esecuzione, top sta attualmente restituendo:

KiB Mem : **2041324** total, **287808** free, **1033300** used, **720216** buff/cache
KiB Swap: **0** total, **0** free, **0** used. **581308** avail Mem

È il server VC1S di Scaleway:

Anche l’attuazione del suggerimento in:

103:M 15 Feb 2022 06:54:18.720 # WARNING overcommit_memory is set to 0! Background save may fail under low memory condition. To fix this issue add 'vm.overcommit_memory = 1' to /etc/sysctl.conf and then reboot or run the command 'sysctl vm.overcommit_memory=1' for this to take effect.

risolverebbe il problema?

Il VPS dispone di 4 GB di RAM e 2 GB di Swap.

Devi aggiungere dello swap. Sembra che tu abbia abbastanza disco, quindi potresti aggiungerne 2G o anche 3G per sicurezza.

La configurazione standard di Discourse dovrebbe, credo, aver già impostato lo swap per te. Forse consulta Crea un file di swap per il tuo server Linux

E tuttavia vedi un esaurimento della memoria: è preoccupante. Incolla l’output del comando free.

Noto che in entrambe le mie installazioni (entrambe hanno solo 1 GB di RAM e 2 GB di swap) ho seguito quel consiglio ad un certo punto e impostato vm.overcommit_memory=1 in /etc/sysctl.conf. (Ciò non significa che risolverebbe questo problema attuale.)

Rimuoveremo molto presto la possibilità di disattivare gli asset Ember CLI, quindi assicurati di risolvere presto il problema con la tua configurazione. Altrimenti, si romperà di nuovo in un futuro aggiornamento.

Avrai bisogno di un minimo di 1 GB di RAM + 2 GB di swap (secondo il nostro script di installazione standard)

Questo è effettivamente preoccupante - per favore, facci sapere cosa vedi nell’output di free @itsbhanusharma

Ciao @david
Ecco free

root@discourse:~# free
              total        used        free      shared  buff/cache   available
Mem:        3932016     3747708       87928       12812       96380        9960
Swap:       2097148     1095852     1001296

Hai altro in esecuzione sul server? I numeri ‘utilizzati’ sembrano piuttosto alti per una normale installazione di Discourse :thinking:

disponibili 9960

Non sono molti :scream:

Quanti unicorni stai eseguendo?

Si tratta di un’installazione multisito di Discourse. Ci sono alcuni container aggiuntivi (ad es. un ricevitore di posta e un monitor di uptime) ma niente di straordinario.

UNICORN_WORKERS: 4

Come si presenta free dopo un riavvio?