2023-01-04 20:48:05.355 UTC [41] LOG: بدء تشغيل PostgreSQL 13.9 (Debian 13.9-1.pgdg110+1) على x86_64-pc-linux-gnu، تم تجميعه بواسطة gcc (Debian 10.2.1-6) 10.2.1 20210110، 64 بت
2023-01-04 20:48:05.377 UTC [41] LOG: الاستماع على عنوان IPv4 "0.0.0.0"، المنفذ 5432
2023-01-04 20:48:05.377 UTC [41] LOG: الاستماع على عنوان IPv6 "::"، المنفذ 5432
2023-01-04 20:48:05.566 UTC [41] LOG: الاستماع على مقبس Unix "/var/run/postgresql/.s.PGSQL.5432"
2023-01-04 20:48:05.734 UTC [44] LOG: تم إيقاف تشغيل نظام قاعدة البيانات في 2023-01-04 20:46:17 UTC
2023-01-04 20:48:05.878 UTC [41] LOG: نظام قاعدة البيانات جاهز لقبول الاتصالات
I, [2023-01-04T20:48:09.779985 #1] INFO -- :
I, [2023-01-04T20:48:09.780390 #1] INFO -- : > su postgres -c 'createdb discourse' || true
2023-01-04 20:48:10.014 UTC [54] postgres@postgres ERROR: قاعدة البيانات "discourse" موجودة بالفعل
2023-01-04 20:48:10.014 UTC [54] postgres@postgres STATEMENT: CREATE DATABASE discourse;
createdb: error: فشل إنشاء قاعدة البيانات: ERROR: قاعدة البيانات "discourse" موجودة بالفعل
I, [2023-01-04T20:48:10.017003 #1] INFO -- :
I, [2023-01-04T20:48:10.017425 #1] INFO -- : > su postgres -c 'psql discourse -c "create user discourse;"' || true
2023-01-04 20:48:10.188 UTC [58] postgres@discourse ERROR: الدور "discourse" موجود بالفعل
2023-01-04 20:48:10.188 UTC [58] postgres@discourse STATEMENT: create user discourse;
ERROR: الدور "discourse" موجود بالفعل
129:M 04 Jan 2023 20:48:21.224 # فشل الاستماع على المنفذ 6379 (TCP)، جاري الإجهاض.
داخل الحاوية أحاول بدء الخدمة postgresql وأحصل على خطأ.
root@server /var/discourse # ./launcher enter app
x86_64 arch detected.
root@discourse:/var/www/discourse# service postgresql start
[FAIL] Starting PostgreSQL 13 database server: main[....] Error: Config owner (postgres:105) and data owner (systemd-timesync:101) do not match, and config owner is not root ... failed!
failed!
root@discourse:/var/www/discourse#
إذا قمت بتغيير مالكي الملفات داخل المجلد المشترك، فستقوم بإتلاف التثبيت. أحد الخيارات هو إعادة التثبيت واستعادة نسخة احتياطية، بينما الخيار الآخر هو إصلاح هؤلاء المالكين يدويًا.
داخل الحاوية، حاولت تشغيل discourse backup. يبلغ عن أن Redis لا يعمل. في سجل Redis الحالي، وجدت الأسطر التالية في النهاية…
10316:M 05 Jan 2023 08:05:27.314 # Server initialized
10316:M 05 Jan 2023 08:05:27.314 # WARNING overcommit_memory is set to 0! Background save may fail under low memory condition. To fix this issue add 'vm.overcommit_memory = 1' to /etc/sysctl.conf and then reboot or run the command 'sysctl vm.overcommit_memory=1' for this to take effect.
10316:M 05 Jan 2023 08:05:27.314 # Can't handle RDB format version 10
10316:M 05 Jan 2023 08:05:27.314 # Fatal error loading the DB: Invalid argument. Exiting.
10321:C 05 Jan 2023 08:05:28.345 # oO0OoO0OoO0Oo Redis is starting oO0OoO0OoO0Oo
10321:C 05 Jan 2023 08:05:28.345 # Redis version=6.2.3, bits=64, commit=00000000, modified=0, pid=10321, just started
10321:C 05 Jan 2023 08:05:28.345 # Configuration loaded
10321:M 05 Jan 2023 08:05:28.346 * monotonic clock: POSIX clock_gettime
10321:M 05 Jan 2023 08:05:28.347 * Running mode=standalone, port=6379.
10321:M 05 Jan 2023 08:05:28.347 # WARNING: The TCP backlog setting of 511 cannot be enforced because /proc/sys/net/core/somaxconn is set to the lower value of 128.
10321:M 05 Jan 2023 08:05:28.347 # Server initialized
10321:M 05 Jan 2023 08:05:28.347 # WARNING overcommit_memory is set to 0! Background save may fail under low memory condition. To fix this issue add 'vm.overcommit_memory = 1' to /etc/sysctl.conf and then reboot or run the command 'sysctl vm.overcommit_memory=1' for this to take effect.
10321:M 05 Jan 2023 08:05:28.348 # Can't handle RDB format version 10
10321:M 05 Jan 2023 08:05:28.348 # Fatal error loading the DB: Invalid argument. Exiting.
بعد ذلك، أعدت تشغيل الحاوية باستخدام ./launcher restart app. الآن يمكنني الوصول إلى Discourse. لكنها النسخة القديمة 2.8.3 التي حاولت الترقية منها إلى 3.0.0.beta16 بالأمس.
تمكنت من تعيين الإصدار إلى 2.9.0.beta2 (معرف الالتزام: 88a8584348ed93a28286839bfc1c32b06bd50b3f) عن طريق تعيين معرف الالتزام كـ “version” في app.yml. هذه المرة نجح الترقية. بعد ذلك تمكنت من الترقية إلى 3.0.0.beta16.