Sto cercando di aggiornare e Discourse non riesce ad avviarsi. Qualcuno può consigliarmi quali passaggi seguire per rimettere il sito online? Ho eseguito discourse-doctor, ma non è riuscito a ricostruire nemmeno quello. Di seguito incollo i log del mio (terzo?) tentativo:
I, [2020-04-11T13:05:40.743940 #1] INFO -- : Loading --stdin
I, [2020-04-11T13:05:40.750131 #1] INFO -- : > locale-gen $LANG && update-locale
I, [2020-04-11T13:05:40.800464 #1] INFO -- : Generazione delle localizzazioni (questo potrebbe richiedere del tempo)...
Generazione completata.
I, [2020-04-11T13:05:40.800750 #1] INFO -- : > mkdir -p /shared/postgres_run
I, [2020-04-11T13:05:40.804473 #1] INFO -- :
I, [2020-04-11T13:05:40.804720 #1] INFO -- : > chown postgres:postgres /shared/postgres_run
I, [2020-04-11T13:05:40.809297 #1] INFO -- :
I, [2020-04-11T13:05:40.809573 #1] INFO -- : > chmod 775 /shared/postgres_run
I, [2020-04-11T13:05:40.813859 #1] INFO -- :
I, [2020-04-11T13:05:40.814113 #1] INFO -- : > rm -fr /var/run/postgresql
I, [2020-04-11T13:05:40.818749 #1] INFO -- :
I, [2020-04-11T13:05:40.819005 #1] INFO -- : > ln -s /shared/postgres_run /var/run/postgresql
I, [2020-04-11T13:05:40.823141 #1] INFO -- :
I, [2020-04-11T13:05:40.823401 #1] INFO -- : > socat /dev/null UNIX-CONNECT:/shared/postgres_run/.s.PGSQL.5432 || exit 0 && echo postgres già in esecuzione, fermare il contenitore ; exit 1
2020/04/11 13:05:40 socat[26] E connect(6, AF=1 "/shared/postgres_run/.s.PGSQL.5432", 36): Connessione rifiutata
I, [2020-04-11T13:05:40.831215 #1] INFO -- :
I, [2020-04-11T13:05:40.831436 #1] INFO -- : > rm -fr /shared/postgres_run/.s*
I, [2020-04-11T13:05:40.837350 #1] INFO -- :
I, [2020-04-11T13:05:40.837549 #1] INFO -- : > rm -fr /shared/postgres_run/*.pid
I, [2020-04-11T13:05:40.843241 #1] INFO -- :
I, [2020-04-11T13:05:40.843486 #1] INFO -- : > mkdir -p /shared/postgres_run/10-main.pg_stat_tmp
I, [2020-04-11T13:05:40.848311 #1] INFO -- :
I, [2020-04-11T13:05:40.848643 #1] INFO -- : > chown postgres:postgres /shared/postgres_run/10-main.pg_stat_tmp
I, [2020-04-11T13:05:40.853421 #1] INFO -- :
I, [2020-04-11T13:05:40.863897 #1] INFO -- : File > /etc/service/postgres/run chmod: +x chown:
I, [2020-04-11T13:05:40.873965 #1] INFO -- : File > /etc/service/postgres/log/run chmod: +x chown:
I, [2020-04-11T13:05:40.884485 #1] INFO -- : File > /etc/runit/3.d/99-postgres chmod: +x chown:
I, [2020-04-11T13:05:40.895036 #1] INFO -- : File > /root/upgrade_postgres chmod: +x chown:
I, [2020-04-11T13:05:40.895478 #1] INFO -- : > chown -R root /var/lib/postgresql/10/main
I, [2020-04-11T13:06:09.192272 #1] INFO -- :
I, [2020-04-11T13:06:09.192593 #1] INFO -- : > [ ! -e /shared/postgres_data ] && install -d -m 0755 -o postgres -g postgres /shared/postgres_data && sudo -E -u postgres /usr/lib/postgresql/10/bin/initdb -D /shared/postgres_data || exit 0
I, [2020-04-11T13:06:09.197837 #1] INFO -- :
I, [2020-04-11T13:06:09.197992 #1] INFO -- : > chown -R postgres:postgres /shared/postgres_data
I, [2020-04-11T13:06:09.228153 #1] INFO -- :
I, [2020-04-11T13:06:09.228375 #1] INFO -- : > chown -R postgres:postgres /var/run/postgresql
I, [2020-04-11T13:06:09.233425 #1] INFO -- :
I, [2020-04-11T13:06:09.233760 #1] INFO -- : > /root/upgrade_postgres
I, [2020-04-11T13:06:09.243357 #1] INFO -- :
I, [2020-04-11T13:06:09.243596 #1] INFO -- : > rm /root/upgrade_postgres
I, [2020-04-11T13:06:09.249007 #1] INFO -- :
I, [2020-04-11T13:06:09.249495 #1] INFO -- : Sostituzione data_directory = '/var/lib/postgresql/10/main' con data_directory = '/shared/postgres_data' in /etc/postgresql/10/main/postgresql.conf
I, [2020-04-11T13:06:09.272106 #1] INFO -- : Sostituzione (?-mix:#?listen_addresses *=.*) con listen_addresses = '*' in /etc/postgresql/10/main/postgresql.conf
I, [2020-04-11T13:06:09.272853 #1] INFO -- : Sostituzione (?-mix:#?synchronous_commit *=.*) con synchronous_commit = $db_synchronous_commit in /etc/postgresql/10/main/postgresql.conf
I, [2020-04-11T13:06:09.273496 #1] INFO -- : Sostituzione (?-mix:#?shared_buffers *=.*) con shared_buffers = $db_shared_buffers in /etc/postgresql/10/main/postgresql.conf
I, [2020-04-11T13:06:09.274139 #1] INFO -- : Sostituzione (?-mix:#?work_mem *=.*) con work_mem = $db_work_mem in /etc/postgresql/10/main/postgresql.conf
I, [2020-04-11T13:06:09.274757 #1] INFO -- : Sostituzione (?-mix:#?default_text_search_config *=.*) con default_text_search_config = '$db_default_text_search_config' in /etc/postgresql/10/main/postgresql.conf
I, [2020-04-11T13:06:09.275288 #1] INFO -- : > install -d -m 0755 -o postgres -g postgres /shared/postgres_backup
I, [2020-04-11T13:06:09.282029 #1] INFO -- :
I, [2020-04-11T13:06:09.282556 #1] INFO -- : Sostituzione (?-mix:#?max_wal_senders *=.*) con max_wal_senders = $db_max_wal_senders in /etc/postgresql/10/main/postgresql.conf
I, [2020-04-11T13:06:09.330309 #1] INFO -- : Sostituzione (?-mix:#?wal_level *=.*) con wal_level = $db_wal_level in /etc/postgresql/10/main/postgresql.conf
I, [2020-04-11T13:06:09.331016 #1] INFO -- : Sostituzione (?-mix:#?checkpoint_segments *=.*) con checkpoint_segments = $db_checkpoint_segments in /etc/postgresql/10/main/postgresql.conf
I, [2020-04-11T13:06:09.331655 #1] INFO -- : Sostituzione (?-mix:#?logging_collector *=.*) con logging_collector = $db_logging_collector in /etc/postgresql/10/main/postgresql.conf
I, [2020-04-11T13:06:09.332347 #1] INFO -- : Sostituzione (?-mix:#?log_min_duration_statement *=.*) con log_min_duration_statement = $db_log_min_duration_statement in /etc/postgresql/10/main/postgresql.conf
I, [2020-04-11T13:06:09.333020 #1] INFO -- : Sostituzione (?-mix:^#local +replication +postgres +peer$) con local replication postgres peer in /etc/postgresql/10/main/pg_hba.conf
I, [2020-04-11T13:06:09.333660 #1] INFO -- : Sostituzione (?-mix:^host.*all.*all.*127.*$) con host all all 0.0.0.0/0 md5 in /etc/postgresql/10/main/pg_hba.conf
I, [2020-04-11T13:06:09.334205 #1] INFO -- : > 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
I, [2020-04-11T13:06:09.338659 #1] INFO -- : > sleep 5
2020-04-11 13:06:09.481 UTC [49] LOG: in ascolto sull'indirizzo IPv4 "0.0.0.0", porta 5432
2020-04-11 13:06:09.482 UTC [49] LOG: in ascolto sull'indirizzo IPv6 "::", porta 5432
2020-04-11 13:06:09.544 UTC [49] LOG: in ascolto sulla socket Unix "/var/run/postgresql/.s.PGSQL.5432"
2020-04-11 13:06:10.813 UTC [52] LOG: lo spegnimento del sistema di database è stato interrotto; ultimo stato attivo alle 2020-04-11 12:42:48 UTC
2020-04-11 13:06:12.356 UTC [52] LOG: il sistema di database non è stato spento correttamente; in corso il ripristino automatico
2020-04-11 13:06:12.416 UTC [52] LOG: redo inizia a 84/BD1A85B0
2020-04-11 13:06:12.446 UTC [52] LOG: lunghezza record non valida a 84/BD7B3570: richiesto 24, ottenuto 0
2020-04-11 13:06:12.446 UTC [52] LOG: redo completato a 84/BD7B3530
2020-04-11 13:06:12.446 UTC [52] LOG: ultima transazione completata alle 2020-04-11 11:53:53.069757+00
I, [2020-04-11T13:06:14.343128 #1] INFO -- :
I, [2020-04-11T13:06:14.343449 #1] INFO -- : > su postgres -c 'createdb discourse' || true
2020-04-11 13:06:14.409 UTC [56] postgres@postgres FATAL: il sistema di database si sta avviando
2020-04-11 13:06:14.411 UTC [57] postgres@template1 FATAL: il sistema di database si sta avviando
createdb: impossibile connettersi al database template1: FATAL: il sistema di database si sta avviando
I, [2020-04-11T13:06:14.413548 #1] INFO -- :
I, [2020-04-11T13:06:14.413822 #1] INFO -- : > su postgres -c 'psql discourse -c "create user discourse;"' || true
2020-04-11 13:06:14.493 UTC [68] postgres@discourse FATAL: il sistema di database si sta avviando
psql: FATAL: il sistema di database si sta avviando
I, [2020-04-11T13:06:14.495917 #1] INFO -- :
I, [2020-04-11T13:06:14.496250 #1] INFO -- : > su postgres -c 'psql discourse -c "grant all privileges on database discourse to discourse;"' || true
2020-04-11 13:06:14.574 UTC [79] postgres@discourse FATAL: il sistema di database si sta avviando
psql: FATAL: il sistema di database si sta avviando
I, [2020-04-11T13:06:14.576284 #1] INFO -- :
I, [2020-04-11T13:06:14.576674 #1] INFO -- : > su postgres -c 'psql discourse -c "alter schema public owner to discourse;"'
2020-04-11 13:06:14.655 UTC [90] postgres@discourse FATAL: il sistema di database si sta avviando
psql: FATAL: il sistema di database si sta avviando
I, [2020-04-11T13:06:14.658074 #1] INFO -- :
I, [2020-04-11T13:06:14.658635 #1] INFO -- : Terminazione dei processi asincroni
I, [2020-04-11T13:06:14.658722 #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/10/bin/postmaster -D /etc/postgresql/10/main pid: 49
2020-04-11 13:06:14.658 UTC [49] LOG: ricevuta richiesta di spegnimento rapido
I, [2020-04-11T13:06:24.659800 #1] INFO -- : 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:49 non si è terminato correttamente, forzando la terminazione!
FALLITO
--------------------
Pups::ExecError: su postgres -c 'psql discourse -c "alter schema public owner to discourse;"' fallito con codice di ritorno #<Process::Status: pid 80 exit 2>
Posizione dell'errore: /pups/lib/pups/exec_command.rb:112:in `spawn'
exec fallito con i parametri "su postgres -c 'psql $db_name -c \"alter schema public owner to $db_user;\"'"
3956a617d80571dd1ef87fcf7d23a319190bd909477e703ccb22cb25d0e137c8
** AVVIAMENTO FALLITO ** si prega di scorrere verso l'alto e cercare eventuali messaggi di errore precedenti, potrebbero essercene più di uno.
./discourse-doctor può aiutare a diagnosticare il problema.