"500 Internal Server Error" beim Genehmigen eines Beitrags in der Überprüfung

Hallo,

ich verwende die Version 2.5.1 von Discourse und erhalte beim Freigeben eines Beitrags in der Überprüfung einen „500 Internal Server Error“.

Hier ist der Fehler in /logs:

Message (7-mal gemeldet)

ActiveRecord::StatementInvalid (PG::InFailedSqlTransaction: ERROR:  current transaction is aborted, commands ignored until end of transaction block
)
/var/www/discourse/vendor/bundle/ruby/2.6.0/gems/rack-mini-profiler-2.0.2/lib/patches/db/pg.rb:72:in `exec_params'

Backtrace

rack-mini-profiler-2.0.2/lib/patches/db/pg.rb:72:in `exec_params'
rack-mini-profiler-2.0.2/lib/patches/db/pg.rb:72:in `exec_params'
activerecord-6.0.3.1/lib/active_record/connection_adapters/postgresql_adapter.rb:675:in `block (2 levels) in exec_no_cache'
activesupport-6.0.3.1/lib/active_support/dependencies/interlock.rb:48:in `block in permit_concurrent_loads'
activesupport-6.0.3.1/lib/active_support/concurrency/share_lock.rb:187:in `yield_shares'
activesupport-6.0.3.1/lib/active_support/dependencies/interlock.rb:47:in `permit_concurrent_loads'
activerecord-6.0.3.1/lib/active_record/connection_adapters/postgresql_adapter.rb:674:in `block in exec_no_cache'
activerecord-6.0.3.1/lib/active_record/connection_adapters/abstract_adapter.rb:722:in `block (2 levels) in log'
activesupport-6.0.3.1/lib/active_support/concurrency/load_interlock_aware_monitor.rb:26:in `block (2 levels) in synchronize'
activesupport-6.0.3.1/lib/active_support/concurrency/load_interlock_aware_monitor.rb:25:in `handle_interrupt'
activesupport-6.0.3.1/lib/active_support/concurrency/load_interlock_aware_monitor.rb:25:in `block in synchronize'
activesupport-6.0.3.1/lib/active_support/concurrency/load_interlock_aware_monitor.rb:21:in `handle_interrupt'
activesupport-6.0.3.1/lib/active_support/concurrency/load_interlock_aware_monitor.rb:21:in `synchronize'
activerecord-6.0.3.1/lib/active_record/connection_adapters/abstract_adapter.rb:721:in `block in log'
activesupport-6.0.3.1/lib/active_support/notifications/instrumenter.rb:24:in `instrument'
activerecord-6.0.3.1/lib/active_record/connection_adapters/abstract_adapter.rb:712:in `log'
activerecord-6.0.3.1/lib/active_record/connection_adapters/postgresql_adapter.rb:673:in `exec_no_cache'
activerecord-6.0.3.1/lib/active_record/connection_adapters/postgresql_adapter.rb:654:in `execute_and_clear'
activerecord-6.0.3.1/lib/active_record/connection_adapters/postgresql/database_statements.rb:111:in `exec_delete'
activerecord-6.0.3.1/lib/active_record/connection_adapters/abstract/database_statements.rb:180:in `delete'
activerecord-6.0.3.1/lib/active_record/connection_adapters/abstract/query_cache.rb:22:in `delete'
activerecord-6.0.3.1/lib/active_record/relation.rb:587:in `delete_all'
/var/www/discourse/app/models/topic_link.rb:376:in `cleanup_entries'
/var/www/discourse/app/models/topic_link.rb:139:in `extract_from'
/var/www/discourse/lib/post_creator.rb:576:in `extract_links'
/var/www/discourse/lib/post_creator.rb:180:in `block in create'
/var/www/discourse/lib/post_creator.rb:359:in `block in transaction'
activerecord-6.0.3.1/lib/active_record/connection_adapters/abstract/database_statements.rb:278:in `transaction'
activerecord-6.0.3.1/lib/active_record/transactions.rb:212:in `transaction'
/var/www/discourse/lib/post_creator.rb:358:in `transaction'
/var/www/discourse/lib/post_creator.rb:174:in `create'
/var/www/discourse/app/models/reviewable_queued_post.rb:80:in `perform_approve_post'
/var/www/discourse/app/models/reviewable.rb:355:in `public_send'
/var/www/discourse/app/models/reviewable.rb:355:in `block in perform'
1 „Gefällt mir“

Wir erleben das gleiche Problem unter den gleichen Umständen, wie von Camille beschrieben.

Daher haben wir versucht, den Beitrag zuerst zu bearbeiten und ihn dann erneut freizugeben, aber das Problem besteht weiterhin.

Gibt es eine Lösung?

Vielen Dank

1 „Gefällt mir“

Ich habe immer noch das gleiche Problem mit der Version v2.5.2 +2.
Es scheint bei Beiträgen aufzutreten, die die Option „Automatisches Stummschalten schneller Tipper beim ersten Beitrag

Hi @CamilleRoux!

Ich konnte das lokal nicht nachstellen, also fehlt mir vielleicht etwas. Tritt das auf, wenn du einen beliebigen wartenden Beitrag genehmigen möchtest, oder nur bei einem bestimmten?

Ich habe keine weitere Nachricht zur Prüfung… Was kann ich tun, um dir mehr Informationen zu geben?

Ich habe gerade neue Themen genehmigen, außer bei Vertrauensstufe auf das Maximum gesetzt und erhalte nun beim Erstellen eines neuen Themas einen 500-Fehler. Es scheint sich um denselben Fehler zu handeln:

ActiveRecord::StatementInvalid (PG::InFailedSqlTransaction: ERROR:  current transaction is aborted, commands ignored until end of transaction block
)
/var/www/discourse/vendor/bundle/ruby/2.6.0/gems/rack-mini-profiler-2.0.2/lib/patches/db/pg.rb:72:in `exec_params'

Backtrace

rack-mini-profiler-2.0.2/lib/patches/db/pg.rb:72:in `exec_params'
rack-mini-profiler-2.0.2/lib/patches/db/pg.rb:72:in `exec_params'
activerecord-6.0.3.1/lib/active_record/connection_adapters/postgresql_adapter.rb:675:in `block (2 levels) in exec_no_cache'
activesupport-6.0.3.1/lib/active_support/dependencies/interlock.rb:48:in `block in permit_concurrent_loads'
activesupport-6.0.3.1/lib/active_support/concurrency/share_lock.rb:187:in `yield_shares'
activesupport-6.0.3.1/lib/active_support/dependencies/interlock.rb:47:in `permit_concurrent_loads'
activerecord-6.0.3.1/lib/active_record/connection_adapters/postgresql_adapter.rb:674:in `block in exec_no_cache'
activerecord-6.0.3.1/lib/active_record/connection_adapters/abstract_adapter.rb:722:in `block (2 levels) in log'
activesupport-6.0.3.1/lib/active_support/concurrency/load_interlock_aware_monitor.rb:26:in `block (2 levels) in synchronize'
activesupport-6.0.3.1/lib/active_support/concurrency/load_interlock_aware_monitor.rb:25:in `handle_interrupt'

Kannst du den Container betreten und die PostgreSQL-Protokolle auf einen Fehler zum gleichen Zeitpunkt prüfen?

2 „Gefällt mir“

Hier ist der Fehler (bezüglich des Fehlers des Themas):

2020-10-01 18:37:18.894 UTC [25661] discourse@discourse ERROR:  null value in column "private_message" violates not-null constraint
2020-10-01 18:37:18.894 UTC [25661] discourse@discourse DETAIL:  Failing row contains (8803, 'a':25 'api':4A,17 'arriv':23 'avanc':48 'bas':14 'cod':54 'comm..., Comment obtenir l'API odoo sur React Native? Developpement J’u..., fr, 3, null).
2020-10-01 18:37:18.894 UTC [25661] discourse@discourse STATEMENT:  INSERT INTO post_search_data
	(post_id, search_data, locale, raw_data, version)
	VALUES (8803, setweight(to_tsvector('french', coalesce('Comment obtenir l''API odoo sur React Native?','')), 'A') ||
	setweight(to_tsvector('french', coalesce('Developpement','')), 'B') ||
	setweight(to_tsvector('french', coalesce('','')), 'C') ||
	setweight(to_tsvector('french', coalesce('J’utilise Odoo comme base de donnees API sur react native mais j’arrive pas a me connecter, j’ai utilise le package npm react-native-odoo , vous pouvez voir mon erreur sur l’image. Merci d’avance pour vos reponses Voici mon Code oddo et l’erreur que j’obtiens error','')), 'D')
	, 'fr', 'Comment obtenir l''API odoo sur React Native? Developpement J’utilise Odoo comme base de donnees API sur react native mais j’arrive pas a me connecter, j’ai utilise le package npm react-native-odoo , vous pouvez voir mon erreur sur l’image. Merci d’avance pour vos reponses Voici mon Code oddo et l’erreur que j’obtiens error', 3)

2020-10-01 18:37:18.897 UTC [25661] discourse@discourse ERROR:  current transaction is aborted, commands ignored until end of transaction block
2020-10-01 18:37:18.897 UTC [25661] discourse@discourse STATEMENT:  UPDATE topic_search_data
	SET
	   raw_data = 'Comment obtenir l''API odoo sur React Native? J’utilise Odoo comme base de donnees API sur react native mais j’arrive pas a me connecter, j’ai utilise le package npm react-native-odoo , vous pouvez voir mon erreur sur l’image. Merci d’avance pour',
	   locale = 'fr',
	   search_data = setweight(to_tsvector('french', coalesce('Comment obtenir l''API odoo sur React Native?','')), 'A') ||
	setweight(to_tsvector('french', coalesce('J’utilise Odoo comme base de donnees API sur react native mais j’arrive pas a me connecter, j’ai utilise le package npm react-native-odoo , vous pouvez voir mon erreur sur l’image. Merci d’avance pour','')), 'B') ||
	setweight(to_tsvector('french', coalesce(NULL,'')), 'C') ||
	setweight(to_tsvector('french', coalesce(NULL,'')), 'D')
	,
	   version = 3
	WHERE topic_id = 4351

2020-10-01 18:37:18.900 UTC [25661] discourse@discourse ERROR:  current transaction is aborted, commands ignored until end of transaction block
2020-10-01 18:37:18.900 UTC [25661] discourse@discourse STATEMENT:  DELETE FROM "topic_links" WHERE ((post_id = 8803 AND NOT reflection) OR (link_post_id = 8803 AND reflection))
1 „Gefällt mir“

Danke, das hilft wirklich weiter!

Hast du irgendwann die beta-Branch verfolgt und dann zu stable gewechselt? Die Spalte private_message wurde in v2.6.0.beta2 hinzugefügt, aber der Commit ist nicht in v2.5.2 +2 enthalten. Hier ist der Commit:

1 „Gefällt mir“

Arf… Ja, das habe ich gemacht, mein Fehler. Vielen Dank!

Weißt du, ob die nächste stabile Version bald veröffentlicht wird?

Das wird überhaupt nicht unterstützt und führt dazu, dass dein Discourse kaputtgeht. Stelle so schnell wie möglich wieder auf den Standard tests-passed oder beta zurück.

Wir veröffentlichen etwa alle 6 Monate eine „stabile

1 „Gefällt mir“

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.