Problem beim Upgrade auf die neueste Version

Hi, I am trying to update Discourse to the latest version.

FAILED
--------------------
Pups::ExecError: /root/upgrade_postgres failed with return #<Process::Status: pid 45 exit 1>
Location of failure: /pups/lib/pups/exec_command.rb:112:in `spawn'
exec failed with the params "/root/upgrade_postgres"
1cafe54cd6661316d8e9e393c54f73ab89bc3f5e70e104f6c5e4f8794053c09c
** 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.

Also

 Success. You can now start the database server using:

    pg_ctlcluster 10 main start

Warning: The selected stats_temp_directory /var/run/postgresql/10-main.pg_stat_tmp
is not writable for the cluster owner. Not adding this setting in
postgresql.conf.
Ver Cluster Port Status Owner    Data directory              Log file
10  main    5433 down   postgres /var/lib/postgresql/10/main /var/log/postgresql/postgresql-10-main.log
update-alternatives: warning: forcing reinstallation of alternative /usr/share/postgresql/12/man/man1/postmaster.1.gz because link group postmaster.1.gz is broken
invoke-rc.d: could not determine current runlevel
invoke-rc.d: policy-rc.d denied execution of start.
Processing triggers for postgresql-common (213.pgdg100+1) ...
Building PostgreSQL dictionaries from installed myspell/hunspell packages...
Removing obsolete dictionary files:
Stopping PostgreSQL 10 database server: main.
Stopping PostgreSQL 12 database server: main.
Performing Consistency Checks
-----------------------------
Checking cluster versions                                   ok

The source cluster was not shut down cleanly.
Failure, exiting

Output of tail -f shared/standalone/log/var-log/postgres/current command:

2020-06-14 01:37:02.155 UTC [3508] FATAL:  data directory "/shared/postgres_data" has wrong ownership
2020-06-14 01:37:02.155 UTC [3508] HINT:  The server must be started by the user that owns the data directory.

Postponing the update

If you need to postpone the update during your next rebuild, you can swap the PostgreSQL template on your app.yml file by changing "templates/postgres.template.yml" to "templates/postgres.10.template.yml" .

This is not recommended, as some site admins will forget to revert the change afterwards.

I applied this and the Discourse forum is now online. What can we do next? Currently, I am using “templates/postgres.10.template.yml”

Any ideas? I am still using “templates/postgres.10.template.yml".

Versuchen Sie Folgendes:

  1. Bearbeiten Sie die app.yml und ändern Sie "templates/postgres.10.template.yml" in "templates/postgres.template.yml".

  2. Starten Sie einen Stopp-Vorgang: ./launcher stop app

  3. Versuchen Sie einen Neuaufbau: ./launcher rebuild app

2 „Gefällt mir“

Upgrade abgeschlossen

Optimierer-Statistiken werden von pg_upgrade nicht übertragen. Sobald Sie den neuen Server starten, sollten Sie Folgendes ausführen:
./analyze_new_cluster.sh

Die Ausführung dieses Skripts löscht die Datenfiles des alten Clusters:
./delete_old_cluster.sh

POSTGRES-UPGRADE ABGESCHLOSSEN

Die alte Datenbank 10 befindet sich unter /shared/postgres_data_old

Um das Upgrade abzuschließen, führen Sie erneut einen rebuild durch:

./launcher rebuild app

Das Discourse-Forum ist derzeit offline.

Ich versuche, ./launcher rebuild app erneut wie oben angegeben auszuführen.

Ja, das ist zu erwarten.

Ja, befolge die Anweisungen, und es sollte bald wieder verfügbar sein.

1 „Gefällt mir“

Interessant und großartig, das Update wurde erfolgreich abgeschlossen. Ich habe es schon oft auf die gleiche Weise versucht, aber es ist nie passiert.

Muss ich die folgenden Befehle verwenden, um den Speicherplatz freizugeben?

Die Statistiken des Optimierers werden von pg_upgrade nicht übertragen, daher
sollten Sie nach dem Start des neuen Servers Folgendes ausführen:
    ./analyze_new_cluster.sh

Das Ausführen dieses Skripts löscht die Datenfiles des alten Clusters:
    ./delete_old_cluster.sh

Vielen Dank!

Sie können die in unserem FAQ aufgeführten Optionalen Aufgaben nach dem Update ausführen.

1 „Gefällt mir“

Wunderbar. Nochmals vielen Dank!

1 „Gefällt mir“

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.