Pups::ExecError: فشل الأمر su postgres -c 'psql discourse -c "alter schema public owner to discourse;"' مع رمز إرجاع

أواجه الخطأ التالي عند محاولة تشغيل ./launcher rebuild app

فشل

Pups::ExecError: فشل su postgres -c ‘psql discourse -c “alter schema public owner to discourse;”’ مع رمز الإرجاع #<Process::Status: pid 54 exit 2>

موقع الفشل: /usr/local/lib/ruby/gems/3.1.0/gems/pups-1.1.1/lib/pups/exec_command.rb:117:in `spawn’

فشل التنفيذ مع المعلمات “su postgres -c ‘psql $db_name -c \"alter schema public owner to $db_user;\"’”

فشل التمهيد برمز الخروج 2

** فشل التمهيد ** يرجى التمرير لأعلى والبحث عن رسائل خطأ سابقة، قد يكون هناك أكثر من واحدة.

قد يساعد ./discourse-doctor في تشخيص المشكلة.

4079c40b96373f2f33049a30414bc383bdb52a1a678a9f0cc9f7

Originally sent in general
Ratnam_Raju_Varsala

مرحباً @Canapin، كيف يمكنني دمج الإضافات في تطبيق دوكر؟

Heliosurge
Ratnam_Raju_Varsala

فشل
--------------------

Pups::ExecError: فشل الأمر su postgres -c 'psql discourse -c "alter schema public owner to discourse;"' مع الرمز #<Process::Status: pid 54 exit 2>

موقع الفشل: /usr/local/lib/ruby/gems/3.1.0/gems/pups-1.1.1/lib/pups/exec_command.rb:117:in `spawn'

فشل التنفيذ مع المعلمات "su postgres -c 'psql $db_name -c \"alter schema public owner to $db_user;\"'"

فشل التهيئة مع رمز الخروج 2

** فشل التهيئة ** يرجى التمرير لأعلى والبحث عن رسائل خطأ سابقة، قد يكون هناك أكثر من واحدة.

قد يساعد ./discourse-doctor في تشخيص المشكلة.

4079c40b96373f2f33049a30414bc383bdb52a1a678a9f0cc9f7

root@community-online:/var/discourse# /discourse-doctor

-bash: /discourse-doctor: No such file or directory

أتلقى هذا الخطأ بعد إضافة إضافة في ملف app.yml

Heliosurge

هل يمكنك نشر هذا القسم من ملف app.yml الخاص بك حيث أضفت الإضافة تحت دوكر؟

يجب أن تتأكد من أن التنسيق دقيق للغاية.
إنه أمر مزعج بعض الشيء ولكنه عادةً ما يتم تثبيت وإعادة بناء إضافتين في المرة الواحدة.
ما هي الإضافة التي تحاول تثبيتها؟

Ratnam_Raju_Varsala

كان الموقع يعمل بشكل جيد حتى تمت إضافة الإضافة، بعد إضافة هذا الخطأ، الموقع معطل

Heliosurge

احذف جزءًا من منشور الدردشة الخاص بك. لديك معلومات حساسة. تحتاج فقط إلى القسم الذي يذكر $home وما إلى ذلك ومعلومات الإضافة.

لقد أضفت إضافات أزرار التداول الخاصة بك مرتين. قم بإزالة كلا المثيلين وحاول إعادة البناء وانظر ما إذا كان الموقع قد تم استعادته.

تحتاج فقط من هنا لأسفل إذا سمح الدردشة بتغليفه بشيء مثل ´´ .... ´´

Ratnam_Raju_Varsala

لا، لم تتم إضافته مرتين
فقط أقوم بلصقه هنا بعد اكتمال محتوى app.yml

JammyDodger

أعتقد أنه من الأفضل مناقشة هذا في الموضوع. سأنقل هذه الرسائل. :+1:

Ratnam_Raju_Varsala

تم الحذف

Heliosurge

رائع يا جام. هل يمكنك إزالة معلوماته الحساسة بحيث تكون معلومات الإضافة فقط؟

إعجابَين (2)

I, [2023-02-11T18:58:30.914906 #1]  INFO -- : \u003e [ ! -e /shared/postgres_data ] \u0026\u0026 install -d -m 0755 -o postgres -g postgres /shared/postgres_data \u0026\u0026 sudo -E -u postgres /usr/lib/postgresql/13/bin/initdb -D /shared/postgres_data || exit 0
I, [2023-02-11T18:58:30.917342 #1]  INFO -- : 
I, [2023-02-11T18:58:30.917415 #1]  INFO -- : \u003e chown -R postgres:postgres /shared/postgres_data
I, [2023-02-11T18:58:30.930655 #1]  INFO -- : 
I, [2023-02-11T18:58:30.930872 #1]  INFO -- : \u003e chown -R postgres:postgres /var/run/postgresql
I, [2023-02-11T18:58:30.933165 #1]  INFO -- : 
I, [2023-02-11T18:58:30.933384 #1]  INFO -- : \u003e /root/upgrade_postgres
I, [2023-02-11T18:58:30.937415 #1]  INFO -- : 
I, [2023-02-11T18:58:30.937665 #1]  INFO -- : \u003e rm /root/upgrade_postgres
I, [2023-02-11T18:58:30.939673 #1]  INFO -- : 
I, [2023-02-11T18:58:30.940012 #1]  INFO -- : Replacing data_directory = '/var/lib/postgresql/13/main' with data_directory = '/shared/postgres_data' in /etc/postgresql/13/main/postgresql.conf
I, [2023-02-11T18:58:30.940639 #1]  INFO -- : Replacing (?-mix:#?listen_addresses *=.*) with listen_addresses = '*' in /etc/postgresql/13/main/postgresql.conf
I, [2023-02-11T18:58:30.941061 #1]  INFO -- : Replacing (?-mix:#?synchronous_commit *=.*) with synchronous_commit = $db_synchronous_commit in /etc/postgresql/13/main/postgresql.conf
I, [2023-02-11T18:58:30.941491 #1]  INFO -- : Replacing (?-mix:#?shared_buffers *=.*) with shared_buffers = $db_shared_buffers in /etc/postgresql/13/main/postgresql.conf
I, [2023-02-11T18:58:30.941859 #1]  INFO -- : Replacing (?-mix:#?work_mem *=.*) with work_mem = $db_work_mem in /etc/postgresql/13/main/postgresql.conf
I, [2023-02-11T18:58:30.942208 #1]  INFO -- : Replacing (?-mix:#?default_text_search_config *=.*) with default_text_search_config = '$db_default_text_search_config' in /etc/postgresql/13/main/postgresql.conf
I, [2023-02-11T18:58:30.942546 #1]  INFO -- : \u003e install -d -m 0755 -o postgres -g postgres /shared/postgres_backup
I, [2023-02-11T18:58:30.945002 #1]  INFO -- : 
I, [2023-02-11T18:58:30.945405 #1]  INFO -- : Replacing (?-mix:#?checkpoint_segments *=.*) with checkpoint_segments = $db_checkpoint_segments in /etc/postgresql/13/main/postgresql.conf
I, [2023-02-11T18:58:30.945805 #1]  INFO -- : Replacing (?-mix:#?logging_collector *=.*) with logging_collector = $db_logging_collector in /etc/postgresql/13/main/postgresql.conf
I, [2023-02-11T18:58:30.946227 #1]  INFO -- : Replacing (?-mix:#?log_min_duration_statement *=.*) with log_min_duration_statement = $db_log_min_duration_statement in /etc/postgresql/13/main/postgresql.conf
I, [2023-02-11T18:58:30.946605 #1]  INFO -- : Replacing (?-mix:^#local +replication +postgres +peer$) with local replication postgres  peer in /etc/postgresql/13/main/pg_hba.conf
I, [2023-02-11T18:58:30.946992 #1]  INFO -- : Replacing (?-mix:^host.*all.*all.*127.*$) with host all all 0.0.0.0/0 md5 in /etc/postgresql/13/main/pg_hba.conf
I, [2023-02-11T18:58:30.947317 #1]  INFO -- : Replacing (?-mix:^host.*all.*all.*::1\\/128.*$) with host all all ::/0 md5 in /etc/postgresql/13/main/pg_hba.conf
I, [2023-02-11T18:58:30.947660 #1]  INFO -- : \u003e 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, [2023-02-11T18:58:30.949060 #1]  INFO -- : \u003e sleep 5
2023-02-11 18:58:30.959 UTC [42] FATAL:  data directory "/shared/postgres_data" has invalid permissions
2023-02-11 18:58:30.959 UTC [42] DETAIL:  Permissions should be u=rwx (0700) or u=rwx,g=rx (0750).
I, [2023-02-11T18:58:35.952167 #1]  INFO -- : 
I, [2023-02-11T18:58:35.952437 #1]  INFO -- : \u003e su postgres -c 'createdb discourse' || true
createdb: error: could not connect to database template1: connection to server on socket "/var/run/postgresql/.s.PGSQL.5432" failed: No such file or directory
	Is the server running locally and accepting connections on that socket?
I, [2023-02-11T18:58:35.994953 #1]  INFO -- : 
I, [2023-02-11T18:58:35.995243 #1]  INFO -- : \u003e su postgres -c 'psql discourse -c "create user discourse;"' || true
psql: error: connection to server on socket "/var/run/postgresql/.s.PGSQL.5432" failed: No such file or directory
	Is the server running locally and accepting connections on that socket?
I, [2023-02-11T18:58:36.036721 #1]  INFO -- : 
I, [2023-02-11T18:58:36.037043 #1]  INFO -- : \u003e su postgres -c 'psql discourse -c "grant all privileges on database discourse to discourse;"' || true
psql: error: connection to server on socket "/var/run/postgresql/.s.PGSQL.5432" failed: No such file or directory
	Is the server running locally and accepting connections on that socket?
I, [2023-02-11T18:58:36.078384 #1]  INFO -- : 
I, [2023-02-11T18:58:36.078703 #1]  INFO -- : \u003e su postgres -c 'psql discourse -c "alter schema public owner to discourse;"'
psql: error: connection to server on socket "/var/run/postgresql/.s.PGSQL.5432" failed: No such file or directory
	Is the server running locally and accepting connections on that socket?
I, [2023-02-11T18:58:36.120285 #1]  INFO -- : 
I, [2023-02-11T18:58:36.120682 #1]  INFO -- : Terminating async processes

FAILED
--------------------
Pups::ExecError: su postgres -c 'psql discourse -c "alter schema public owner to discourse;"' failed with return #<Process::Status: pid 54 exit 2>
Location of failure: /usr/local/lib/ruby/gems/3.1.0/gems/pups-1.1.1/lib/pups/exec_command.rb:117:in `spawn'
exec failed with the params "su postgres -c 'psql $db_name -c \\\"alter schema public owner to $db_user;\\\"'"
bootstrap failed with exit code 2
** 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.
4c2225e9c667f9fc2b7b4f9bd26c03f243e877b123be1d41a3c57bf90c049595

عند إضافة مكون إضافي، سترغب في نسخ ووضع الكود كما هو موضح أعلاه. أعتقد أنه لا توجد مسافات بين الأسطر.

تحقق أيضًا مما إذا كان المكون الإضافي الذي تريد استخدامه لا يزال مدعومًا.

هل يمكنك نشر رابط هذا المكون الإضافي؟ لست على دراية بهذا المكون الإضافي يدويًا. سيكون من الأفضل إذا كان هناك رابط هنا في discourse أيضًا.

discourse git clone GitHub - jannolii/discourse-topic-trade-buttons

لقد قمت بإزالة المكون الإضافي وبعد ذلك حاولت إعادة بنائه، ولكن بعد إزالة المكون الإضافي، أحصل على هذا الخطأ، قبل ذلك كان يعمل بشكل جيد.

I, [2023-02-11T18:58:30.949060 #1] INFO – : ‏> sleep 5

2023-02-11 18:58:30.959 UTC [42] FATAL: data directory “/shared/postgres_data” has invalid permissions

2023-02-11 18:58:30.959 UTC [42] DETAIL: Permissions should be u=rwx (0700) or u=rwx,g=rx (0750).

I, [2023-02-11T18:58:35.952167 #1] INFO – :

I, [2023-02-11T18:58:35.952437 #1] INFO – : ‏> su postgres -c ‘createdb discourse’ || true

createdb: error: could not connect to database template1: connection to server on socket “/var/run/postgresql/.s.PGSQL.5432” failed: No such file or directory

Is the server running locally and accepting connections on that socket?

I, [2023-02-11T18:58:35.994953 #1] INFO – :

I, [2023-02-11T18:58:35.995243 #1] INFO – : ‏> su postgres -c ‘psql discourse -c “create user discourse;”’ || true

psql: error: connection to server on socket “/var/run/postgresql/.s.PGSQL.5432” failed: No such file or directory

Is the server running locally and accepting connections on that socket?

I, [2023-02-11T18:58:36.036721 #1] INFO – :

I, [2023-02-11T18:58:36.037043 #1] INFO – : ‏> su postgres -c ‘psql discourse -c “grant all privileges on database discourse to discourse;”’ || true

psql: error: connection to server on socket “/var/run/postgresql/.s.PGSQL.5432” failed: No such file or directory

Is the server running locally and accepting connections on that socket?

I, [2023-02-11T18:58:36.078384 #1] INFO – :

I, [2023-02-11T18:58:36.078703 #1] INFO – : ‏> su postgres -c ‘psql discourse -c “alter schema public owner to discourse;”’

psql: error: connection to server on socket “/var/run/postgresql/.s.PGSQL.5432” failed: No such file or directory

Is the server running locally and accepting connections on that socket?

I, [2023-02-11T18:58:36.120285 #1] INFO – :

I, [2023-02-11T18:58:36.120682 #1] INFO – : Terminating async processes

FAILED


Pups::ExecError: su postgres -c ‘psql discourse -c “alter schema public owner to discourse;”’ failed with return #<Process::Status: pid 54 exit 2>

Location of failure: /usr/local/lib/ruby/gems/3.1.0/gems/pups-1.1.1/lib/pups/exec_command.rb:117:in `spawn’

exec failed with the params “su postgres -c ‘psql $db_name -c \"alter schema public owner to $db_user;\"’”

bootstrap failed with exit code 2

** 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.

4c2225e9c667f9fc2b7b4f9bd26c03f243e877b123be1d41a3c57bf90c049595

لست متأكدًا تمامًا من الإجراء، ولكن قد تتمكن من تحميل الموقع في الوضع الآمن.

@JammyDodger هل يمكنك ربط الإجراء الخاص بالوضع الآمن؟

هل رأيت ملف السجل الخاص بي؟

كما ترى، يتم تحويل “الوضع الآمن” تلقائيًا إلى رابط لبرنامج تعليمي حول الوضع الآمن :slight_smile:

إعجابَين (2)

شكرا جزيلا. أعتذر. هل ترى شيئًا قد يسبب هذه المشكلة؟ على سبيل التخمين ربما خطأ في التنسيق في app.yml؟

مقتطف من موضوع الوضع الآمن.

2023-02-11 19:20:40.842 UTC [42] FATAL: data directory “/shared/postgres_data” has invalid permissions
2023-02-11 19:20:40.842 UTC [42] DETAIL: Permissions should be u=rwx (0700) or u=rwx,g=rx (0750).
I, [2023-02-11T19:20:45.834611 #1] INFO – :
I, [2023-02-11T19:20:45.834887 #1] INFO – : > su postgres -c ‘createdb discourse’ || true
createdb: error: could not connect to database template1: connection to server on socket “/var/run/postgresql/.s.PGSQL.5432” failed: No such file or directory
Is the server running locally and accepting connections on that socket?

قد تحتاج إلى التمرير لأعلى. هل جربت إجراء الوضع الآمن؟

لست متأكدًا مما إذا كان سيعمل في هذه الحالة أم لا بصراحة.

الموقع معطل بالكامل، حتى مع تفعيل الوضع الآمن لم يعمل، الموقع معطل والتطبيق لا يعمل

هل يمكنك إعادة نشر قسم $plugins goes here من ملف app.yml الخاص بك؟

فقط تأكد من وضعه داخل “code” وينتهي بـ “/code” واستبدل علامات الاقتباس بـ “[” و “]”

Your app.yml cintent here
- does nor trigger markdown

دان، لقد قمت بإزالة المكون الإضافي من ملف app.yml، لا يوجد مكون إضافي الآن، لكنني سأرسله لك هنا مرة أخرى

volumes:

  • volume:
    host: /var/discourse/shared/standalone
    guest: /shared
  • volume:
    host: /var/discourse/shared/standalone/log/var-log
    guest: /var/log

Plugins go here

see Install plugins on a self-hosted site for details

hooks:
after_code:
- exec:
cd: $home/plugins
cmd:
- git clone GitHub - discourse/docker_manager: Plugin for use with discourse docker image

أتفهم ذلك، ولكن ربما لديك خطأ في التنسيق. ملف app.yml حساس للغاية… مجرد سطر واحد خارج المحاذاة يمكن أن يسبب مشاكل.

لهذا السبب ذكرت اللصق بين تنسيق الكود حتى نتمكن من رؤية نسخة خام من ملفك.

حتى شيء بسيط مثل سطر فارغ بين الأسطر يمكن أن يسبب مشكلة.