Ho provato ad aggiornare Discourse e ho ottenuto il seguente messaggio:
I, [2021-01-21T18:39:25.045454 #1] INFO -- : > cd /var/www/discourse && su discourse -c 'bundle exec rake db:migrate'
2021-01-21 18:39:32.724 UTC [4051] discourse@discourse LOG: duration: 336.116 ms statement: UPDATE users
SET locale = 'en_GB'
WHERE locale = 'en'
2021-01-21 18:39:33.373 UTC [4051] discourse@discourse ERROR: duplicate key value violates unique constraint "index_users_on_username_lower"
2021-01-21 18:39:33.373 UTC [4051] discourse@discourse DETAIL: Key (username_lower)=(xyz123) already exists.
2021-01-21 18:39:33.373 UTC [4051] discourse@discourse STATEMENT: UPDATE users
SET locale = 'en'
WHERE locale = 'en_US'
rake aborted!
StandardError: An error has occurred, this and all later migrations canceled:
Ho provato a eseguire ./launcher enter app e su postgres -c 'psql discourse', ottenendo il seguente errore:
psql: error: could not connect to server: could not connect to server: No such file or directory
Is the server running locally and accepting
connections on Unix domain socket â/var/run/postgresql/.s.PGSQL.5432â?
Quando un aggiornamento fallisce, il container viene lasciato in stato di arresto. (Prova a collegarti al tuo sito tramite browser e vedrai che è cosÏ)
Quindi potrebbe semplicemente essere che non hai avviato lâultimo container funzionante. (Pre-aggiornamento)
Esegui ./launcher start app, quindi entra nel container e prova ad accedere alla CLI del database.
Grazie, ho riavviato il contenitore, hai qualche idea? Ho provato ./launcher enter app, câè altro che posso provare?
ubuntu@:/var/discourse$ ./launcher start app
WARNING: Docker versione 17.05.0-ce deprecata âŚ
Niente da fare, il tuo contenitore è già stato avviato!
root@ipâapp:/var/www/discourse# cat /var/log/postgresql/postgresql-12-main.log
2021-01-21 18:12:04.965 UTC [623] FATAL: i file del database non sono compatibili con il server
2021-01-21 18:12:04.965 UTC [623] DETAIL: La directory dei dati è stata inizializzata da PostgreSQL versione 13, che non è compatibile con questa versione 12.3 (Debian 12.3-1.pgdg100+1).
pg_ctl: impossibile avviare il server
Esaminare lâoutput del registro.