تحديث PostgreSQL 15

لقد واجهت نفس الخطأ، وما زال يفشل لدي الآن أيضًا

لقد حاولت

  • ./discourse-doctor، ولكن لم ينجح الأمر
  • ثم اعتقدت أن بعض المنافذ قيد الاستخدام، ولكن netstats لم يُظهر لي أي عملية تستخدم تلك المنافذ، ثم قمت بإعادة تشغيل المثيل لبدء جديد وإعادة بناء التطبيق، ولكن لا يزال الأمر غير ناجح

I, [2025-02-02T00:20:43.491510 #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

2025/02/02 00:20:46 socat[33] E connect(, AF=1 "/shared/postgres_run/.s.PGSQL.5432", 36): Connection refused
I, [2025-02-02T00:20:46.466110 #1]  INFO -- : Generating locales (this might take a while)...
  en_US.UTF-8... done
Generation complete.

I, [2025-02-02T00:20:46.467179 #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-02T00:20:46.480451 #1]  INFO -- : File > /usr/local/bin/create_db  chmod: +x  chown:
I, [2025-02-02T00:20:46.497621 #1]  INFO -- : File > /var/lib/postgresql/take-database-backup  chmod: +x  chown: postgres:postgres
I, [2025-02-02T00:20:46.504526 #1]  INFO -- : File > /var/spool/cron/crontabs/postgres  chmod:   chown:
I, [2025-02-02T00:20:46.505484 #1]  INFO -- : > sleep 5
2025-02-02 00:20:46.647 UTC [35] FATAL:  database files are incompatible with server
2025-02-02 00:20:46.647 UTC [35] 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).
I, [2025-02-02T00:20:51.511155 #1]  INFO -- :
I, [2025-02-02T00:20:51.511342 #1]  INFO -- : > /usr/local/bin/create_db
createdb: error: connection to server on socket "/var/run/postgresql/.s.PGSQL.5432" failed: Connection refused
	Is the server running locally and accepting connections on that socket?
psql: error: connection to server on socket "/var/run/postgresql/.s.PGSQL.5432" failed: Connection refused
	Is the server running locally and accepting connections on that socket?
psql: error: connection to server on socket "/var/run/postgresql/.s.PGSQL.5432" failed: Connection refused
	Is the server running locally and accepting connections on that socket?
psql: error: connection to server on socket "/var/run/postgresql/.s.PGSQL.5432" failed: Connection refused
	Is the server running locally and accepting connections on that socket?
psql: error: connection to server on socket "/var/run/postgresql/.s.PGSQL.5432" failed: Connection refused
	Is the server running locally and accepting connections on that socket?
psql: error: connection to server on socket "/var/run/postgresql/.s.PGSQL.5432" failed: Connection refused
	Is the server running locally and accepting connections on that socket?
psql: error: connection to server on socket "/var/run/postgresql/.s.PGSQL.5432" failed: Connection refused
	Is the server running locally and accepting connections on that socket?
psql: error: connection to server on socket "/var/run/postgresql/.s.PGSQL.5432" failed: Connection refused
	Is the server running locally and accepting connections on that socket?
psql: error: connection to server on socket "/var/run/postgresql/.s.PGSQL.5432" failed: Connection refused
	Is the server running locally and accepting connections on that socket?
psql: error: connection to server on socket "/var/run/postgresql/.s.PGSQL.5432" failed: Connection refused
	Is the server running locally and accepting connections on that socket?
psql: error: connection to server on socket "/var/run/postgresql/.s.PGSQL.5432" failed: Connection refused
	Is the server running locally and accepting connections on that socket?
psql: error: connection to server on socket "/var/run/postgresql/.s.PGSQL.5432" failed: Connection refused
	Is the server running locally and accepting connections on that socket?
psql: error: connection to server on socket "/var/run/postgresql/.s.PGSQL.5432" failed: Connection refused
	Is the server running locally and accepting connections on that socket?
I, [2025-02-02T00:20:52.474702 #1]  INFO -- :
I, [2025-02-02T00:20:52.475371 #1]  INFO -- : > echo postgres installed!
I, [2025-02-02T00:20:52.478084 #1]  INFO -- : postgres installed!

و

I, [2025-02-02T00:05:22.648865 #1]  INFO -- : > sleep 5
2025-02-02 00:05:22.792 UTC [35] FATAL:  database files are incompatible with server
2025-02-02 00:05:22.792 UTC [35] 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).
I, [2025-02-02T00:05:27.657230 #1]  INFO -- :
I, [2025-02-02T00:05:27.657387 #1]  INFO -- : > /usr/local/bin/create_db


481:M 02 Feb 2025 00:07:05.174 # Failed listening on port 6379 (TCP), aborting.

I, [2025-02-02T00:13:38.491603 #1]  INFO -- : > cd /var/www/discourse && su discourse -c 'bundle exec rake db:migrate'
URGENT: Failed to initialize site default: ActiveRecord::ConnectionNotEstablished connection to server on socket "/var/run/postgresql/.s.PGSQL.5432" failed: Connection refused
	Is the server running locally and accepting connections on that socket?


rake aborted!
ActiveRecord::ConnectionNotEstablished: connection to server on socket "/var/run/postgresql/.s.PGSQL.5432" failed: Connection refused (ActiveRecord::ConnectionNotEstablished)
	Is the server running locally and accepting connections on that socket?


Caused by:
PG::ConnectionBad: connection to server on socket "/var/run/postgresql/.s.PGSQL.5432" failed: Connection refused (PG::ConnectionBad)
	Is the server running locally and accepting connections on that socket?