Ich habe mein Discourse im Laufe der Jahre mehrfach aktualisiert, meist ohne Probleme. Ich erhielt eine Meldung, dass mein Discourse aktualisiert werden muss. Zunächst versuchte ich das Update über das Web, doch es wurde mir mitgeteilt, dass ich mich einloggen und ./launcher app rebuild ausführen müsse. Das habe ich auch getan.
Nachfolgend der Fehler, der anscheinend mit dem PostgreSQL-Upgrade zusammenhängt. Ich habe im Forum gesucht und festgestellt, dass es spezielle Anweisungen für das Upgrade von PostgreSQL gibt. Da mir jedoch nicht bewusst war, dass dies Teil dieses Updates ist, habe ich diese nicht befolgt. Nach dem Fehler habe ich versucht, die Schritte nachzugehen, doch auch diese schlagen fehl.
Dies ist die Ausgabe des fehlgeschlagenen Updates:
wordsmith@digitalwind-ubuntu-20:/var/discourse$ sudo ./launcher rebuild app
[sudo] password for wordsmith:
Sorry, try again.
[sudo] password for wordsmith:
Sorry, try again.
[sudo] password for wordsmith:
x86_64 arch detected.
WARNING: containers/app.yml file is world-readable. You can secure this file by running: chmod o-rwx containers/app.yml
Ensuring launcher is up to date
Fetching origin
remote: Enumerating objects: 765, done.
remote: Counting objects: 100% (299/299), done.
remote: Compressing objects: 100% (67/67), done.
remote: Total 765 (delta 252), reused 244 (delta 226), pack-reused 466 (from 4)
Receiving objects: 100% (765/765), 292.42 KiB | 9.75 MiB/s, done.
Resolving deltas: 100% (430/430), completed with 44 local objects.
From https://github.com/discourse/discourse_docker
ffa8264..efd6bc8 main -> origin/main
* [new branch] consolidate_layers -> origin/consolidate_layers
* [new branch] dev-nginx-conf -> origin/dev-nginx-conf
* [new branch] docker-compose-generate -> origin/docker-compose-generate
* [new branch] gh-action-upload-to-release -> origin/gh-action-upload-to-release
* [new branch] nginx-conf-updates -> origin/nginx-conf-updates
* [new branch] parameterize-config-filename -> origin/parameterize-config-filename
* [new branch] pento/dev-test-pnpm-10 -> origin/pento/dev-test-pnpm-10
* [new branch] revert_only_shipping_en_us_locales -> origin/revert_only_shipping_en_us_locales
* [new branch] slim-image-3 -> origin/slim-image-3
* [new branch] update-build-compile-steps -> origin/update-build-compile-steps
* [new branch] update-launcher -> origin/update-launcher
* [new branch] update_tag -> origin/update_tag
Updating Launcher...
Updating ffa8264..efd6bc8
Fast-forward
.github/workflows/build.yml | 257 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++-----------------------------------
.gitignore | 2 +
discourse-setup | 23 ++++++----
image/README.md | 12 +----
image/auto_build.rb | 103 +++++++++++++++++++++++++++++++++---------
image/base/Dockerfile | 178 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
image/base/install-imagemagick | 26 +++++------
image/base/install-jemalloc | 6 +--
image/base/install-nginx | 13 +++---
image/base/install-oxipng | 35 ++++++++-------
image/base/install-redis | 4 +-
image/base/install-ruby | 16 -------
image/base/install-rust | 2 +-
image/base/nginx_public_keys.key | 374 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
image/base/release.Dockerfile | 16 -------
image/base/slim.Dockerfile | 128 ----------------------------------------------------
image/discourse_bench/Dockerfile | 34 --------------
image/discourse_bench/run_bench.sh | 19 --------
image/discourse_dev/Dockerfile | 38 ++++++++++++++--
image/discourse_dev/postgres_dev.template.yml | 41 +++--------------
image/discourse_fast_switch/Dockerfile | 23 ----------
image/discourse_fast_switch/create_switch.rb | 24 ----------
image/discourse_test/Dockerfile | 10 ++---
image/discourse_test/install-chrome | 2 +-
image/monitor/Dockerfile | 13 ------
image/monitor/src/monitor.rb | 98 ----------------------------------------
launcher | 6 +--
scripts/launcher-completion.bash | 44 ++++++++++++++++++
templates/import/mbox.template.yml | 2 +-
templates/import/mssql-dep.template.yml | 2 +-
templates/import/mysql-dep.template.yml | 2 +-
templates/import/phpbb3.template.yml | 2 +-
templates/import/vanilla.template.yml | 30 +++++++------
templates/postgres.10.template.yml | 3 +-
templates/postgres.12.template.yml | 3 +-
templates/postgres.13.template.yml | 175 +++++++++++++++++++++++++++--------------------------------------------
templates/postgres.15.template.yml | 62 ++++++++++++++------------
templates/postgres.9.5.template.yml | 3 +-
templates/postgres.template.yml | 105 ++++++++++++++++++++++++++-----------------
templates/redis.template.yml | 6 ++-
templates/web.china.template.yml | 3 +-
templates/web.socketed.template.yml | 4 +-
templates/web.ssl.template.yml | 32 ++++++-------
templates/web.template.yml | 23 +++++-----
44 files changed, 1186 insertions(+), 818 deletions(-)
create mode 100644 image/base/Dockerfile
delete mode 100755 image/base/install-ruby
create mode 100644 image/base/nginx_public_keys.key
delete mode 100644 image/base/release.Dockerfile
delete mode 100644 image/base/slim.Dockerfile
delete mode 100644 image/discourse_bench/Dockerfile
delete mode 100644 image/discourse_bench/run_bench.sh
delete mode 100644 image/discourse_fast_switch/Dockerfile
delete mode 100644 image/discourse_fast_switch/create_switch.rb
delete mode 100644 image/monitor/Dockerfile
delete mode 100644 image/monitor/src/monitor.rb
create mode 100644 scripts/launcher-completion.bash
Launcher updated, restarting...
WARNING: Docker version 20.10.7 deprecated, recommend upgrade to 24.0.7 or newer.
x86_64 arch detected.
WARNING: We are about to start downloading the Discourse base image
This process may take anywhere between a few minutes to an hour, depending on your network speed
Please be patient
2.0.20250129-0720: Pulling from discourse/base
af302e5c37e9: Pull complete
ed49ab5c933d: Pull complete
7cb9e730d898: Pull complete
7c28a6b187b2: Pull complete
23222af7238f: Pull complete
59b87d9ed5c1: Pull complete
90d60b432298: Pull complete
d3b3135aa82b: Pull complete
94e7b594395d: Pull complete
cf15e2c89d00: Pull complete
2c0cccf9ec27: Pull complete
5d8ea2a8d564: Pull complete
020f04b42275: Pull complete
06e22604f387: Pull complete
8b0ecc579aad: Pull complete
4d577f7424c0: Pull complete
37ef4781925f: Pull complete
30d67d1af761: Pull complete
43eaf8c26af4: Pull complete
02f4cc50eabd: Pull complete
93896ee36e56: Pull complete
fadd5d615e0e: Pull complete
85f9459cb30e: Pull complete
eaddca2afacb: Pull complete
f54443d29a2d: Pull complete
ed6f0f133683: Pull complete
3d1894dc563f: Pull complete
51ca3f63c909: Pull complete
b87374db2274: Pull complete
Digest: sha256:01b8516e5504c0e9bc3707773015ff4407be03a89154194ff3b5b8699291bc26
Status: Downloaded newer image for discourse/base:2.0.20250129-0720
docker.io/discourse/base:2.0.20250129-0720
WARNING: containers/app.yml file is world-readable. You can secure this file by running: chmod o-rwx containers/app.yml
Ensuring launcher is up to date
Fetching origin
Launcher is up-to-date
Stopping old container
+ /usr/bin/docker stop -t 600 app
app
2.0.20250129-0720: Pulling from discourse/base
Digest: sha256:01b8516e5504c0e9bc3707773015ff4407be03a89154194ff3b5b8699291bc26
Status: Image is up to date for discourse/base:2.0.20250129-0720
docker.io/discourse/base:2.0.20250129-0720
/usr/local/lib/ruby/gems/3.3.0/gems/pups-1.2.1/lib/pups.rb
/usr/local/bin/pups --stdin
I, [2025-02-06T00:07:56.208669 #1] INFO -- : Reading from stdin
I, [2025-02-06T00:07:56.232158 #1] INFO -- : File > /etc/service/postgres/run chmod: +x chown:
I, [2025-02-06T00:07:56.237056 #1] INFO -- : File > /etc/service/postgres/log/run chmod: +x chown:
I, [2025-02-06T00:07:56.242256 #1] INFO -- : File > /etc/runit/3.d/99-postgres chmod: +x chown:
I, [2025-02-06T00:07:56.246861 #1] INFO -- : File > /root/install_postgres chmod: +x chown:
I, [2025-02-06T00:07:56.251666 #1] INFO -- : File > /root/upgrade_postgres chmod: +x chown:
I, [2025-02-06T00:07:56.253133 #1] INFO -- : Replacing data_directory = '/var/lib/postgresql/15/main' with data_directory = '/shared/postgres_data' in /etc/postgresql/15/main/postgresql.conf
I, [2025-02-06T00:07:56.254477 #1] INFO -- : Replacing (?-mix:#?listen_addresses *=.*) with listen_addresses = '*' in /etc/postgresql/15/main/postgresql.conf
I, [2025-02-06T00:07:56.255380 #1] INFO -- : Replacing (?-mix:#?synchronous_commit *=.*) with synchronous_commit = $db_synchronous_commit in /etc/postgresql/15/main/postgresql.conf
I, [2025-02-06T00:07:56.256084 #1] INFO -- : Replacing (?-mix:#?shared_buffers *=.*) with shared_buffers = $db_shared_buffers in /etc/postgresql/15/main/postgresql.conf
I, [2025-02-06T00:07:56.256905 #1] INFO -- : Replacing (?-mix:#?work_mem *=.*) with work_mem = $db_work_mem in /etc/postgresql/15/main/postgresql.conf
I, [2025-02-06T00:07:56.257717 #1] INFO -- : Replacing (?-mix:#?default_text_search_config *=.*) with default_text_search_config = '$db_default_text_search_config' in /etc/postgresql/15/main/postgresql.conf
I, [2025-02-06T00:07:56.258521 #1] INFO -- : Replacing (?-mix:#?checkpoint_segments *=.*) with checkpoint_segments = $db_checkpoint_segments in /etc/postgresql/15/main/postgresql.conf
I, [2025-02-06T00:07:56.259186 #1] INFO -- : Replacing (?-mix:#?logging_collector *=.*) with logging_collector = $db_logging_collector in /etc/postgresql/15/main/postgresql.conf
I, [2025-02-06T00:07:56.265147 #1] INFO -- : Replacing (?-mix:#?log_min_duration_statement *=.*) with log_min_duration_statement = $db_log_min_duration_statement in /etc/postgresql/15/main/postgresql.conf
I, [2025-02-06T00:07:56.266734 #1] INFO -- : Replacing (?-mix:^#local +replication +postgres +peer$) with local replication postgres peer in /etc/postgresql/15/main/pg_hba.conf
I, [2025-02-06T00:07:56.267608 #1] INFO -- : Replacing (?-mix:^host.*all.*all.*127.*$) with host all all 0.0.0.0/0 md5 in /etc/postgresql/15/main/pg_hba.conf
I, [2025-02-06T00:07:56.268347 #1] INFO -- : Replacing (?-mix:^host.*all.*all.*::1\/128.*$) with host all all ::/0 md5 in /etc/postgresql/15/main/pg_hba.conf
I, [2025-02-06T00:07:56.268965 #1] INFO -- : > if [ -f /root/install_postgres ]; then
/root/install_postgres && rm -f /root/install_postgres
elif [ -e /shared/postgres_run/.s.PGSQL.5432 ]; then
socat /dev/null UNIX-CONNECT:/shared/postgres_run/.s.PGSQL.5432 || exit 0 && echo postgres already running stop container ; exit 1
fi
failed to set locale!
[error] character map file `UTF-8' not found: No such file or directory
failed to set locale!
[error] default character map file `ANSI_X3.4-1968' not found: No such file or directory
perl: warning: Setting locale failed.
perl: warning: Please check that your locale settings:
LANGUAGE = "en_US.UTF-8",
LC_ALL = "en_US.UTF-8",
LANG = "en_US.UTF-8"
are supported and installed on your system.
perl: warning: Falling back to the standard locale ("C").
/bin/bash: warning: setlocale: LC_ALL: cannot change locale (en_US.UTF-8)
popen failure: Cannot allocate memory
initdb: error: program "postgres" is needed by initdb but was not found in the same directory as "/usr/lib/postgresql/15/bin/initdb"
I, [2025-02-06T00:07:59.495629 #1] INFO -- : Generating locales (this might take a while)...
en_US.UTF-8... done
Generation complete.
Upgrading PostgreSQL from version 13 to 15
I, [2025-02-06T00:07:59.496900 #1] INFO -- : > HOME=/var/lib/postgresql USER=postgres exec chpst -u postgres:postgres:ssl-cert -U postgres:postgres:ssl-cert /usr/lib/postgresql/15/bin/postmaster -D /etc/postgresql/15/main
I, [2025-02-06T00:07:59.500783 #1] INFO -- : Terminating async processes
2025-02-06 00:07:59.629 UTC [51] FATAL: database files are incompatible with server
2025-02-06 00:07:59.629 UTC [51] DETAIL: The data directory was initialized by PostgreSQL version 13, which is not compatible with this version 15.10 (Debian 15.10-1.pgdg120+1).
Hilfe!!!