Pups::ExecError: su postgres -c 'psql discourse -c "alter schema public owner to discourse;"' fallito con ritorno

Si verifica il seguente errore quando ho provato a eseguire ./launcher rebuild app

FALLITO


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

Posizione del fallimento: /usr/local/lib/ruby/gems/3.1.0/gems/pups-1.1.1/lib/pups/exec_command.rb:117:in `spawn’

exec è fallito con i parametri “su postgres -c ‘psql $db_name -c \"alter schema public owner to $db_user;\"’”

bootstrap fallito con codice di uscita 2

** FALLITO IL BOOTSTRAP ** si prega di scorrere verso l’alto e cercare messaggi di errore precedenti, potrebbero essercene più di uno.

./discourse-doctor può aiutare a diagnosticare il problema.

4079c40b96373f2f33049a30414bc383acf909fc3863bdb52a1a678a9f0cc9f7

Originally sent in general
Ratnam_Raju_Varsala

Ciao @Canapin, come posso integrare i plugin nella mia app Docker?

Heliosurge
Ratnam_Raju_Varsala

FALLITO
--------------------
Pups::ExecError: su postgres -c 'psql discourse -c "alter schema public owner to discourse;"' fallito con ritorno #<Process::Status: pid 54 exit 2>
Posizione del fallimento: /usr/local/lib/ruby/gems/3.1.0/gems/pups-1.1.1/lib/pups/exec_command.rb:117:in `spawn'
exec fallito con i parametri "su postgres -c 'psql $db_name -c \"alter schema public owner to $db_user;\"'"
bootstrap fallito con codice di uscita 2
** FALLITO IL BOOTSTRAP ** si prega di scorrere verso l'alto e cercare messaggi di errore precedenti, potrebbero essercene più di uno.
./discourse-doctor potrebbe aiutare a diagnosticare il problema.
4079c40b96373f2f33049a30414bc383bdb52a1a678a9f0cc9f7
root@community-online:/var/discourse# /discourse-doctor
-bash: /discourse-doctor: File o directory non esistente
sto ricevendo questo errore dopo aver aggiunto un plugin nel file app.yml

Heliosurge

puoi pubblicare quella sezione del tuo app.yml dove hai aggiunto il plugin sotto docker?

Devi assicurarti che la formattazione sia precisa.
È un po' una seccatura, ma di solito si installano e si ricostruiscono solo 2 plugin alla volta.
Quale plugin stai cercando di installare?

Ratnam_Raju_Varsala

Il sito funzionava bene fino all'aggiunta del plugin, dopo aver aggiunto questo errore, il sito è inattivo

Heliosurge

Elimina parte del tuo post. Hai informazioni sensibili. Hai solo bisogno della sezione dove dice roba tipo $home e informazioni sul plugin.
Hai aggiunto i tuoi plugin per i pulsanti di scambio due volte. Rimuovi entrambe le istanze e prova una ricostruzione e vedi se il sito viene ripristinato.
Hai solo bisogno da qui in giù se la chat lo consente, racchiudilo con qualcosa come ´´ .... ´´

Ratnam_Raju_Varsala

no non aggiunto due volte
ho appena incollato qui dopo aver completato il contenuto di app.yml

JammyDodger

Penso che questo sarebbe meglio discuterlo nell'argomento. Sposterò questi messaggi. :+1:

Ratnam_Raju_Varsala

cancellato

Heliosurge

ok jam. puoi rimuovere le sue informazioni sensibili in modo che rimangano solo le informazioni sul plugin?

2 Mi Piace

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:  la directory dei dati "/shared/postgres_data" ha permessi non validi
2023-02-11 18:58:30.959 UTC [42] DETAIL:  I permessi dovrebbero essere u=rwx (0700) o 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: errore: impossibile connettersi al database template1: connessione al server su socket "/var/run/postgresql/.s.PGSQL.5432" fallita: Nessun file o directory
	Il server è in esecuzione localmente e accetta connessioni su quel 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: errore: connessione al server su socket "/var/run/postgresql/.s.PGSQL.5432" fallita: Nessun file o directory
	Il server è in esecuzione localmente e accetta connessioni su quel 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: errore: connessione al server su socket "/var/run/postgresql/.s.PGSQL.5432" fallita: Nessun file o directory
	Il server è in esecuzione localmente e accetta connessioni su quel 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: errore: connessione al server su socket "/var/run/postgresql/.s.PGSQL.5432" fallita: Nessun file o directory
	Il server è in esecuzione localmente e accetta connessioni su quel 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;\"' fallita con ritorno #\u003cProcess::Status: pid 54 exit 2\u003e
Posizione del fallimento: /usr/local/lib/ruby/gems/3.1.0/gems/pups-1.1.1/lib/pups/exec_command.rb:117:in `spawn'
exec fallito con i parametri "su postgres -c 'psql $db_name -c \\\"alter schema public owner to $db_user;\\\"'"
bootstrap fallito con codice di uscita 2
** IMPOSSIBILE EFFETTUARE IL BOOTSTRAP ** scorrere verso l'alto e cercare messaggi di errore precedenti, potrebbero essercene più di uno.
./discourse-doctor può aiutare a diagnosticare il problema.
4c2225e9c667f9fc2b7b4f9bd26c03f243e877b123be1d41a3c57bf90c049595

Quando aggiungi un plugin, vorrai copiare e posizionare il codice come quello sopra. Credo senza spazi tra le righe.

Verifica anche che il plugin che desideri utilizzare sia ancora supportato.

puoi postare il link di quel plugin? non ho familiarità con quello. sarebbe meglio se ci fosse anche un link qui su discourse.

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

Ho rimosso il plugin e dopo ho provato a ricompilarlo, ma dopo aver rimosso il plugin ricevo questo errore, prima funzionava bene.

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

2023-02-11 18:58:30.959 UTC [42] FATAL: la directory dei dati "/shared/postgres_data" ha permessi non validi

2023-02-11 18:58:30.959 UTC [42] DETAIL: I permessi dovrebbero essere u=rwx (0700) o 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 #\u003cProcess::Status: pid 54 exit 2\u003e

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

Non sono del tutto sicuro della procedura, ma potresti essere in grado di caricare il sito in modalità provvisoria.

@JammyDodger puoi linkare la procedura per la modalità provvisoria?

Hai visto il mio file di log?

Come puoi vedere, “modalità sicura” viene automaticamente convertita in un link al tutorial sulla modalità sicura :slight_smile:

2 Mi Piace

Grazie mille. Mi scuso. Canapin, vedi qualcosa che potrebbe causare questo problema? A naso, forse un problema di formattazione in app.yml?

estratto dall’argomento modalità sicura.

2023-02-11 19:20:40.842 UTC [42] FATAL: la directory dei dati “/shared/postgres_data” ha permessi non validi
2023-02-11 19:20:40.842 UTC [42] DETAIL: I permessi dovrebbero essere u=rwx (0700) o 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?

Potrebbe essere necessario scorrere più in alto. Hai provato la procedura in modalità provvisoria?

Non sono sicuro che funzionerà in questo caso o meno, ad essere sincero.

Sito completamente bloccato, anche se ho aggiunto la modalità provvisoria non funziona, sito bloccato e app non in esecuzione

Puoi ripubblicare la sezione $plugins goes here del tuo file app.yml?

assicurati solo di inserirla all’interno di “code” che termina con “/code” sostituisci le virgolette con “[” “]”

Il tuo contenuto app.yml qui
- non attiva markdown

Dan, ho rimosso il plugin dal file app.yml, non c’è più nessun plugin, ma te lo posterò di nuovo qui

volumes:

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

I plugin vanno qui

vedi Install plugins on a self-hosted site per i dettagli

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

Capisco, ma potresti avere un errore di formattazione. Il file app.yml è molto esigente… basta una riga fuori allineamento può causare problemi.

Ecco perché ho menzionato di incollare tra il markdown del codice in modo da poter vedere una versione grezza del tuo file.

Anche qualcosa di semplice come una riga vuota tra le righe può causare un problema.