Ciao a tutti,
Qualche giorno fa, ho aggiornato la mia istanza Discourse all’ultima versione. (Purtroppo non ho la versione esatta da cui è stato aggiornato e a quella a cui è stato aggiornato). L’installazione è fallita, tuttavia, sono riuscito a resettare l’aggiornamento e ricostruire l’app Discourse e il sito funzionava normalmente.
Il giorno dopo, ho deciso di ritentare l’aggiornamento, l’aggiornamento è fallito di nuovo e questa volta ho ottenuto una di quelle pagine “Oops - Errore 500”, ho tentato di ricostruire l’app numerose volte, tuttavia, ottenevo continui errori di ricostruzione, uno dei quali ricordo essere qualcosa legato a yarn che scadeva sulla rete. Quando scorrevo verso l’alto i log, avrebbe dichiarato “Sembra esserci un problema con la tua rete, ritentando…” più volte fino a rinunciare e passare oltre. Non ho una foto di questo, purtroppo, ma ho una foto del messaggio di fallimento qui sotto.
Dopo un sacco di ricostruzioni e cercando gli errori che ottenevo nel log su questo forum e non arrivando a nessuna conclusione reale, ho fatto un backup della mia installazione Discourse dalla riga di comando rails e mi sono assicurato di avere anche alcuni backup precedenti, poi ho cancellato la mia macchina virtuale che eseguiva Discourse. È anche importante notare che stavo eseguendo Ubuntu 20.04 LTS.
Ho poi ricreato la macchina virtuale con Ubuntu 20.04 LTS e ho seguito i passaggi per reinstallare Discourse per un’installazione standard, tuttavia, gli stessi problemi continuavano a sorgere. A volte ottenevo anche un errore nei log di installazione che diceva che il database Postgres SQL era ancora in avvio. Un altro errore che ho notato è stato che quando i plugin venivano clonati, avrebbe portato a un errore di accesso negato.
Ho persino provato a ricreare la macchina virtuale con Ubuntu 22.04.04 LTS per vedere se avrebbe aiutato ma non ha risolto nessun problema.
Per i plugin, tutti i plugin che sto usando sono ufficiali da Discourse, ho persino provato a rimuovere tutti i miei plugin ma non ha portato a nessun risultato.
Tutto questo incubo è stato davvero frustrante per me poiché il mio forum è stato offline per un bel po’ di tempo ora, è importante menzionare che non sto eseguendo l’installazione nel cloud, ma su una macchina virtuale su un server dedicato nella mia casa. Le risorse allocate alla macchina virtuale soddisfano i requisiti di sistema di Discourse, tuttavia, una cosa importante da notare è che il server sta eseguendo su un lento disco rigido meccanico che sta causando alle ricostruzioni di richiedere circa 20-30 minuti per ricostruire, ho anche letto che il disco lento potrebbe anche causare a yarn di scadere tuttavia non sono del tutto sicuro che questo sia causato dal dispositivo di archiviazione. Ho intenzione di sostituire il disco meccanico con uno a stato solido presto poiché l’HDD sembra essere in via di guasto. Allegato qui sotto è un’immagine che ho preso da CrystalDisk che mostra lo stato del disco rigido.
Non ci sono stati problemi con la configurazione che stavo usando per ospitare il mio forum fino a quando non è successo questo, la mia rete è configurata correttamente con la macchina virtuale che ha le sue porte HTTP/HTTPS inoltrate a Internet pubblico e la macchina virtuale è allocata con risorse che soddisfano i requisiti per Discourse, più sto usando una versione LTS di Ubuntu. La macchina virtuale sta eseguendo su Windows Server 2019 sotto Windows Hyper-V.
Sto iniziando a credere che ci possa essere un problema che si estende al mio hardware o alla mia configurazione, tuttavia, non so fino a che punto questo va.
Ecco i log dall’ultimo comando ./launcher rebuild app:
Architettura x86_64 rilevata.
AVVERTENZA: il file containers/app.yml è leggibile da tutti. Puoi proteggere questo file eseguendo: chmod o-rwx containers/app.yml
Verifica che launcher sia aggiornato
Recupero origin
Launcher è aggiornato
2.0.20231218-0429: Pulling from discourse/base
Digest: sha256:468f70b9bb4c6d0c6c2bbb3efc1a5e12d145eae57bdb6946b7fe5558beb52dc1
Stato: L'immagine è aggiornata per discourse/base:2.0.20231218-0429
docker.io/discourse/base:2.0.20231218-0429
/usr/local/lib/ruby/gems/3.2.0/gems/pups-1.2.1/lib/pups.rb
/usr/local/bin/pups --stdin
I, [2024-03-19T16:32:41.438256 #1] INFO -- : Lettura da stdin
I, [2024-03-19T16:32:41.459943 #1] INFO -- : > locale-gen $LANG && update-locale
I, [2024-03-19T16:32:41.567791 #1] INFO -- : Generazione delle localizzazioni (questo potrebbe richiedere un po')...
Generazione completata.
I, [2024-03-19T16:32:41.568457 #1] INFO -- : > mkdir -p /shared/postgres_run
I, [2024-03-19T16:32:41.574854 #1] INFO -- :
I, [2024-03-19T16:32:41.575495 #1] INFO -- : > chown postgres:postgres /shared/postgres_run
I, [2024-03-19T16:32:41.581326 #1] INFO -- :
I, [2024-03-19T16:32:41.581893 #1] INFO -- : > chmod 775 /shared/postgres_run
I, [2024-03-19T16:32:41.587104 #1] INFO -- :
I, [2024-03-19T16:32:41.587652 #1] INFO -- : > rm -fr /var/run/postgresql
I, [2024-03-19T16:32:41.593452 #1] INFO -- :
I, [2024-03-19T16:32:41.594102 #1] INFO -- : > ln -s /shared/postgres_run /var/run/postgresql
I, [2024-03-19T16:32:41.599363 #1] INFO -- :
I, [2024-03-19T16:32:41.599920 #1] INFO -- : > socat /dev/null UNIX-CONNECT:/shared/postgres_run/.s.PGSQL.5432 || exit 0 && echo postgres already running stop container ; exit 1
2024/03/19 16:32:41 socat[20] E connect(6, AF=1 "/shared/postgres_run/.s.PGSQL.5432", 36): Connessione rifiutata
I, [2024-03-19T16:32:41.612696 #1] INFO -- :
I, [2024-03-19T16:32:41.613175 #1] INFO -- : > rm -fr /shared/postgres_run/.s*
I, [2024-03-19T16:32:41.620936 #1] INFO -- :
I, [2024-03-19T16:32:41.621584 #1] INFO -- : > rm -fr /shared/postgres_run/*.pid
I, [2024-03-19T16:32:41.629005 #1] INFO -- :
I, [2024-03-19T16:32:41.629459 #1] INFO -- : > mkdir -p /shared/postgres_run/13-main.pg_stat_tmp
I, [2024-03-19T16:32:41.635403 #1] INFO -- :
I, [2024-03-19T16:32:41.636075 #1] INFO -- : > chown postgres:postgres /shared/postgres_run/13-main.pg_stat_tmp
I, [2024-03-19T16:32:41.642020 #1] INFO -- :
I, [2024-03-19T16:32:41.654972 #1] INFO -- : File > /etc/service/postgres/run chmod: +x chown:
I, [2024-03-19T16:32:41.668688 #1] INFO -- : File > /etc/service/postgres/log/run chmod: +x chown:
I, [2024-03-19T16:32:41.680605 #1] INFO -- : File > /etc/runit/3.d/99-postgres chmod: +x chown:
I, [2024-03-19T16:32:41.692403 #1] INFO -- : File > /root/upgrade_postgres chmod: +x chown:
I, [2024-03-19T16:32:41.693451 #1] INFO -- : > chown -R root /var/lib/postgresql/13/main
I, [2024-03-19T16:34:37.968585 #1] INFO -- :
I, [2024-03-19T16:34:37.968992 #1] INFO -- : > [ ! -e /shared/postgres_data ] && install -d -m 0755 -o postgres -g postgres /shared/postgres_data && sudo -E -u postgres /usr/lib/postgresql/13/bin/initdb -D /shared/postgres_data || exit 0
I, [2024-03-19T16:34:37.975335 #1] INFO -- :
I, [2024-03-19T16:34:37.975526 #1] INFO -- : > chown -R postgres:postgres /shared/postgres_data
I, [2024-03-19T16:34:38.003767 #1] INFO -- :
I, [2024-03-19T16:34:38.004482 #1] INFO -- : > chown -R postgres:postgres /var/run/postgresql
I, [2024-03-19T16:34:38.012328 #1] INFO -- :
I, [2024-03-19T16:34:38.013012 #1] INFO -- : > /root/upgrade_postgres
I, [2024-03-19T16:34:38.027169 #1] INFO -- :
I, [2024-03-19T16:34:38.027657 #1] INFO -- : > rm /root/upgrade_postgres
I, [2024-03-19T16:34:38.032914 #1] INFO -- :
I, [2024-03-19T16:34:38.033769 #1] INFO -- : Sostituzione data_directory = '/var/lib/postgresql/13/main' con data_directory = '/shared/postgres_data' in /etc/postgresql/13/main/postgresql.conf
I, [2024-03-19T16:34:38.035668 #1] INFO -- : Sostituzione (?-mix:#?listen_addresses *=.*) con listen_addresses = '*' in /etc/postgresql/13/main/postgresql.conf
I, [2024-03-19T16:34:38.109152 #1] INFO -- : Sostituzione (?-mix:#?synchronous_commit *=.*) con synchronous_commit = $db_synchronous_commit in /etc/postgresql/13/main/postgresql.conf
I, [2024-03-19T16:34:38.133759 #1] INFO -- : Sostituzione (?-mix:#?shared_buffers *=.*) con shared_buffers = $db_shared_buffers in /etc/postgresql/13/main/postgresql.conf
I, [2024-03-19T16:34:38.158429 #1] INFO -- : Sostituzione (?-mix:#?work_mem *=.*) con work_mem = $db_work_mem in /etc/postgresql/13/main/postgresql.conf
I, [2024-03-19T16:34:38.183076 #1] INFO -- : Sostituzione (?-mix:#?default_text_search_config *=.*) con default_text_search_config = '$db_default_text_search_config' in /etc/postgresql/13/main/postgresql.conf
I, [2024-03-19T16:34:38.207491 #1] INFO -- : > install -d -m 0755 -o postgres -g postgres /shared/postgres_backup
I, [2024-03-19T16:34:38.214924 #1] INFO -- :
I, [2024-03-19T16:34:38.216145 #1] INFO -- : Sostituzione (?-mix:#?checkpoint_segments *=.*) con checkpoint_segments = $db_checkpoint_segments in /etc/postgresql/13/main/postgresql.conf
I, [2024-03-19T16:34:38.232187 #1] INFO -- : Sostituzione (?-mix:#?logging_collector *=.*) con logging_collector = $db_logging_collector in /etc/postgresql/13/main/postgresql.conf
I, [2024-03-19T16:34:38.256804 #1] INFO -- : Sostituzione (?-mix:#?log_min_duration_statement *=.*) con log_min_duration_statement = $db_log_min_duration_statement in /etc/postgresql/13/main/postgresql.conf
I, [2024-03-19T16:34:38.281452 #1] INFO -- : Sostituzione (?-mix:^#local +replication +postgres +peer$) con local replication postgres peer in /etc/postgresql/13/main/pg_hba.conf
I, [2024-03-19T16:34:38.282725 #1] INFO -- : Sostituzione (?-mix:^host.*all.*all.*127.*$) con host all all 0.0.0.0/0 md5 in /etc/postgresql/13/main/pg_hba.conf
I, [2024-03-19T16:34:38.330730 #1] INFO -- : Sostituzione (?-mix:^host.*all.*all.*::1\/128.*$) con host all all ::/0 md5 in /etc/postgresql/13/main/pg_hba.conf
I, [2024-03-19T16:34:38.355097 #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, [2024-03-19T16:34:38.358895 #1] INFO -- : > sleep 5
2024-03-19 16:34:38.803 UTC [43] LOG: avvio di PostgreSQL 13.13 (Debian 13.13-1.pgdg110+1) su x86_64-pc-linux-gnu, compilato da gcc (Debian 10.2.1-6) 10.2.1 20210110, 64-bit
2024-03-19 16:34:38.804 UTC [43] LOG: ascolto su indirizzo IPv4 "0.0.0.0", porta 5432
2024-03-19 16:34:38.804 UTC [43] LOG: ascolto su indirizzo IPv6 "::", porta 5432
2024-03-19 16:34:39.043 UTC [43] LOG: ascolto su socket Unix "/var/run/postgresql/.s.PGSQL.5432"
2024-03-19 16:34:39.808 UTC [46] LOG: spegnimento del sistema di database interrotto; ultima volta attivo il 2024-03-19 16:29:44 UTC
2024-03-19 16:34:40.550 UTC [46] LOG: il sistema di database non è stato spento correttamente; recupero automatico in corso
2024-03-19 16:34:40.687 UTC [46] LOG: redo inizia a 0/1BD48B8
2024-03-19 16:34:40.687 UTC [46] LOG: lunghezza record non valida a 0/1BD49A0: previsto 24, ottenuto 0
2024-03-19 16:34:40.687 UTC [46] LOG: redo completato a 0/1BD4968
2024-03-19 16:34:41.469 UTC [43] LOG: il sistema di database è pronto ad accettare connessioni
I, [2024-03-19T16:34:43.364553 #1] INFO -- :
I, [2024-03-19T16:34:43.365415 #1] INFO -- : > su postgres -c 'createdb discourse' || true
2024-03-19 16:34:43.539 UTC [56] postgres@postgres ERROR: il database "discourse" esiste già
2024-03-19 16:34:43.539 UTC [56] postgres@postgres STATEMENT: CREATE DATABASE discourse;
createdb: errore: creazione del database fallita: ERRORE: il database "discourse" esiste già
I, [2024-03-19T16:34:43.543547 #1] INFO -- :
I, [2024-03-19T16:34:43.544689 #1] INFO -- : > su postgres -c 'psql discourse -c "create user discourse;"' || true
2024-03-19 16:34:43.722 UTC [60] postgres@discourse ERROR: il ruolo "discourse" esiste già
2024-03-19 16:34:43.722 UTC [60] postgres@discourse STATEMENT: create user discourse;
ERRORE: il ruolo "discourse" esiste già
I, [2024-03-19T16:34:43.726332 #1] INFO -- :
I, [2024-03-19T16:34:43.727467 #1] INFO -- : > su postgres -c 'psql discourse -c "grant all privileges on database discourse to discourse;"' || true
I, [2024-03-19T16:34:43.889339 #1] INFO -- : GRANT
I, [2024-03-19T16:34:43.890574 #1] INFO -- : > su postgres -c 'psql discourse -c "alter schema public owner to discourse;"'
I, [2024-03-19T16:34:44.060633 #1] INFO -- : ALTER SCHEMA
I, [2024-03-19T16:34:44.061745 #1] INFO -- : > su postgres -c 'psql template1 -c "create extension if not exists hstore;"'
NOTA: estensione "hstore" esiste già, saltata
I, [2024-03-19T16:34:44.249298 #1] INFO -- : CREATE EXTENSION
I, [2024-03-19T16:34:44.250601 #1] INFO -- : > su postgres -c 'psql template1 -c "create extension if not exists pg_trgm;"'
NOTA: estensione "pg_trgm" esiste già, saltata
I, [2024-03-19T16:34:44.429609 #1] INFO -- : CREATE EXTENSION
I, [2024-03-19T16:34:44.430432 #1] INFO -- : > su postgres -c 'psql template1 -c "create extension if not exists vector;"'
NOTA: estensione "vector" esiste già, saltata
I, [2024-03-19T16:34:44.606159 #1] INFO -- : CREATE EXTENSION
I, [2024-03-19T16:34:44.607078 #1] INFO -- : > su postgres -c 'psql discourse -c "create extension if not exists hstore;"'
NOTA: estensione "hstore" esiste già, saltata
I, [2024-03-19T16:34:44.777476 #1] INFO -- : CREATE EXTENSION
I, [2024-03-19T16:34:44.778760 #1] INFO -- : > su postgres -c 'psql discourse -c "create extension if not exists pg_trgm;"'
NOTA: estensione "pg_trgm" esiste già, saltata
I, [2024-03-19T16:34:44.941936 #1] INFO -- : CREATE EXTENSION
I, [2024-03-19T16:34:44.942985 #1] INFO -- : > su postgres -c 'psql discourse -c "create extension if not exists vector;"'
NOTA: estensione "vector" esiste già, saltata
I, [2024-03-19T16:34:45.126152 #1] INFO -- : CREATE EXTENSION
I, [2024-03-19T16:34:45.127264 #1] INFO -- : > sudo -u postgres psql discourse
I, [2024-03-19T16:34:45.131449 #1] INFO -- : update pg_database set encoding = pg_char_to_encoding('UTF8') where datname = 'discourse' AND encoding = pg_char_to_encoding('SQL_ASCII');
I, [2024-03-19T16:34:45.319678 #1] INFO -- : File > /var/lib/postgresql/take-database-backup chmod: +x chown: postgres:postgres
I, [2024-03-19T16:34:45.327509 #1] INFO -- : File > /var/spool/cron/crontabs/postgres chmod: chown:
I, [2024-03-19T16:34:45.327975 #1] INFO -- : > echo postgres installed!
I, [2024-03-19T16:34:45.337715 #1] INFO -- : postgres installed!
I, [2024-03-19T16:34:45.350316 #1] INFO -- : File > /etc/service/redis/run chmod: +x chown:
I, [2024-03-19T16:34:45.364575 #1] INFO -- : File > /etc/service/redis/log/run chmod: +x chown:
I, [2024-03-19T16:34:45.376683 #1] INFO -- : File > /etc/runit/3.d/10-redis chmod: +x chown:
I, [2024-03-19T16:34:45.377876 #1] INFO -- : Sostituzione daemonize yes con in /etc/redis/redis.conf
I, [2024-03-19T16:34:45.379812 #1] INFO -- : Sostituzione (?-mix:^pidfile.*$) con in /etc/redis/redis.conf
I, [2024-03-19T16:34:45.522977 #1] INFO -- : > install -d -m 0755 -o redis -g redis /shared/redis_data
I, [2024-03-19T16:34:45.530519 #1] INFO -- :
I, [2024-03-19T16:34:45.531688 #1] INFO -- : Sostituzione (?-mix:^logfile.*$) con logfile "" in /etc/redis/redis.conf
I, [2024-03-19T16:34:45.605605 #1] INFO -- : Sostituzione (?-mix:^bind .*$) con in /etc/redis/redis.conf
I, [2024-03-19T16:34:45.654747 #1] INFO -- : Sostituzione (?-mix:^dir .*$) con dir /shared/redis_data in /etc/redis/redis.conf
I, [2024-03-19T16:34:45.704127 #1] INFO -- : Sostituzione (?-mix:^protected-mode yes) con protected-mode no in /etc/redis/redis.conf
I, [2024-03-19T16:34:45.753115 #1] INFO -- : Sostituzione # io-threads 4 con io-threads $redis_io_threads in /etc/redis/redis.conf
I, [2024-03-19T16:34:45.802297 #1] INFO -- : > echo redis installed
I, [2024-03-19T16:34:45.808061 #1] INFO -- : redis installed
I, [2024-03-19T16:34:45.808693 #1] INFO -- : > cat /etc/redis/redis.conf | grep logfile
I, [2024-03-19T16:34:45.818814 #1] INFO -- : logfile ""
I, [2024-03-19T16:34:45.819515 #1] INFO -- : > exec chpst -u redis -U redis /usr/bin/redis-server /etc/redis/redis.conf
I, [2024-03-19T16:34:45.823505 #1] INFO -- : > sleep 10
112:C 19 Mar 2024 16:34:45.842 # oO0OoO0OoO0Oo Redis sta avviando oO0OoO0OoO0Oo
112:C 19 Mar 2024 16:34:45.842 # Redis version=7.0.7, bits=64, commit=00000000, modified=0, pid=112, just started
112:C 19 Mar 2024 16:34:45.842 # Configurazione caricata
112:M 19 Mar 2024 16:34:45.844 * clock monotonic: POSIX clock_gettime
112:M 19 Mar 2024 16:34:45.845 * Modalità di esecuzione=standalone, porta=6379.
112:M 19 Mar 2024 16:34:45.846 # Server inizializzato
112:M 19 Mar 2024 16:34:45.846 # AVVERTENZA L'overcommit della memoria deve essere abilitato! Senza di esso, un salvataggio in background o una replicazione potrebbero fallire in condizioni di memoria bassa. Essendo disabilitato, può anche causare fallimenti senza condizioni di memoria bassa, vedi https://github.com/jemalloc/jemalloc/issues/1328. 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' per farlo entrare in vigore.
112:M 19 Mar 2024 16:34:45.847 * Caricamento RDB prodotto dalla versione 7.0.7
112:M 19 Mar 2024 16:34:45.847 * Età RDB 305 secondi
112:M 19 Mar 2024 16:34:45.847 * Utilizzo memoria RDB quando creato 0.83 Mb
112:M 19 Mar 2024 16:34:45.847 * Fatto caricamento RDB, chiavi caricate: 11, chiavi scadute: 0.
112:M 19 Mar 2024 16:34:45.848 * DB caricato da disco: 0.001 secondi
112:M 19 Mar 2024 16:34:45.848 * Pronto ad accettare connessioni
I, [2024-03-19T16:34:55.828926 #1] INFO -- :
I, [2024-03-19T16:34:55.829696 #1] INFO -- : > thpoff echo "thpoff is installed!"
I, [2024-03-19T16:34:55.839100 #1] INFO -- : thpoff is installed!
I, [2024-03-19T16:34:55.839934 #1] INFO -- : > /usr/local/bin/ruby -e 'if ENV["DISCOURSE_SMTP_ADDRESS"] == "smtp.example.com"; puts "Aborting! Mail is not configured!"; exit 1; end'
I, [2024-03-19T16:34:56.090160 #1] INFO -- :
I, [2024-03-19T16:34:56.090902 #1] INFO -- : > /usr/local/bin/ruby -e 'if ENV["DISCOURSE_HOSTNAME"] == "discourse.example.com"; puts "Aborting! Domain is not configured!"; exit 1; end'
I, [2024-03-19T16:34:56.340784 #1] INFO -- :
I, [2024-03-19T16:34:56.341858 #1] INFO -- : > /usr/local/bin/ruby -e 'if (ENV["DISCOURSE_CDN_URL"] || "")[0..1] == "//"; puts "Aborting! CDN must have a protocol specified. Once fixed you should rebake your posts now to correct all posts."; exit 1; end'
I, [2024-03-19T16:34:56.593304 #1] INFO -- :
I, [2024-03-19T16:34:56.594095 #1] INFO -- : > rm -f /etc/cron.d/anacron
I, [2024-03-19T16:34:57.388238 #1] INFO -- :
I, [2024-03-19T16:34:57.396937 #1] INFO -- : File > /etc/cron.d/anacron chmod: chown:
I, [2024-03-19T16:34:57.418454 #1] INFO -- : File > /etc/runit/1.d/copy-env chmod: +x chown:
I, [2024-03-19T16:34:57.436263 #1] INFO -- : File > /etc/service/unicorn/run chmod: +x chown:
I, [2024-03-19T16:34:57.451285 #1] INFO -- : File > /etc/service/nginx/run chmod: +x chown:
I, [2024-03-19T16:34:57.464828 #1] INFO -- : File > /etc/runit/3.d/01-nginx chmod: +x chown:
I, [2024-03-19T16:34:57.478016 #1] INFO -- : File > /etc/runit/3.d/02-unicorn chmod: +x chown:
I, [2024-03-19T16:34:57.478451 #1] INFO -- : Sostituzione # postgres con sv start postgres || exit 1 in /etc/service/unicorn/run
I, [2024-03-19T16:34:57.479456 #1] INFO -- : > exec chpst -u redis -U redis /usr/bin/redis-server /etc/redis/redis.conf
I, [2024-03-19T16:34:57.487402 #1] INFO -- : > cd /var/www/discourse && sudo -H -E -u discourse git reset --hard
139:C 19 Mar 2024 16:34:57.509 # oO0OoO0OoO0Oo Redis sta avviando oO0OoO0OoO0Oo
139:C 19 Mar 2024 16:34:57.509 # Redis version=7.0.7, bits=64, commit=00000000, modified=0, pid=139, just started
139:C 19 Mar 2024 16:34:57.509 # Configurazione caricata
139:M 19 Mar 2024 16:34:57.511 * clock monotonic: POSIX clock_gettime
139:M 19 Mar 2024 16:34:57.512 # Avviso: Non è stato possibile creare socket di ascolto TCP del server *:6379: bind: Indirizzo già in uso
139:M 19 Mar 2024 16:34:57.512 # Ascolto fallito sulla porta 6379 (TCP), aborting.
Aggiornamento file: 100% (33715/33715), fatto.
I, [2024-03-19T16:35:10.829468 #1] INFO -- : HEAD è ora a 6ab1a19e9 DEV: Converti min_trust_level_to_allow_invite in gruppi (#24893)
E' occorso un errore nel mio aggiornamento
```ruby
api_key = "a quick brown fox"
fetch("https://api.example.com/data", headers: { 'Authorization' => api_key })
Per favore, aiutami a correggerlo.I, [2024-03-19T16:35:24.079798 #1] INFO – : > cd /var/www/discourse && sudo -H -E -u discourse git config user.discourse-version tests-passed
I, [2024-03-19T16:35:24.227550 #1] INFO – :
I, [2024-03-19T16:35:24.228193 #1] INFO – : > cd /var/www/discourse && mkdir - p tmp
I, [2024-03-19T16:35:24.236342 #1] INFO – :
I, [2024-03-19T16:35:24.236676 #1] INFO – : > cd /var/www/discourse && chown d iscourse:www-data tmp
I, [2024-03-19T16:35:24.245352 #1] INFO – :
I, [2024-03-19T16:35:24.245660 #1] INFO – : > cd /var/www/discourse && mkdir - p tmp/pids
I, [2024-03-19T16:35:24.254265 #1] INFO – :
I, [2024-03-19T16:35:24.254685 #1] INFO – : > cd /var/www/discourse && mkdir - p tmp/sockets
I, [2024-03-19T16:35:24.262959 #1] INFO – :
I, [2024-03-19T16:35:24.263379 #1] INFO – : > cd /var/www/discourse && touch t mp/.gitkeep
I, [2024-03-19T16:35:24.271221 #1] INFO – :
I, [2024-03-19T16:35:24.271450 #1] INFO – : > cd /var/www/discourse && mkdir - p /shared/log/rails
I, [2024-03-19T16:35:24.279371 #1] INFO – :
I, [2024-03-19T16:35:24.279626 #1] INFO – : > cd /var/www/discourse && bash -c “touch -a /shared/log/rails/{production,production_errors,unicorn.std out,unicorn.stderr,sidekiq}.log”
I, [2024-03-19T16:35:24.291996 #1] INFO – :
I, [2024-03-19T16:35:24.292367 #1] INFO – : > cd /var/www/discourse && bash -c “ln -s /shared/log/rails/{production,production_errors,unicorn.std out,unicorn.stderr,sidekiq}.log /var/www/discourse/log”
I, [2024-03-19T16:35:24.305093 #1] INFO – :
I, [2024-03-19T16:35:24.305386 #1] INFO – : > cd /var/www/discourse && bash -c “mkdir -p /shared/{uploads,backups}”
I, [2024-03-19T16:35:24.319893 #1] INFO – :
I, [2024-03-19T16:35:24.320188 #1] INFO – : > cd /var/www/discourse && bash -c “ln -s /shared/{uploads,backups} /var/www/discourse/public”
I, [2024-03-19T16:35:24.332421 #1] INFO – :
I, [2024-03-19T16:35:24.332724 #1] INFO – : > cd /var/www/discourse && bash -c “mkdir -p /shared/tmp/{backups,restores}”
I, [2024-03-19T16:35:24.345308 #1] INFO – :
I, [2024-03-19T16:35:24.345616 #1] INFO – : > cd /var/www/discourse && bash -c “ln -s /shared/tmp/{backups,restores} /var/www/discourse/tmp”
I, [2024-03-19T16:35:24.357207 #1] INFO – :
I, [2024-03-19T16:35:24.357719 #1] INFO – : > cd /var/www/discourse && chown - R discourse:www-data /shared/log/rails /shared/uploads /shared/backups /shared/t mp
I, [2024-03-19T16:35:24.366660 #1] INFO – :
I, [2024-03-19T16:35:24.366976 #1] INFO – : > cd /var/www/discourse && [ ! -d public/plugins ] || find public/plugins/ -maxdepth 1 -xtype l -delete
I, [2024-03-19T16:35:24.371930 #1] INFO – :
I, [2024-03-19T16:35:24.372597 #1] INFO – : Replacing # redis with sv start re dis || exit 1 in /etc/service/unicorn/run
I, [2024-03-19T16:35:24.375568 #1] INFO – : > cd /var/www/discourse/plugins && git clone GitHub - discourse/docker_manager: Plugin for use with discourse docker image · GitHub
Cloning into ‘docker_manager’…
I, [2024-03-19T16:35:26.673043 #1] INFO – :
I, [2024-03-19T16:35:26.673305 #1] INFO – : > cd /var/www/discourse/plugins && sudo -E -u discourse git clone https://github.com/discourse/discourse-yearly-re view.git
Cloning into ‘discourse-yearly-review’…
warning: unable to access ‘/root/.config/git/attributes’: Permission denied
I, [2024-03-19T16:35:27.763857 #1] INFO – :
I, [2024-03-19T16:35:27.764363 #1] INFO – : > cd /var/www/discourse/plugins && sudo -E -u discourse git clone GitHub - discourse/discourse-reactions: Moved to https://github.com/discourse/discourse/tree/main/plugins/discourse-reactions · GitHub .git
Cloning into ‘discourse-reactions’…
warning: unable to access ‘/root/.config/git/attributes’: Permission denied
I, [2024-03-19T16:35:29.275124 #1] INFO – :
I, [2024-03-19T16:35:29.275598 #1] INFO – : > cd /var/www/discourse/plugins && sudo -E -u discourse git clone https://github.com/discourse/discourse-user-note s.git
Cloning into ‘discourse-user-notes’…
warning: unable to access ‘/root/.config/git/attributes’: Permission denied
I, [2024-03-19T16:35:30.428436 #1] INFO – :
I, [2024-03-19T16:35:30.429173 #1] INFO – : > cd /var/www/discourse/plugins && sudo -E -u discourse git clone https://github.com/discourse/discourse-gamificat ion.git
Cloning into ‘discourse-gamification’…
warning: unable to access ‘/root/.config/git/attributes’: Permission denied
I, [2024-03-19T16:35:31.788286 #1] INFO – :
I, [2024-03-19T16:35:31.789821 #1] INFO – : > cd /var/www/discourse/plugins && sudo -E -u discourse git clone https://github.com/discourse/discourse-policy.gi t
Cloning into ‘discourse-policy’…
warning: unable to access ‘/root/.config/git/attributes’: Permission denied
I, [2024-03-19T16:35:34.719712 #1] INFO – :
I, [2024-03-19T16:35:34.720281 #1] INFO – : > cd /var/www/discourse/plugins && sudo -E -u discourse git clone GitHub - discourse/discourse-calendar: Adds the ability to create a dynamic calendar in the first post of a topic. · GitHub. git
Cloning into ‘discourse-calendar’…
warning: unable to access ‘/root/.config/git/attributes’: Permission denied
I, [2024-03-19T16:35:39.165042 #1] INFO – :
I, [2024-03-19T16:35:39.165522 #1] INFO – : > cd /var/www/discourse/plugins && sudo -E -u discourse git clone GitHub - discourse/discourse-adplugin: Official Discourse Advertising Plugin. Install & Start Serving Ads on Your Discourse Forum · GitHub. git
Cloning into ‘discourse-adplugin’…
warning: unable to access ‘/root/.config/git/attributes’: Permission denied
I, [2024-03-19T16:35:45.006305 #1] INFO – :
I, [2024-03-19T16:35:45.006702 #1] INFO – : > cd /var/www/discourse/plugins && sudo -E -u discourse git clone https://github.com/discourse/discourse-follow.gi t
Cloning into ‘discourse-follow’…
warning: unable to access ‘/root/.config/git/attributes’: Permission denied
I, [2024-03-19T16:35:50.572583 #1] INFO – :
I, [2024-03-19T16:35:50.573195 #1] INFO – : > cd /var/www/discourse/plugins && sudo -E -u discourse git clone https://github.com/discourse/discourse-solved.gi t
Cloning into ‘discourse-solved’…
warning: unable to access ‘/root/.config/git/attributes’: Permission denied
I, [2024-03-19T16:35:52.922038 #1] INFO – :
I, [2024-03-19T16:35:52.922601 #1] INFO – : > cd /var/www/discourse/plugins && sudo -E -u discourse git clone https://github.com/discourse/discourse-post-voti ng.git
Cloning into ‘discourse-post-voting’…
warning: unable to access ‘/root/.config/git/attributes’: Permission denied
I, [2024-03-19T16:35:54.380420 #1] INFO – :
I, [2024-03-19T16:35:54.380867 #1] INFO – : > cd /var/www/discourse/plugins && sudo -E -u discourse git clone https://github.com/discourse/discourse-cakeday.g it
Cloning into ‘discourse-cakeday’…
warning: unable to access ‘/root/.config/git/attributes’: Permission denied
I, [2024-03-19T16:35:55.531642 #1] INFO – :
I, [2024-03-19T16:35:55.532304 #1] INFO – : > cd /var/www/discourse/plugins && sudo -E -u discourse git clone https://github.com/discourse/discourse-subscript ions.git
Cloning into ‘discourse-subscriptions’…
warning: unable to access ‘/root/.config/git/attributes’: Permission denied
I, [2024-03-19T16:36:00.495608 #1] INFO – :
I, [2024-03-19T16:36:00.496142 #1] INFO – : > cd /var/www/discourse/plugins && sudo -E -u discourse git clone https://github.com/discourse/discourse-whos-onli ne.git
Cloning into ‘discourse-whos-online’…
warning: unable to access ‘/root/.config/git/attributes’: Permission denied
I, [2024-03-19T16:36:01.759717 #1] INFO – :
I, [2024-03-19T16:36:01.760165 #1] INFO – : > cd /var/www/discourse/plugins && sudo -E -u discourse git clone https://github.com/discourse/discourse-chat-inte gration.git
Cloning into ‘discourse-chat-integration’…
warning: unable to access ‘/root/.config/git/attributes’: Permission denied
I, [2024-03-19T16:36:03.246218 #1] INFO – :
I, [2024-03-19T16:36:03.247472 #1] INFO – : > cp /var/www/discourse/config/ngi nx.sample.conf /etc/nginx/conf.d/discourse.conf
I, [2024-03-19T16:36:03.255381 #1] INFO – :
I, [2024-03-19T16:36:03.255949 #1] INFO – : > rm /etc/nginx/sites-enabled/defa ult
I, [2024-03-19T16:36:03.261744 #1] INFO – :
I, [2024-03-19T16:36:03.262032 #1] INFO – : > mkdir -p /var/nginx/cache
I, [2024-03-19T16:36:03.268429 #1] INFO – :
I, [2024-03-19T16:36:03.269266 #1] INFO – : Replacing pid /run/nginx.pid; with daemon off; in /etc/nginx/nginx.conf
I, [2024-03-19T16:36:03.270349 #1] INFO – : Replacing (?m-ix:upstream[^}]+}) with upstream discourse { server 127.0.0.1:3000; } in /etc/nginx/conf.d/discour se.conf
I, [2024-03-19T16:36:03.271428 #1] INFO – : Replacing (?-mix:server_name.+$) w ith server_name _ ; in /etc/nginx/conf.d/discourse.conf
I, [2024-03-19T16:36:03.321320 #1] INFO – : Replacing (?-mix:client_max_body_s ize.+$) with client_max_body_size $upload_size ; in /etc/nginx/conf.d/discourse. conf
I, [2024-03-19T16:36:03.370586 #1] INFO – : Replacing (?-mix:worker_connection s.+$) with worker_connections $nginx_worker_connections ; in /etc/nginx/nginx.co nf
I, [2024-03-19T16:36:03.371396 #1] INFO – : > echo “done configuring web”
I, [2024-03-19T16:36:03.375945 #1] INFO – : done configuring web
I, [2024-03-19T16:36:03.377150 #1] INFO – : > cd /var/www/discourse && gem ins tall bundler --conservative -v $(awk ‘/BUNDLED WITH/ { getline; gsub(/ /,“”); pr int $0 }’ Gemfile.lock)
I, [2024-03-19T16:36:05.075958 #1] INFO – : Successfully installed bundler-2.5 .3
1 gem installed
I, [2024-03-19T16:36:05.076333 #1] INFO – : > cd /var/www/discourse && find /v ar/www/discourse ! -user discourse -exec chown discourse {} +
I, [2024-03-19T16:36:09.016883 #1] INFO – :
I, [2024-03-19T16:36:09.017986 #1] INFO – : > cd /var/www/discourse && if [ “t ests-passed” != “tests-passed” ]; then
rm -rf app/assets/javascripts/node_modules
fi
I, [2024-03-19T16:36:09.023415 #1] INFO – :
I, [2024-03-19T16:36:09.023782 #1] INFO – : > cd /var/www/discourse && su disc ourse -c ‘yarn install --frozen-lockfile && yarn cache clean’
warning Resolution field “unset-value@2.0.1” is incompatible with requested vers ion “unset-value@^1.0.0”
warning Pattern [“wrap-ansi-cjs@npm:wrap-ansi@^7.0.0”] is trying to unpack in th e same destination “/home/discourse/.cache/yarn/v6/npm-wrap-ansi-cjs-7.0.0-67e14 5cff510a6a6984bdf1152911d69d2eb9e43-integrity/node_modules/wrap-ansi-cjs” as pat tern [“wrap-ansi@^7.0.0”]. This could result in non-deterministic behavior, skip ping.
error An unexpected error occurred: “https://registry.yarnpkg.com/date-fns/-/date-fns-2.30.0.tgz: ESOCKETTIMEDOUT”.
I, [2024-03-19T16:40:12.194716 #1] INFO – : yarn install v1.22.19
[1/5] Validating package.json…
[2/5] Resolving packages…
[3/5] Fetching packages…
info There appears to be trouble with your network connection. Retrying…
info There appears to be trouble with your network connection. Retrying…
info There appears to be trouble with your network connection. Retrying…
info There appears to be trouble with your network connection. Retrying…
info If you think this is a bug, please open a bug report with the information provided in “/var/www/discourse/yarn-error.log”.
info Visit yarn install | Yarn for documentation about this command.
I, [2024-03-19T16:40:12.195985 #1] INFO – : Terminating async processes
112:signal-handler (1710866412) Received SIGTERM scheduling shutdown…
I, [2024-03-19T16:40:12.196356 #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: 43
I, [2024-03-19T16:40:12.196559 #1] INFO – : Sending TERM to exec chpst -u redis -U redis /usr/bin/redis-server /etc/redis/redis.conf pid: 112
2024-03-19 16:40:12.196 UTC [43] LOG: received fast shutdown request
112:M 19 Mar 2024 16:40:12.297 # User requested shutdown…
112:M 19 Mar 2024 16:40:12.297 * Saving the final RDB snapshot before exiting.
2024-03-19 16:40:12.630 UTC [43] LOG: aborting any active transactions
2024-03-19 16:40:12.636 UTC [43] LOG: background worker “logical replication launcher” (PID 52) exited with exit code 1
2024-03-19 16:40:12.640 UTC [47] LOG: shutting down
112:M 19 Mar 2024 16:40:12.778 * DB saved on disk
112:M 19 Mar 2024 16:40:12.778 # Redis is now ready to exit, bye bye…
2024-03-19 16:40:13.564 UTC [43] LOG: database system is shut down
FAILED
Pups::ExecError: cd /var/www/discourse && su discourse -c ‘yarn install --frozen-lockfile && yarn cache clean’ failed with return #<Process::Status: pid 457 exit 1>
Location of failure: /usr/local/lib/ruby/gems/3.2.0/gems/pups-1.2.1/lib/pups/exec_command.rb:132:in `spawn’
exec failed with the params {“cd”=>“$home”, “cmd”=>[“if [ "$version" != "tests-passed" ]; then\n rm -rf app/assets/javascripts/node_modules\nfi”, “su discourse -c ‘yarn install --frozen-lockfile && yarn cache clean’”]}
bootstrap failed with exit code 1
** 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.
4207e08ef2f55ca92e6033e1cfa6585a54381e6f5947ad251e7eb5a4a21a37d1
Se qualcuno ha un'idea su come risolvere questo problema, vi prego di farmelo sapere. Per il momento, credo che la soluzione migliore sia sostituire l'hard disk difettoso con un SSD migliore, poiché il disco difettoso potrebbe scrivere dati corrotti e le operazioni di rebuild richiedono 20-30 minuti quando dovrebbero richiedere al massimo pochi minuti, anche se non sono del tutto sicuro di questa conclusione.
Poiché al momento non posso procurarmi un nuovo disco, molto probabilmente attiverò temporaneamente un'istanza su DigitalOcean e farò girare il sito da lì finché non potrò ottenere la sostituzione del disco.
Vi prego di farmi sapere le vostre opinioni, ve ne sarei molto grato.



