Mise à jour Discourse n'attend pas que la base de données Postgress s'arrête

Hier nous avons essayé de reconstruire le forum plusieurs fois avec le même résultat : cela a échoué, et les journaux indiquent que cela est lié à la façon dont Discourse ferme la base de données. Il semble que cela ne corresponde pas aux attentes de vitesse définies par le processus de reconstruction, et c’est pourquoi cela échoue.

La dernière fois que cela s’est produit, nous avons simplement essayé de reconstruire une nouvelle fois et cela a fonctionné. Hier, cependant, nous avons essayé cela 3 fois avec le même résultat. Démarrer l’instance a aidé, mais cela ne résout pas le problème de l’impossibilité de mettre à niveau le forum par reconstruction.

J’inclus le journal de reconstruction ci-dessous. J’espère que quelqu’un sera en mesure de nous aider à trouver la vraie raison et comment nous pouvons aider Discourse à se reconstruire lui-même.

Journal d'échec de la reconstruction
kinetiksoft:~$ sudo /usr/local/bin/discourse-tool git-pull
remote: Enumerating objects: 47, done.
remote: Counting objects: 100% (47/47), done.
remote: Compressing objects: 100% (14/14), done.
remote: Total 47 (delta 20), reused 41 (delta 19), pack-reused 0
Unpacking objects: 100% (47/47), done.
From https://github.com/discourse/discourse_docker
   02cd746..4cd6a5d  main       -> origin/main
Updating 02cd746..4cd6a5d
Fast-forward
 .github/workflows/build.yml                | 85 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++--------------
 image/auto_build.rb                        |  4 ++--
 image/base/release.Dockerfile              | 11 +++++++++++
 image/base/{Dockerfile => slim.Dockerfile} |  8 +-------
 image/discourse_test/Dockerfile            | 40 +++++++++++++++++++++-------------------
 5 files changed, 106 insertions(+), 42 deletions(-)
 create mode 100644 image/base/release.Dockerfile
 rename image/base/{Dockerfile => slim.Dockerfile} (94%)
kinetiksoft:~$ sudo /usr/local/bin/discourse-tool rebuild
x86_64 arch detected.
Ensuring launcher is up to date
Fetching origin
Launcher is up-to-date
Stopping old container
+ /usr/bin/docker stop -t 60 app
app
cd /pups && git pull && git checkout v1.0.3 && /pups/bin/pups --stdin
Already up to date.
Note: checking out 'v1.0.3'.

You are in 'detached HEAD' state. You can look around, make experimental
changes and commit them, and you can discard any commits you make in this
state without impacting any branches by performing another checkout.

If you want to create a new branch to retain commits you create, you may
do so (now or later) by using -b with the checkout command again. Example:

  git checkout -b <new-branch-name>

HEAD is now at d1db030 a créé une nouvelle version
I, [2021-12-22T12:03:30.961687 #1]  INFO -- : Chargement --stdin
I, [2021-12-22T12:03:30.965617 #1]  INFO -- : > locale-gen $LANG && update-locale
I, [2021-12-22T12:03:31.025039 #1]  INFO -- : Génération des locales (cela peut prendre un moment)...
Génération terminée.

I, [2021-12-22T12:03:31.025205 #1]  INFO -- : > mkdir -p /shared/postgres_run
I, [2021-12-22T12:03:31.027383 #1]  INFO -- : 
I, [2021-12-22T12:03:31.027600 #1]  INFO -- : > chown postgres:postgres /shared/postgres_run
I, [2021-12-22T12:03:31.034332 #1]  INFO -- : 
I, [2021-12-22T12:03:31.034470 #1]  INFO -- : > chmod 775 /shared/postgres_run
I, [2021-12-22T12:03:31.035865 #1]  INFO -- : 
I, [2021-12-22T12:03:31.035982 #1]  INFO -- : > rm -fr /var/run/postgresql
I, [2021-12-22T12:03:31.037608 #1]  INFO -- : 
I, [2021-12-22T12:03:31.037725 #1]  INFO -- : > ln -s /shared/postgres_run /var/run/postgresql
I, [2021-12-22T12:03:31.041565 #1]  INFO -- : 
I, [2021-12-22T12:03:31.041696 #1]  INFO -- : > socat /dev/null UNIX-CONNECT:/shared/postgres_run/.s.PGSQL.5432 || exit 0 && echo postgres already running stop container ; exit 1
2021/12/22 12:03:31 socat[27] E connect(6, AF=1 "/shared/postgres_run/.s.PGSQL.5432", 36): Connection refused
I, [2021-12-22T12:03:31.053403 #1]  INFO -- : 
I, [2021-12-22T12:03:31.053535 #1]  INFO -- : > rm -fr /shared/postgres_run/.s*
I, [2021-12-22T12:03:31.055582 #1]  INFO -- : 
I, [2021-12-22T12:03:31.055693 #1]  INFO -- : > rm -fr /shared/postgres_run/*.pid
I, [2021-12-22T12:03:31.057512 #1]  INFO -- : 
I, [2021-12-22T12:03:31.057618 #1]  INFO -- : > mkdir -p /shared/postgres_run/13-main.pg_stat_tmp
I, [2021-12-22T12:03:31.058997 #1]  INFO -- : 
I, [2021-12-22T12:03:31.059130 #1]  INFO -- : > chown postgres:postgres /shared/postgres_run/13-main.pg_stat_tmp
I, [2021-12-22T12:03:31.060530 #1]  INFO -- : 
I, [2021-12-22T12:03:31.063566 #1]  INFO -- : File > /etc/service/postgres/run  chmod: +x  chown: 
I, [2021-12-22T12:03:31.066547 #1]  INFO -- : File > /etc/service/postgres/log/run  chmod: +x  chown: 
I, [2021-12-22T12:03:31.069511 #1]  INFO -- : File > /etc/runit/3.d/99-postgres  chmod: +x  chown: 
I, [2021-12-22T12:03:31.072380 #1]  INFO -- : File > /root/upgrade_postgres  chmod: +x  chown: 
I, [2021-12-22T12:03:31.072566 #1]  INFO -- : > chown -R root /var/lib/postgresql/13/main
I, [2021-12-22T12:04:08.248631 #1]  INFO -- : 
I, [2021-12-22T12:04:08.248799 #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, [2021-12-22T12:04:08.251062 #1]  INFO -- : 
I, [2021-12-22T12:04:08.251148 #1]  INFO -- : > chown -R postgres:postgres /shared/postgres_data
I, [2021-12-22T12:04:08.291023 #1]  INFO -- : 
I, [2021-12-22T12:04:08.291212 #1]  INFO -- : > chown -R postgres:postgres /var/run/postgresql
I, [2021-12-22T12:04:08.293474 #1]  INFO -- : 
I, [2021-12-22T12:04:08.293655 #1]  INFO -- : > /root/upgrade_postgres
I, [2021-12-22T12:04:08.301217 #1]  INFO -- : 
I, [2021-12-22T12:04:08.301351 #1]  INFO -- : > rm /root/upgrade_postgres
I, [2021-12-22T12:04:08.303272 #1]  INFO -- : 
I, [2021-12-22T12:04:08.310457 #1]  INFO -- : Remplacement de data_directory = '/var/lib/postgresql/13/main' par data_directory = '/shared/postgres_data' dans /etc/postgresql/13/main/postgresql.conf
I, [2021-12-22T12:04:08.310879 #1]  INFO -- : Remplacement de (?-mix:#?listen_addresses *=.*) par listen_addresses = '*' dans /etc/postgresql/13/main/postgresql.conf
I, [2021-12-22T12:04:08.318852 #1]  INFO -- : Remplacement de (?-mix:#?synchronous_commit *=.*) par synchronous_commit = $db_synchronous_commit dans /etc/postgresql/13/main/postgresql.conf
I, [2021-12-22T12:04:08.319207 #1]  INFO -- : Remplacement de (?-mix:#?shared_buffers *=.*) par shared_buffers = $db_shared_buffers dans /etc/postgresql/13/main/postgresql.conf
I, [2021-12-22T12:04:08.319512 #1]  INFO -- : Remplacement de (?-mix:#?work_mem *=.*) par work_mem = $db_work_mem dans /etc/postgresql/13/main/postgresql.conf
I, [2021-12-22T12:04:08.319791 #1]  INFO -- : Remplacement de (?-mix:#?default_text_search_config *=.*) par default_text_search_config = '$db_default_text_search_config' dans /etc/postgresql/13/main/postgresql.conf
I, [2021-12-22T12:04:08.320079 #1]  INFO -- : > install -d -m 0755 -o postgres -g postgres /shared/postgres_backup
I, [2021-12-22T12:04:08.330091 #1]  INFO -- : 
I, [2021-12-22T12:04:08.330365 #1]  INFO -- : Remplacement de (?-mix:#?checkpoint_segments *=.*) par checkpoint_segments = $db_checkpoint_segments dans /etc/postgresql/13/main/postgresql.conf
I, [2021-12-22T12:04:08.330681 #1]  INFO -- : Remplacement de (?-mix:#?logging_collector *=.*) par logging_collector = $db_logging_collector dans /etc/postgresql/13/main/postgresql.conf
I, [2021-12-22T12:04:08.331278 #1]  INFO -- : Remplacement de (?-mix:#?log_min_duration_statement *=.*) par log_min_duration_statement = $db_log_min_duration_statement dans /etc/postgresql/13/main/postgresql.conf
I, [2021-12-22T12:04:08.335199 #1]  INFO -- : Remplacement de (?-mix:^#local +replication +postgres +peer$) par local replication postgres  peer dans /etc/postgresql/13/main/pg_hba.conf
I, [2021-12-22T12:04:08.335399 #1]  INFO -- : Remplacement de (?-mix:^host.*all.*all.*127.*$) par host all all 0.0.0.0/0 md5 dans /etc/postgresql/13/main/pg_hba.conf
I, [2021-12-22T12:04:08.343492 #1]  INFO -- : Remplacement de (?-mix:^host.*all.*all.*::1\/128.*$) par host all all ::/0 md5 dans /etc/postgresql/13/main/pg_hba.conf
I, [2021-12-22T12:04:08.343701 #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, [2021-12-22T12:04:08.345307 #1]  INFO -- : > sleep 5
2021-12-22 12:04:08.666 UTC [50] LOG:  démarrage de PostgreSQL 13.5 (Debian 13.5-1.pgdg100+1) sur x86_64-pc-linux-gnu, compilé par gcc (Debian 8.3.0-6) 8.3.0, 64-bit
2021-12-22 12:04:08.666 UTC [50] LOG:  écoute sur l'adresse IPv4 "0.0.0.0", port 5432
2021-12-22 12:04:08.666 UTC [50] LOG:  écoute sur l'adresse IPv6 "::", port 5432
2021-12-22 12:04:08.732 UTC [50] LOG:  écoute sur le socket Unix "/var/run/postgresql/.s.PGSQL.5432"
2021-12-22 12:04:08.808 UTC [53] LOG:  l'arrêt du système de bases de données a été interrompu ; dernier état connu actif à 2021-12-22 12:02:56 UTC
2021-12-22 12:04:09.928 UTC [53] LOG:  le système de bases de données n'a pas été correctement arrêté ; récupération automatique en cours
2021-12-22 12:04:09.972 UTC [53] LOG:  le redo commence à 83/B07EB758
2021-12-22 12:04:10.123 UTC [53] LOG:  longueur d'enregistrement invalide à 83/B12EDED8 : attendu 24, obtenu 0
2021-12-22 12:04:10.123 UTC [53] LOG:  redo terminé à 83/B12EDEA0
I, [2021-12-22T12:04:13.347316 #1]  INFO -- : 
I, [2021-12-22T12:04:13.347566 #1]  INFO -- : > su postgres -c 'createdb discourse' || true
2021-12-22 12:04:13.521 UTC [57] postgres@postgres FATAL:  le système de bases de données est en cours de démarrage
2021-12-22 12:04:13.522 UTC [58] postgres@template1 FATAL:  le système de bases de données est en cours de démarrage
createdb : erreur : impossible de se connecter à la base de données template1 : la connexion au serveur sur le socket "/var/run/postgresql/.s.PGSQL.5432" a échoué : FATAL:  le système de bases de données est en cours de démarrage
I, [2021-12-22T12:04:13.523332 #1]  INFO -- : 
I, [2021-12-22T12:04:13.523518 #1]  INFO -- : > su postgres -c 'psql discourse -c "create user discourse;"' || true
2021-12-22 12:04:13.791 UTC [62] postgres@discourse FATAL:  le système de bases de données est en cours de démarrage
psql : erreur : la connexion au serveur sur le socket "/var/run/postgresql/.s.PGSQL.5432" a échoué : FATAL:  le système de bases de données est en cours de démarrage
I, [2021-12-22T12:04:13.792674 #1]  INFO -- : 
I, [2021-12-22T12:04:13.792923 #1]  INFO -- : > su postgres -c 'psql discourse -c "grant all privileges on database discourse to discourse;"' || true
2021-12-22 12:04:13.824 UTC [66] postgres@discourse FATAL:  le système de bases de données est en cours de démarrage
psql : erreur : la connexion au serveur sur le socket "/var/run/postgresql/.s.PGSQL.5432" a échoué : FATAL:  le système de bases de données est en cours de démarrage
I, [2021-12-22T12:04:13.825180 #1]  INFO -- : 
I, [2021-12-22T12:04:13.825452 #1]  INFO -- : > su postgres -c 'psql discourse -c "alter schema public owner to discourse;"'
2021-12-22 12:04:13.856 UTC [70] postgres@discourse FATAL:  le système de bases de données est en cours de démarrage
psql : erreur : la connexion au serveur sur le socket "/var/run/postgresql/.s.PGSQL.5432" a échoué : FATAL:  le système de bases de données est en cours de démarrage
I, [2021-12-22T12:04:13.857672 #1]  INFO -- : 
I, [2021-12-22T12:04:13.858028 #1]  INFO -- : Terminaison des processus asynchrones
I, [2021-12-22T12:04:13.858053 #1]  INFO -- : Envoi de INT à 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 : 50
2021-12-22 12:04:13.858 UTC [50] LOG:  demande d'arrêt rapide reçue
I, [2021-12-22T12:04:23.858557 #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 pid:50 n'a pas été terminé proprement, forçage de la terminaison !


ÉCHEC
--------------------
Pups::ExecError: su postgres -c 'psql discourse -c "alter schema public owner to discourse;"' a échoué avec le code de retour #<Process::Status: pid 67 exit 2>
Lieu de l'échec : /pups/lib/pups/exec_command.rb:112:in `spawn'
exec a échoué avec les paramètres "su postgres -c 'psql $db_name -c \"alter schema public owner to $db_user;\"'"
08af256a113e238f69588774fcfed142d94742fc4f09c9182cb20c1901a7aa61
** ÉCHEC DE L'AMORÇAGE ** veuillez faire défiler vers le haut et rechercher les messages d'erreur précédents, il peut y en avoir plus d'un.
./discourse-doctor peut aider à diagnostiquer le problème.
kinetiksoft:~$ sudo /usr/local/bin/discourse-tool rebuild
Architecture x86_64 détectée.
Vérification que le lanceur est à jour
Récupération de l'origine
Le lanceur est à jour
Arrêt de l'ancien conteneur
+ /usr/bin/docker stop -t 60 app
app
cd /pups && git pull && git checkout v1.0.3 && /pups/bin/pups --stdin
Déjà à jour.
Remarque : vérification de 'v1.0.3'.

Vous êtes dans un état de 'HEAD détaché'. Vous pouvez vous regarder autour, faire des changements
expérimentaux et les valider, et vous pouvez annuler tous les commits effectués dans cet
état sans impacter aucune branche en effectuant un autre checkout.

Si vous souhaitez créer une nouvelle branche pour conserver les commits que vous créez, vous pouvez
le faire (maintenant ou plus tard) en utilisant -b avec la commande de checkout à nouveau. Exemple :

  git checkout -b <nom-de-la-nouvelle-branche>

HEAD est maintenant à d1db030 couper une nouvelle version
I, [2021-12-22T12:05:48.204969 #1]  INFO -- : Chargement de --stdin
I, [2021-12-22T12:05:48.209104 #1]  INFO -- : > locale-gen $LANG && update-locale
I, [2021-12-22T12:05:48.229337 #1]  INFO -- : Génération des locales (cela peut prendre un moment)...
Génération terminée.

I, [2021-12-22T12:05:48.229510 #1]  INFO -- : > mkdir -p /shared/postgres_run
I, [2021-12-22T12:05:48.231324 #1]  INFO -- : 
I, [2021-12-22T12:05:48.231513 #1]  INFO -- : > chown postgres:postgres /shared/postgres_run
I, [2021-12-22T12:05:48.233015 #1]  INFO -- : 
I, [2021-12-22T12:05:48.233122 #1]  INFO -- : > chmod 775 /shared/postgres_run
I, [2021-12-22T12:05:48.236585 #1]  INFO -- : 
I, [2021-12-22T12:05:48.236706 #1]  INFO -- : > rm -fr /var/run/postgresql
I, [2021-12-22T12:05:48.238156 #1]  INFO -- : 
I, [2021-12-22T12:05:48.238287 #1]  INFO -- : > ln -s /shared/postgres_run /var/run/postgresql
I, [2021-12-22T12:05:48.239526 #1]  INFO -- : 
I, [2021-12-22T12:05:48.239634 #1]  INFO -- : > socat /dev/null UNIX-CONNECT:/shared/postgres_run/.s.PGSQL.5432 || exit 0 && echo postgres already running stop container ; exit 1
2021/12/22 12:05:48 socat[27] E connect(6, AF=1 "/shared/postgres_run/.s.PGSQL.5432", 36): Connection refused
I, [2021-12-22T12:05:48.242590 #1]  INFO -- : 
I, [2021-12-22T12:05:48.242720 #1]  INFO -- : > rm -fr /shared/postgres_run/.s*
I, [2021-12-22T12:05:48.244501 #1]  INFO -- : 
I, [2021-12-22T12:05:48.244589 #1]  INFO -- : > rm -fr /shared/postgres_run/*.pid
I, [2021-12-22T12:05:48.246303 #1]  INFO -- : 
I, [2021-12-22T12:05:48.246397 #1]  INFO -- : > mkdir -p /shared/postgres_run/13-main.pg_stat_tmp
I, [2021-12-22T12:05:48.247818 #1]  INFO -- : 
I, [2021-12-22T12:05:48.248021 #1]  INFO -- : > chown postgres:postgres /shared/postgres_run/13-main.pg_stat_tmp
I, [2021-12-22T12:05:48.249386 #1]  INFO -- : 
I, [2021-12-22T12:05:48.252499 #1]  INFO -- : File > /etc/service/postgres/run  chmod: +x  chown: 
I, [2021-12-22T12:05:48.255331 #1]  INFO -- : File > /etc/service/postgres/log/run  chmod: +x  chown: 
I, [2021-12-22T12:05:48.258241 #1]  INFO -- : File > /etc/runit/3.d/99-postgres  chmod: +x  chown: 
I, [2021-12-22T12:05:48.261139 #1]  INFO -- : File > /root/upgrade_postgres  chmod: +x  chown: 
I, [2021-12-22T12:05:48.261348 #1]  INFO -- : > chown -R root /var/lib/postgresql/13/main
I, [2021-12-22T12:06:24.321828 #1]  INFO -- : 
I, [2021-12-22T12:06:24.321951 #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, [2021-12-22T12:06:24.323903 #1]  INFO -- : 
I, [2021-12-22T12:06:24.323952 #1]  INFO -- : > chown -R postgres:postgres /shared/postgres_data
I, [2021-12-22T12:06:24.339115 #1]  INFO -- : 
I, [2021-12-22T12:06:24.339247 #1]  INFO -- : > chown -R postgres:postgres /var/run/postgresql
I, [2021-12-22T12:06:24.340865 #1]  INFO -- : 
I, [2021-12-22T12:06:24.341031 #1]  INFO -- : > /root/upgrade_postgres
I, [2021-12-22T12:06:24.343922 #1]  INFO -- : 
I, [2021-12-22T12:06:24.344019 #1]  INFO -- : > rm /root/upgrade_postgres
I, [2021-12-22T12:06:24.345316 #1]  INFO -- : 
I, [2021-12-22T12:06:24.345502 #1]  INFO -- : Remplacement de data_directory = '/var/lib/postgresql/13/main' par data_directory = '/shared/postgres_data' dans /etc/postgresql/13/main/postgresql.conf
I, [2021-12-22T12:06:24.345857 #1]  INFO -- : Remplacement de (?-mix:#?listen_addresses *=.*) par listen_addresses = '*' dans /etc/postgresql/13/main/postgresql.conf
I, [2021-12-22T12:06:24.346104 #1]  INFO -- : Remplacement de (?-mix:#?synchronous_commit *=.*) par synchronous_commit = $db_synchronous_commit dans /etc/postgresql/13/main/postgresql.conf
I, [2021-12-22T12:06:24.346356 #1]  INFO -- : Remplacement de (?-mix:#?shared_buffers *=.*) par shared_buffers = $db_shared_buffers dans /etc/postgresql/13/main/postgresql.conf
I, [2021-12-22T12:06:24.346628 #1]  INFO -- : Remplacement de (?-mix:#?work_mem *=.*) par work_mem = $db_work_mem dans /etc/postgresql/13/main/postgresql.conf
I, [2021-12-22T12:06:24.346891 #1]  INFO -- : Remplacement de (?-mix:#?default_text_search_config *=.*) par default_text_search_config = '$db_default_text_search_config' dans /etc/postgresql/13/main/postgresql.conf
I, [2021-12-22T12:06:24.347165 #1]  INFO -- : > install -d -m 0755 -o postgres -g postgres /shared/postgres_backup
I, [2021-12-22T12:06:24.348910 #1]  INFO -- : 
I, [2021-12-22T12:06:24.349140 #1]  INFO -- : Remplacement de (?-mix:#?checkpoint_segments *=.*) par checkpoint_segments = $db_checkpoint_segments dans /etc/postgresql/13/main/postgresql.conf
I, [2021-12-22T12:06:24.349383 #1]  INFO -- : Remplacement de (?-mix:#?logging_collector *=.*) par logging_collector = $db_logging_collector dans /etc/postgresql/13/main/postgresql.conf
I, [2021-12-22T12:06:24.349678 #1]  INFO -- : Remplacement de (?-mix:#?log_min_duration_statement *=.*) par log_min_duration_statement = $db_log_min_duration_statement dans /etc/postgresql/13/main/postgresql.conf
I, [2021-12-22T12:06:24.349972 #1]  INFO -- : Remplacement de (?-mix:^#local +replication +postgres +peer$) par local replication postgres  peer dans /etc/postgresql/13/main/pg_hba.conf
I, [2021-12-22T12:06:24.350138 #1]  INFO -- : Remplacement de (?-mix:^host.*all.*all.*127.*$) par host all all 0.0.0.0/0 md5 dans /etc/postgresql/13/main/pg_hba.conf
I, [2021-12-22T12:06:24.350303 #1]  INFO -- : Remplacement de (?-mix:^host.*all.*all.*::1\/128.*$) par host all all ::/0 md5 dans /etc/postgresql/13/main/pg_hba.conf
I, [2021-12-22T12:06:24.350464 #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, [2021-12-22T12:06:24.351392 #1]  INFO -- : > sleep 5
2021-12-22 12:06:24.490 UTC [50] LOG:  démarrage de PostgreSQL 13.5 (Debian 13.5-1.pgdg100+1) sur x86_64-pc-linux-gnu, compilé par gcc (Debian 8.3.0-6) 8.3.0, 64-bit
2021-12-22 12:06:24.490 UTC [50] LOG:  écoute sur l'adresse IPv4 "0.0.0.0", port 5432
2021-12-22 12:06:24.490 UTC [50] LOG:  écoute sur l'adresse IPv6 "::", port 5432
2021-12-22 12:06:24.571 UTC [50] LOG:  écoute sur le socket Unix "/var/run/postgresql/.s.PGSQL.5432"
2021-12-22 12:06:24.637 UTC [53] LOG:  l'arrêt du système de base de données a été interrompu ; dernier état connu actif à 2021-12-22 12:04:10 UTC
2021-12-22 12:06:26.793 UTC [53] LOG:  le système de base de données n'a pas été correctement arrêté ; récupération automatique en cours
2021-12-22 12:06:26.827 UTC [53] LOG:  redo starts at 83/B07EB758
2021-12-22 12:06:26.852 UTC [53] LOG:  invalid record length at 83/B12EDED8: wanted 24, got 0
2021-12-22 12:06:26.852 UTC [53] LOG:  redo done at 83/B12EDEA0
I, [2021-12-22T12:06:29.352869 #1]  INFO -- : 
I, [2021-12-22T12:06:29.353167 #1]  INFO -- : > su postgres -c 'createdb discourse' || true
2021-12-22 12:06:29.385 UTC [57] postgres@postgres FATAL:  the database system is starting up
2021-12-22 12:06:29.385 UTC [58] postgres@template1 FATAL:  the database system is starting up
createdb: error: could not connect to database template1: connection to server on socket "/var/run/postgresql/.s.PGSQL.5432" failed: FATAL:  the database system is starting up
I, [2021-12-22T12:06:29.386701 #1]  INFO -- : 
I, [2021-12-22T12:06:29.386897 #1]  INFO -- : > su postgres -c 'psql discourse -c "create user discourse;"' || true
2021-12-22 12:06:29.417 UTC [62] postgres@discourse FATAL:  the database system is starting up
psql: error: connection to server on socket "/var/run/postgresql/.s.PGSQL.5432" failed: FATAL:  the database system is starting up
I, [2021-12-22T12:06:29.418609 #1]  INFO -- : 
I, [2021-12-22T12:06:29.418798 #1]  INFO -- : > su postgres -c 'psql discourse -c "grant all privileges on database discourse to discourse;"' || true
2021-12-22 12:06:29.453 UTC [66] postgres@discourse FATAL:  the database system is starting up
psql: error: connection to server on socket "/var/run/postgresql/.s.PGSQL.5432" failed: FATAL:  the database system is starting up
I, [2021-12-22T12:06:29.454838 #1]  INFO -- : 
I, [2021-12-22T12:06:29.455124 #1]  INFO -- : > su postgres -c 'psql discourse -c "alter schema public owner to discourse;"'
2021-12-22 12:06:29.486 UTC [70] postgres@discourse FATAL:  the database system is starting up
psql: error: connection to server on socket "/var/run/postgresql/.s.PGSQL.5432" failed: FATAL:  the database system is starting up
I, [2021-12-22T12:06:29.487598 #1]  INFO -- : 
I, [2021-12-22T12:06:29.487929 #1]  INFO -- : Terminating async processes
I, [2021-12-22T12:06:29.487965 #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: 50
2021-12-22 12:06:29.488 UTC [50] LOG:  received fast shutdown request
I, [2021-12-22T12:06:39.488426 #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 pid:50 did not terminate cleanly, forcing termination!


ÉCHEC
--------------------
Pups::ExecError: su postgres -c 'psql discourse -c "alter schema public owner to discourse;"' failed with return #<Process::Status: pid 67 exit 2>
Lieu de l'échec : /pups/lib/pups/exec_command.rb:112:in `spawn'
exec failed with the params "su postgres -c 'psql $db_name -c \"alter schema public owner to $db_user;\"'"
7fee51af158f0ed17bf212e936826b00650dd82d1825ff48889479f7c0d3fade
** ÉCHEC DE L'AMORÇAGE ** veuillez faire défiler vers le haut et rechercher les messages d'erreur précédents, il peut y en avoir plus d'un.
./discourse-doctor peut aider à diagnostiquer le problème.
kinetiksoft:~$ sudo /usr/local/bin/discourse-tool rebuild
Architecture x86_64 détectée.
Vérification que le lanceur est à jour
Récupération de l'origine
Le lanceur est à jour
Arrêt de l'ancien conteneur
+ /usr/bin/docker stop -t 60 app
app
cd /pups && git pull && git checkout v1.0.3 && /pups/bin/pups --stdin
Déjà à jour.
Remarque : vérification de 'v1.0.3'.

Vous êtes dans un état de 'HEAD détaché'. Vous pouvez vous regarder autour, faire des changements
expérimentaux et les valider, et vous pouvez annuler tous les commits effectués dans cet
état sans impacter aucune branche en effectuant un autre checkout.

Si vous souhaitez créer une nouvelle branche pour conserver les commits que vous créez, vous pouvez
le faire (maintenant ou plus tard) en utilisant -b avec la commande de checkout à nouveau. Exemple :

  git checkout -b <nom-de-la-nouvelle-branche>

HEAD est maintenant à d1db030 couper une nouvelle version
I, [2021-12-22T12:08:33.310010 #1]  INFO -- : Chargement de --stdin
I, [2021-12-22T12:08:33.313979 #1]  INFO -- : > locale-gen $LANG && update-locale
I, [2021-12-22T12:08:33.333943 #1]  INFO -- : Génération des locales (cela peut prendre un moment)...
Génération terminée.

I, [2021-12-22T12:08:33.334119 #1]  INFO -- : > mkdir -p /shared/postgres_run
I, [2021-12-22T12:08:33.336004 #1]  INFO -- : 
I, [2021-12-22T12:08:33.336149 #1]  INFO -- : > chown postgres:postgres /shared/postgres_run
I, [2021-12-22T12:08:33.337638 #1]  INFO -- : 
I, [2021-12-22T12:08:33.337777 #1]  INFO -- : > chmod 775 /shared/postgres_run
I, [2021-12-22T12:08:33.339209 #1]  INFO -- : 
I, [2021-12-22T12:08:33.339293 #1]  INFO -- : > rm -fr /var/run/postgresql
I, [2021-12-22T12:08:33.340714 #1]  INFO -- : 
I, [2021-12-22T12:08:33.340818 #1]  INFO -- : > ln -s /shared/postgres_run /var/run/postgresql
I, [2021-12-22T12:08:33.342042 #1]  INFO -- : 
I, [2021-12-22T12:08:33.342136 #1]  INFO -- : > socat /dev/null UNIX-CONNECT:/shared/postgres_run/.s.PGSQL.5432 || exit 0 && echo postgres already running stop container ; exit 1
2021/12/22 12:08:33 socat[27] E connect(6, AF=1 "/shared/postgres_run/.s.PGSQL.5432", 36): Connection refused
I, [2021-12-22T12:08:33.344996 #1]  INFO -- : 
I, [2021-12-22T12:08:33.345091 #1]  INFO -- : > rm -fr /shared/postgres_run/.s*
I, [2021-12-22T12:08:33.346977 #1]  INFO -- : 
I, [2021-12-22T12:08:33.347081 #1]  INFO -- : > rm -fr /shared/postgres_run/*.pid
I, [2021-12-22T12:08:33.348866 #1]  INFO -- : 
I, [2021-12-22T12:08:33.348953 #1]  INFO -- : > mkdir -p /shared/postgres_run/13-main.pg_stat_tmp
I, [2021-12-22T12:08:33.350474 #1]  INFO -- : 
I, [2021-12-22T12:08:33.350644 #1]  INFO -- : > chown postgres:postgres /shared/postgres_run/13-main.pg_stat_tmp
I, [2021-12-22T12:08:33.352043 #1]  INFO -- : 
I, [2021-12-22T12:08:33.355013 #1]  INFO -- : File > /etc/service/postgres/run  chmod: +x  chown: 
I, [2021-12-22T12:08:33.357838 #1]  INFO -- : File > /etc/service/postgres/log/run  chmod: +x  chown: 
I, [2021-12-22T12:08:33.360727 #1]  INFO -- : File > /etc/runit/3.d/99-postgres  chmod: +x  chown: 
I, [2021-12-22T12:08:33.364940 #1]  INFO -- : File > /root/upgrade_postgres  chmod: +x  chown: 
I, [2021-12-22T12:08:33.365242 #1]  INFO -- : > chown -R root /var/lib/postgresql/13/main
I, [2021-12-22T12:09:12.888922 #1]  INFO -- : 
I, [2021-12-22T12:09:12.889060 #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, [2021-12-22T12:09:12.890602 #1]  INFO -- : 
I, [2021-12-22T12:09:12.890637 #1]  INFO -- : > chown -R postgres:postgres /shared/postgres_data
I, [2021-12-22T12:09:12.905164 #1]  INFO -- : 
I, [2021-12-22T12:09:12.905282 #1]  INFO -- : > chown -R postgres:postgres /var/run/postgresql
I, [2021-12-22T12:09:12.907055 #1]  INFO -- : 
I, [2021-12-22T12:09:12.907187 #1]  INFO -- : > /root/upgrade_postgres
I, [2021-12-22T12:09:12.910221 #1]  INFO -- : 
I, [2021-12-22T12:09:12.910336 #1]  INFO -- : > rm /root/upgrade_postgres
I, [2021-12-22T12:09:12.911656 #1]  INFO -- : 
I, [2021-12-22T12:09:12.911836 #1]  INFO -- : Remplacement de data_directory = '/var/lib/postgresql/13/main' par data_directory = '/shared/postgres_data' dans /etc/postgresql/13/main/postgresql.conf
I, [2021-12-22T12:09:12.912203 #1]  INFO -- : Remplacement de (?-mix:#?listen_addresses *=.*) par listen_addresses = '*' dans /etc/postgresql/13/main/postgresql.conf
I, [2021-12-22T12:09:12.933927 #1]  INFO -- : Remplacement de (?-mix:#?synchronous_commit *=.*) par synchronous_commit = $db_synchronous_commit dans /etc/postgresql/13/main/postgresql.conf
I, [2021-12-22T12:09:12.934365 #1]  INFO -- : Remplacement de (?-mix:#?shared_buffers *=.*) par shared_buffers = $db_shared_buffers dans /etc/postgresql/13/main/postgresql.conf
I, [2021-12-22T12:09:12.934753 #1]  INFO -- : Remplacement de (?-mix:#?work_mem *=.*) par work_mem = $db_work_mem dans /etc/postgresql/13/main/postgresql.conf
I, [2021-12-22T12:09:12.935135 #1]  INFO -- : Remplacement de (?-mix:#?default_text_search_config *=.*) par default_text_search_config = '$db_default_text_search_config' dans /etc/postgresql/13/main/postgresql.conf
I, [2021-12-22T12:09:12.935459 #1]  INFO -- : > install -d -m 0755 -o postgres -g postgres /shared/postgres_backup
I, [2021-12-22T12:09:12.938583 #1]  INFO -- : 
I, [2021-12-22T12:09:12.938889 #1]  INFO -- : Remplacement de (?-mix:#?checkpoint_segments *=.*) par checkpoint_segments = $db_checkpoint_segments dans /etc/postgresql/13/main/postgresql.conf
I, [2021-12-22T12:09:12.939246 #1]  INFO -- : Remplacement de (?-mix:#?logging_collector *=.*) par logging_collector = $db_logging_collector dans /etc/postgresql/13/main/postgresql.conf
I, [2021-12-22T12:09:12.939664 #1]  INFO -- : Remplacement de (?-mix:#?log_min_duration_statement *=.*) par log_min_duration_statement = $db_log_min_duration_statement dans /etc/postgresql/13/main/postgresql.conf
I, [2021-12-22T12:09:12.940011 #1]  INFO -- : Remplacement de (?-mix:^#local +replication +postgres +peer$) par local replication postgres  peer dans /etc/postgresql/13/main/pg_hba.conf
I, [2021-12-22T12:09:12.940375 #1]  INFO -- : Remplacement de (?-mix:^host.*all.*all.*127.*$) par host all all 0.0.0.0/0 md5 dans /etc/postgresql/13/main/pg_hba.conf
I, [2021-12-22T12:09:12.940711 #1]  INFO -- : Remplacement de (?-mix:^host.*all.*all.*::1\/128.*$) par host all all ::/0 md5 dans /etc/postgresql/13/main/pg_hba.conf
I, [2021-12-22T12:09:12.941023 #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, [2021-12-22T12:09:12.942680 #1]  INFO -- : > sleep 5
2021-12-22 12:09:13.078 UTC [50] LOG:  démarrage de PostgreSQL 13.5 (Debian 13.5-1.pgdg100+1) sur x86_64-pc-linux-gnu, compilé par gcc (Debian 8.3.0-6) 8.3.0, 64-bit
2021-12-22 12:09:13.078 UTC [50] LOG:  écoute sur l'adresse IPv4 "0.0.0.0", port 5432
2021-12-22 12:09:13.078 UTC [50] LOG:  écoute sur l'adresse IPv6 "::", port 5432
2021-12-22 12:09:13.130 UTC [50] LOG:  écoute sur le socket Unix "/var/run/postgresql/.s.PGSQL.5432"
2021-12-22 12:09:13.198 UTC [53] LOG:  l'arrêt du système de base de données a été interrompu ; dernier état connu actif à 2021-12-22 12:06:26 UTC
2021-12-22 12:09:13.916 UTC [53] LOG:  le système de base de données n'a pas été correctement arrêté ; récupération automatique en cours
2021-12-22 12:09:13.967 UTC [53] LOG:  redo starts at 83/B07EB758
2021-12-22 12:09:13.992 UTC [53] LOG:  invalid record length at 83/B12EDED8: wanted 24, got 0
2021-12-22 12:09:13.992 UTC [53] LOG:  redo done at 83/B12EDEA0
I, [2021-12-22T12:09:17.952534 #1]  INFO -- : 
I, [2021-12-22T12:09:17.952786 #1]  INFO -- : > su postgres -c 'createdb discourse' || true
2021-12-22 12:09:17.984 UTC [57] postgres@postgres FATAL:  the database system is starting up
2021-12-22 12:09:17.985 UTC [58] postgres@template1 FATAL:  the database system is starting up
createdb: error: could not connect to database template1: connection to server on socket "/var/run/postgresql/.s.PGSQL.5432" failed: FATAL:  the database system is starting up
I, [2021-12-22T12:09:17.986173 #1]  INFO -- : 
I, [2021-12-22T12:09:17.986413 #1]  INFO -- : > su postgres -c 'psql discourse -c "create user discourse;"' || true
2021-12-22 12:09:18.016 UTC [62] postgres@discourse FATAL:  the database system is starting up
psql: error: connection to server on socket "/var/run/postgresql/.s.PGSQL.5432" failed: FATAL:  the database system is starting up
I, [2021-12-22T12:09:18.018083 #1]  INFO -- : 
I, [2021-12-22T12:09:18.018325 #1]  INFO -- : > su postgres -c 'psql discourse -c "grant all privileges on database discourse to discourse;"' || true
2021-12-22 12:09:18.049 UTC [66] postgres@discourse FATAL:  the database system is starting up
psql: error: connection to server on socket "/var/run/postgresql/.s.PGSQL.5432" failed: FATAL:  the database system is starting up
I, [2021-12-22T12:09:18.051088 #1]  INFO -- : 
I, [2021-12-22T12:09:18.051313 #1]  INFO -- : > su postgres -c 'psql discourse -c "alter schema public owner to discourse;"'
2021-12-22 12:09:18.081 UTC [70] postgres@discourse FATAL:  the database system is starting up
psql: error: connection to server on socket "/var/run/postgresql/.s.PGSQL.5432" failed: FATAL:  the database system is starting up
I, [2021-12-22T12:09:18.082181 #1]  INFO -- : 
I, [2021-12-22T12:09:18.082516 #1]  INFO -- : Terminating async processes
I, [2021-12-22T12:09:18.082549 #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: 50
2021-12-22 12:09:18.082 UTC [50] LOG:  received fast shutdown request
I, [2021-12-22T12:09:28.083088 #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 pid:50 did not terminate cleanly, forcing termination!


ÉCHEC
--------------------
Pups::ExecError: su postgres -c 'psql discourse -c "alter schema public owner to discourse;"' failed with return #<Process::Status: pid 67 exit 2>
Lieu de l'échec : /pups/lib/pups/exec_command.rb:112:in `spawn'
exec failed with the params "su postgres -c 'psql $db_name -c \"alter schema public owner to $db_user;\"'"
1c37ea92329dcf84d63aebbb7c326ab53b3bdae35f538566effc9009403369fd
** ÉCHEC DE L'AMORÇAGE ** veuillez faire défiler vers le haut et rechercher les messages d'erreur précédents, il peut y en avoir plus d'un.
./discourse-doctor peut aider à diagnostiquer le problème.
kinetiksoft:~$ sudo /usr/local/bin/discourse-tool rebuild
Architecture x86_64 détectée.
Vérification que le lanceur est à jour
Récupération de l'origine
Le lanceur est à jour
Arrêt de l'ancien conteneur
+ /usr/bin/docker stop -t 60 app
app
cd /pups && git pull && git checkout v1.0.3 && /pups/bin/pups --stdin
Déjà à jour.
Remarque : vérification de 'v1.0.3'.

Vous êtes dans un état de 'HEAD détaché'. Vous pouvez vous regarder autour, faire des changements
expérimentaux et les valider, et vous pouvez annuler tous les commits effectués dans cet
état sans impacter aucune branche en effectuant un autre checkout.

Si vous souhaitez créer une nouvelle branche pour conserver les commits que vous créez, vous pouvez
le faire (maintenant ou plus tard) en utilisant -b avec la commande de checkout à nouveau. Exemple :

  git checkout -b <nom-de-la-nouvelle-branche>

HEAD est maintenant à d1db030 couper une nouvelle version
I, [2021-12-22T12:17:14.375608 #1]  INFO -- : Chargement de --stdin
I, [2021-12-22T12:17:14.380128 #1]  INFO -- : > locale-gen $LANG && update-locale
I, [2021-12-22T12:17:14.401507 #1]  INFO -- : Génération des locales (cela peut prendre un moment)...
Génération terminée.

I, [2021-12-22T12:17:14.401656 #1]  INFO -- : > mkdir -p /shared/postgres_run
I, [2021-12-22T12:17:14.403445 #1]  INFO -- : 
I, [2021-12-22T12:17:14.403608 #1]  INFO -- : > chown postgres:postgres /shared/postgres_run
I, [2021-12-22T12:17:14.405191 #1]  INFO -- : 
I, [2021-12-22T12:17:14.405358 #1]  INFO -- : > chmod 775 /shared/postgres_run
I, [2021-12-22T12:17:14.406697 #1]  INFO -- : 
I, [2021-12-22T12:17:14.406802 #1]  INFO -- : > rm -fr /var/run/postgresql
I, [2021-12-22T12:17:14.408253 #1]  INFO -- : 
I, [2021-12-22T12:17:14.408361 #1]  INFO -- : > ln -s /shared/postgres_run /var/run/postgresql
I, [2021-12-22T12:17:14.412388 #1]  INFO -- : 
I, [2021-12-22T12:17:14.412496 #1]  INFO -- : > socat /dev/null UNIX-CONNECT:/shared/postgres_run/.s.PGSQL.5432 || exit 0 && echo postgres already running stop container ; exit 1
2021/12/22 12:17:14 socat[27] E connect(6, AF=1 "/shared/postgres_run/.s.PGSQL.5432", 36): Connection refused
I, [2021-12-22T12:17:14.415572 #1]  INFO -- : 
I, [2021-12-22T12:17:14.415677 #1]  INFO -- : > rm -fr /shared/postgres_run/.s*
I, [2021-12-22T12:17:14.417476 #1]  INFO -- : 
I, [2021-12-22T12:17:14.417589 #1]  INFO -- : > rm -fr /shared/postgres_run/*.pid
I, [2021-12-22T12:17:14.419317 #1]  INFO -- : 
I, [2021-12-22T12:17:14.419428 #1]  INFO -- : > mkdir -p /shared/postgres_run/13-main.pg_stat_tmp
I, [2021-12-22T12:17:14.420864 #1]  INFO -- : 
I, [2021-12-22T12:17:14.421005 #1]  INFO -- : > chown postgres:postgres /shared/postgres_run/13-main.pg_stat_tmp
I, [2021-12-22T12:17:14.422356 #1]  INFO -- : 
I, [2021-12-22T12:17:14.425488 #1]  INFO -- : File > /etc/service/postgres/run  chmod: +x  chown: 
I, [2021-12-22T12:17:14.428251 #1]  INFO -- : File > /etc/service/postgres/log/run  chmod: +x  chown: 
I, [2021-12-22T12:17:14.431100 #1]  INFO -- : File > /etc/runit/3.d/99-postgres  chmod: +x  chown: 
I, [2021-12-22T12:17:14.433890 #1]  INFO -- : File > /root/upgrade_postgres  chmod: +x  chown: 
I, [2021-12-22T12:17:14.434069 #1]  INFO -- : > chown -R root /var/lib/postgresql/13/main
I, [2021-12-22T12:17:56.907961 #1]  INFO -- : 
I, [2021-12-22T12:17:56.908121 #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, [2021-12-22T12:17:56.909780 #1]  INFO -- : 
I, [2021-12-22T12:17:56.909834 #1]  INFO -- : > chown -R postgres:postgres /shared/postgres_data
I, [2021-12-22T12:17:56.924298 #1]  INFO -- : 
I, [2021-12-22T12:17:56.924455 #1]  INFO -- : > chown -R postgres:postgres /var/run/postgresql
I, [2021-12-22T12:17:56.926015 #1]  INFO -- : 
I, [2021-12-22T12:17:56.926194 #1]  INFO -- : > /root/upgrade_postgres
I, [2021-12-22T12:17:56.929052 #1]  INFO -- : 
I, [2021-12-22T12:17:56.929149 #1]  INFO -- : > rm /root/upgrade_postgres
I, [2021-12-22T12:17:56.930512 #1]  INFO -- : 
I, [2021-12-22T12:17:56.930689 #1]  INFO -- : Remplacement de data_directory = '/var/lib/postgresql/13/main' par data_directory = '/shared/postgres_data' dans /etc/postgresql/13/main/postgresql.conf
I, [2021-12-22T12:17:56.931044 #1]  INFO -- : Remplacement de (?-mix:#?listen_addresses *=.*) par listen_addresses = '*' dans /etc/postgresql/13/main/postgresql.conf
I, [2021-12-22T12:17:56.931281 #1]  INFO -- : Remplacement de (?-mix:#?synchronous_commit *=.*) par synchronous_commit = $db_synchronous_commit dans /etc/postgresql/13/main/postgresql.conf
I, [2021-12-22T12:17:56.931519 #1]  INFO -- : Remplacement de (?-mix:#?shared_buffers *=.*) par shared_buffers = $db_shared_buffers dans /etc/postgresql/13/main/postgresql.conf
I, [2021-12-22T12:17:56.931779 #1]  INFO -- : Remplacement de (?-mix:#?work_mem *=.*) par work_mem = $db_work_mem dans /etc/postgresql/13/main/postgresql.conf
I, [2021-12-22T12:17:56.932014 #1]  INFO -- : Remplacement de (?-mix:#?default_text_search_config *=.*) par default_text_search_config = '$db_default_text_search_config' dans /etc/postgresql/13/main/postgresql.conf
I, [2021-12-22T12:17:56.932277 #1]  INFO -- : > install -d -m 0755 -o postgres -g postgres /shared/postgres_backup
I, [2021-12-22T12:17:56.934064 #1]  INFO -- : 
I, [2021-12-22T12:17:56.934292 #1]  INFO -- : Remplacement de (?-mix:#?checkpoint_segments *=.*) par checkpoint_segments = $db_checkpoint_segments dans /etc/postgresql/13/main/postgresql.conf
I, [2021-12-22T12:17:56.934531 #1]  INFO -- : Remplacement de (?-mix:#?logging_collector *=.*) par logging_collector = $db_logging_collector dans /etc/postgresql/13/main/postgresql.conf
I, [2021-12-22T12:17:56.934769 #1]  INFO -- : Remplacement de (?-mix:#?log_min_duration_statement *=.*) par log_min_duration_statement = $db_log_min_duration_statement dans /etc/postgresql/13/main/postgresql.conf
I, [2021-12-22T12:17:56.935003 #1]  INFO -- : Remplacement de (?-mix:^#local +replication +postgres +peer$) par local replication postgres  peer dans /etc/postgresql/13/main/pg_hba.conf
I, [2021-12-22T12:17:56.935192 #1]  INFO -- : Remplacement de (?-mix:^host.*all.*all.*127.*$) par host all all 0.0.0.0/0 md5 dans /etc/postgresql/13/main/pg_hba.conf
I, [2021-12-22T12:17:56.935351 #1]  INFO -- : Remplacement de (?-mix:^host.*all.*all.*::1\/128.*$) par host all all ::/0 md5 dans /etc/postgresql/13/main/pg_hba.conf
I, [2021-12-22T12:17:56.935501 #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, [2021-12-22T12:17:56.936492 #1]  INFO -- : > sleep 5
2021-12-22 12:17:57.065 UTC [50] LOG:  démarrage de PostgreSQL 13.5 (Debian 13.5-1.pgdg100+1) sur x86_64-pc-linux-gnu, compilé par gcc (Debian 8.3.0-6) 8.3.0, 64-bit
2021-12-22 12:17:57.065 UTC [50] LOG:  écoute sur l'adresse IPv4 "0.0.0.0", port 5432
2021-12-22 12:17:57.065 UTC [50] LOG:  écoute sur l'adresse IPv6 "::", port 5432
2021-12-22 12:17:57.133 UTC [50] LOG:  écoute sur le socket Unix "/var/run/postgresql/.s.PGSQL.5432"
2021-12-22 12:17:57.201 UTC [53] LOG:  l'arrêt du système de base de données a été interrompu ; dernier état connu actif à 2021-12-22 12:16:34 UTC
2021-12-22 12:17:57.810 UTC [53] LOG:  le système de base de données n'a pas été correctement arrêté ; récupération automatique en cours
2021-12-22 12:17:57.845 UTC [53] LOG:  redo starts at 83/B12EDF50
2021-12-22 12:17:58.554 UTC [53] LOG:  invalid record length at 83/BA520118: wanted 24, got 0
2021-12-22 12:17:58.554 UTC [53] LOG:  redo done at 83/BA5200F0
I, [2021-12-22T12:18:01.937956 #1]  INFO -- : 
I, [2021-12-22T12:18:01.938274 #1]  INFO -- : > su postgres -c 'createdb discourse' || true
2021-12-22 12:18:01.968 UTC [57] postgres@postgres FATAL:  the database system is starting up
2021-12-22 12:18:01.969 UTC [58] postgres@template1 FATAL:  the database system is starting up
createdb: error: could not connect to database template1: connection to server on socket "/var/run/postgresql/.s.PGSQL.5432" failed: FATAL:  the database system is starting up
I, [2021-12-22T12:18:01.970057 #1]  INFO -- : 
I, [2021-12-22T12:18:01.970258 #1]  INFO -- : > su postgres -c 'psql discourse -c "create user discourse;"' || true
2021-12-22 12:18:02.000 UTC [62] postgres@discourse FATAL:  the database system is starting up
psql: error: connection to server on socket "/var/run/postgresql/.s.PGSQL.5432" failed: FATAL:  the database system is starting up
I, [2021-12-22T12:18:02.001459 #1]  INFO -- : 
I, [2021-12-22T12:18:02.001709 #1]  INFO -- : > su postgres -c 'psql discourse -c "grant all privileges on database discourse to discourse;"' || true
2021-12-22 12:18:02.033 UTC [66] postgres@discourse FATAL:  the database system is starting up
psql: error: connection to server on socket "/var/run/postgresql/.s.PGSQL.5432" failed: FATAL:  the database system is starting up
I, [2021-12-22T12:18:02.034185 #1]  INFO -- : 
I, [2021-12-22T12:18:02.034419 #1]  INFO -- : > su postgres -c 'psql discourse -c "alter schema public owner to discourse;"'
2021-12-22 12:18:02.064 UTC [70] postgres@discourse FATAL:  the database system is starting up
psql: error: connection to server on socket "/var/run/postgresql/.s.PGSQL.5432" failed: FATAL:  the database system is starting up
I, [2021-12-22T12:18:02.065753 #1]  INFO -- : 
I, [2021-12-22T12:18:02.066059 #1]  INFO -- : Terminating async processes
I, [2021-12-22T12:18:02.066082 #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: 50
2021-12-22 12:18:02.066 UTC [50] LOG:  received fast shutdown request
I, [2021-12-22T12:18:12.066665 #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 pid:50 did not terminate cleanly, forcing termination!


ÉCHEC
--------------------
Pups::ExecError: su postgres -c 'psql discourse -c "alter schema public owner to discourse;"' failed with return #<Process::Status: pid 67 exit 2>
Lieu de l'échec : /pups/lib/pups/exec_command.rb:112:in `spawn'
exec failed with the params "su postgres -c 'psql $db_name -c \"alter schema public owner to $db_user;\"'"
c05642e47b7cc5a7871faa3bf73549342017cbe76da749c7fb23bcb40da0b2dc
** ÉCHEC DE L'AMORÇAGE ** veuillez faire défiler vers le haut et rechercher les messages d'erreur précédents, il peut y en avoir plus d'un.
./discourse-doctor peut aider à diagnostiquer le problème.
kinetiksoft:~$ 
La session a été fermée

Il ne s’arrête pas, il ne démarre pas correctement car le journal de redo est endommagé. Si vous avez une sauvegarde, vous devriez envisager de la récupérer sur une instance vierge.

Mais l’instance fonctionne bien dans l’ensemble, elle commence à se comporter ainsi uniquement lors de la reconstruction. Que pouvons-nous faire pour reconstruire le forum comme nous l’avons fait plusieurs fois auparavant ?

Lorsque cela se produit, nous remplaçons généralement (temporairement, car sinon Git se perd lors de la mise à jour la prochaine fois) sleep 5 par quelques secondes supplémentaires afin que Postgres ait plus de temps pour s’installer/se rétablir.

Si vous incluez un fichier postgres.template.yml différent, modifiez celui-ci bien sûr.

Cela a fonctionné à la perfection. Merci !