localhost:6379 の Redis への接続エラー (Errno::EADDRNOTAVAIL)

Centos 8 に「Docker version 20.10.5, build 55c4c8」を使用して Discourse をインストールした後、サイトは起動していますが、/draft.json への DELETE リクエストが常にタイムアウトします。

Apache を実行しており、Apache のリバースプロキシと HAProxy の両方で試しましたが、挙動は同じです。

関連があるかどうかは不明ですが、unicorn.stdout.log に以下のエラーが多数見つかりました。

===> ./shared/standalone/log/rails/unicorn.stdout.log <==

2021-03-18T10:02:25.138Z pid=108 tid=ocs ERROR: Error fetching job: Error connecting to Redis on localhost:6379 (Errno::EADDRNOTAVAIL)

Starting up 1 supervised sidekiqs

Loading Sidekiq in process id 119

2021-03-18T10:40:09.682Z pid=119 tid=orn ERROR: Error fetching job: Error connecting to Redis on localhost:6379 (Errno::EADDRNOTAVAIL)

2021-03-18T10:40:09.684Z pid=119 tid=ohf ERROR: Error fetching job: Error connecting to Redis on localhost:6379 (Errno::EADDRNOTAVAIL)

2021-03-18T10:40:09.685Z pid=119 tid=owv ERROR: Error fetching job: Error connecting to Redis on localhost:6379 (Errno::EADDRNOTAVAIL)

2021-03-18T10:40:09.683Z pid=119 tid=oob ERROR: Error fetching job: Error connecting to Redis on localhost:6379 (Errno::EADDRNOTAVAIL)

2021-03-18T10:40:09.683Z pid=119 tid=omr ERROR: Error fetching job: Error connecting to Redis on localhost:6379 (Errno::EADDRNOTAVAIL)

Starting up 1 supervised sidekiqs

Loading Sidekiq in process id 121

/var/discourse/shared/standalone/log/var-log/redis に Redis のエラーログは記録されていますか?

「いいね!」 2

「current」の内容は以下の通りです:

53:M 18 Mar 2021 17:07:05.076 * 300 秒間に 10 件の変更が発生しました。保存中...
53:M 18 Mar 2021 17:07:05.076 * バックグラウンド保存を pid 25018 が開始しました
25018:C 18 Mar 2021 17:07:05.126 * データベースをディスクに保存しました
25018:C 18 Mar 2021 17:07:05.127 * RDB: コピーオンライトにより 2 MB のメモリが使用されました
53:M 18 Mar 2021 17:07:05.177 * バックグラウンド保存が正常に完了しました
53:M 18 Mar 2021 17:12:06.097 * 300 秒間に 10 件の変更が発生しました。保存中...
53:M 18 Mar 2021 17:12:06.098 * バックグラウンド保存を pid 25337 が開始しました
25337:C 18 Mar 2021 17:12:06.145 * データベースをディスクに保存しました
25337:C 18 Mar 2021 17:12:06.145 * RDB: コピーオンライトにより 2 MB のメモリが使用されました
53:M 18 Mar 2021 17:12:06.198 * バックグラウンド保存が正常に完了しました
「いいね!」 1

これらのログは問題なさそうです。Discourse インスタンスのナビゲーションでまだ問題が発生していますか?

「いいね!」 1

投稿、招待、および投稿の修正の無効化をまだ削除できません。

HTTP DELETE メソッドのすべての呼び出しで問題が発生しているようです。Discourse が DELETE の代わりに POST を使用するのは可能でしょうか?How can Discourse make POST instead of DELETE for "smart" CDN? のようなケースかもしれませんが、私は CDN は使用しておらず、Discourse サイトの指示に従って CentOS と Docker をインストールした素の仮想サーバーを使用しています。

「いいね!」 1

HTTP DELETE で 408 エラーが発生している HAProxy ログの一部です。@codinghorror さん、何が DELETE リクエストを「ドロップ」しているのでしょうか?もしこれらの DELETE リクエストが HAProxy に到達しているなら、Docker 内のソフトウェアにも到達するはずです。何か問題の原因になっているものはありますか?

Mar 20 01:47:46 id22302.example.com haproxy[43043]: 176.243.177.232:61760 [20/Mar/2021:01:47:16.622] http-in discourse_socket/server3 0/0/0/30004/30034 408 71 - - CD-- 3/3/2/2/0 0/0 "DELETE /draft.json HTTP/1.1"

Mar 20 01:47:46 id22302.example.com haproxy[43043]: 176.243.177.232:61760 [20/Mar/2021:01:47:16.622] http-in discourse_socket/server3 0/0/0/30004/30034 408 71 - - CD-- 3/3/2/2/0 0/0 "DELETE /draft.json HTTP/1.1"

Mar 20 01:48:09 id22302.example.com haproxy[43043]: 176.243.177.232:61505 [20/Mar/2021:01:47:43.921] http-in discourse_socket/server3 0/0/0/25081/25081 200 396 - - ---- 2/2/1/1/0 0/0 "POST /message-bus/742b0b89384944a7b6376e2d6978889d/poll HTTP/1.1"

Mar 20 01:48:09 id22302.example.com haproxy[43043]: 176.243.177.232:61505 [20/Mar/2021:01:47:43.921] http-in discourse_socket/server3 0/0/0/25081/25081 200 396 - - ---- 2/2/1/1/0 0/0 "POST /message-bus/742b0b89384944a7b6376e2d6978889d/poll HTTP/1.1"

Mar 20 01:48:12 id22302.example.com haproxy[43043]: 176.243.177.232:61887 [20/Mar/2021:01:47:42.886] http-in discourse_socket/server3 0/0/0/30007/30037 408 71 - - CD-- 2/2/1/1/0 0/0 "DELETE /draft.json HTTP/1.1"

Mar 20 01:48:12 id22302.example.com haproxy[43043]: 176.243.177.232:61887 [20/Mar/2021:01:47:42.886] http-in discourse_socket/server3 0/0/0/30007/30037 408 71 - - CD-- 2/2/1/1/0 0/0 "DELETE /draft.json HTTP/1.1"

Mar 20 01:48:25 id22302.example.com haproxy[43043]: 176.243.177.232:62083 [20/Mar/2021:01:48:25.863] http-in discourse_socket/server3 0/0/0/122/122 200 404 - - ---- 2/2/1/1/0 0/0 "POST /topics/timings HTTP/1.1"

Mar 20 01:48:25 id22302.example.com haproxy[43043]: 176.243.177.232:62083 [20/Mar/2021:01:48:25.863] http-in discourse_socket/server3 0/0/0/122/122 200 404 - - ---- 2/2/1/1/0 0/0 "POST /topics/timings HTTP/1.1"

Mar 20 01:48:34 id22302.example.com haproxy[43043]: 176.243.177.232:61505 [20/Mar/2021:01:48:09.193] http-in discourse_socket/server3 0/0/0/25044/25044 200 396 - - ---- 2/2/0/0/0 0/0 "POST /message-bus/742b0b89384944a7b6376e2d6978889d/poll HTTP/1.1"

Mar 20 01:48:34 id22302.example.com haproxy[43043]: 176.243.177.232:61505 [20/Mar/2021:01:48:09.193] http-in discourse_socket/server3 0/0/0/25044/25044 200 396 - - ---- 2/2/0/0/0 0/0 "POST /message-bus/742b0b89384944a7b6376e2d6978889d/poll HTTP/1.1"

Mar 20 01:48:59 id22302.example.com haproxy[43043]: 176.243.177.232:61505 [20/Mar/2021:01:48:34.487] http-in discourse_socket/server3 0/0/0/25087/25087 200 396 - - ---- 1/1/0/0/0 0/0 "POST /message-bus/742b0b89384944a7b6376e2d6978889d/poll HTTP/1.1"

Mar 20 01:48:59 id22302.example.com haproxy[43043]: 176.243.177.232:61505 [20/Mar/2021:01:48:34.487] http-in discourse_socket/server3 0/0/0/25087/25087 200 396 - - ---- 1/1/0/0/0 0/0 "POST /message-bus/742b0b89384944a7b6376e2d6978889d/poll HTTP/1.1"

Mar 20 01:49:35 id22302.example.com haproxy[43043]: 176.243.177.232:62413 [20/Mar/2021:01:49:35.637] http-in discourse_socket/server3 0/0/0/87/87 200 417 - - ---- 1/1/0/0/0 0/0 "POST /message-bus/742b0b89384944a7b6376e2d6978889d/poll?dlp=t HTTP/1.1"

Mar 20 01:49:35 id22302.example.com haproxy[43043]: 176.243.177.232:62413 [20/Mar/2021:01:49:35.637] http-in discourse_socket/server3 0/0/0/87/87 200 417 - - ---- 1/1/0/0/0 0/0 "POST /message-bus/742b0b89384944a7b6376e2d6978889d/poll?dlp=t HTTP/1.1"

Mar 20 01:50:36 id22302.example.com haproxy[43043]: 176.243.177.232:62714 [20/Mar/2021:01:50:36.568] http-in discourse_socket/server3 0/0/0/81/81 200 417 - - ---- 1/1/0/0/0 0/0 "POST /message-bus/742b0b89384944a7b6376e2d6978889d/poll?dlp=t HTTP/1.1"

Mar 20 01:50:36 id22302.example.com haproxy[43043]: 176.243.177.232:62714 [20/Mar/2021:01:50:36.568] http-in discourse_socket/server3 0/0/0/81/81 200 417 - - ---- 1/1/0/0/0 0/0 "POST /message-bus/742b0b89384944a7b6376e2d6978889d/poll?dlp=t HTTP/1.1"

Mar 20 01:51:37 id22302.example.com haproxy[43043]: 176.243.177.232:62993 [20/Mar/2021:01:51:37.541] http-in discourse_socket/server3 0/0/0/78/78 200 417 - - ---- 1/1/0/0/0 0/0 "POST /message-bus/742b0b89384944a7b6376e2d6978889d/poll?dlp=t HTTP/1.1"

Mar 20 01:51:37 id22302.example.com haproxy[43043]: 176.243.177.232:62993 [20/Mar/2021:01:51:37.541] http-in discourse_socket/server3 0/0/0/78/78 200 417 - - ---- 1/1/0/0/0 0/0 "POST /message-bus/742b0b89384944a7b6376e2d6978889d/poll?dlp=t HTTP/1.1"

これは production.log です。削除リクエストが表示されたことは一度もありませんが、他のすべての操作(投稿の作成、変更、保存など)は記録されています:

Completed 200 OK in 81ms (Views: 0.2ms | ActiveRecord: 0.0ms | Allocations: 14861)

Started GET "/composer_messages?composer_action=edit&topic_id=10&post_id=13" for 176.243.226.205 at 2021-03-20 15:51:09 +0100

Processing by ComposerMessagesController#index as JSON

Parameters: {"composer_action"=>"edit", "topic_id"=>"10", "post_id"=>"13"}

Completed 200 OK in 1191ms (Views: 0.2ms | ActiveRecord: 0.0ms | Allocations: 16940)

Started POST "/presence/publish" for 176.243.226.205 at 2021-03-20 15:51:14 +0100

Processing by Presence::PresencesController#handle_message as */*

Parameters: {"state"=>"editing", "topic_id"=>"10", "post_id"=>"13"}

Completed 200 OK in 9ms (Views: 0.2ms | ActiveRecord: 0.0ms | Allocations: 3192)

Started PUT "/t/e-previsto-un-ritorno-di-freddo-nutro/10" for 176.243.226.205 at 2021-03-20 15:51:17 +0100

Processing by TopicsController#update as */*

Parameters: {"title"=>"E' previsto un ritorno di freddo, nutro?", "category_id"=>1, "slug"=>"e-previsto-un-ritorno-di-freddo-nutro", "topic_id"=>"10", "topic"=>{"title"=>"E' previsto un ritorno di freddo, nutro?", "category_id"=>1}}

Completed 200 OK in 19ms (Views: 0.2ms | ActiveRecord: 0.0ms | Allocations: 5149)

Started POST "/presence/publish" for 176.243.226.205 at 2021-03-20 15:51:17 +0100

Processing by Presence::PresencesController#handle_message as */*

Parameters: {"state"=>"closed", "topic_id"=>"10"}

Completed 200 OK in 10ms (Views: 0.2ms | ActiveRecord: 0.0ms | Allocations: 3159)

Started PUT "/posts/13" for 176.243.226.205 at 2021-03-20 15:51:17 +0100

Processing by PostsController#update as */*

Parameters: {"post"=>{"edit_reason"=>"", "cooked"=>"<p>post di test per vedere. ssss</p>", "raw"=>"post di test per vedere. ssss", "topic_id"=>"10", "raw_old"=>""}, "id"=>"13"}

Completed 200 OK in 3296ms (Views: 0.1ms | ActiveRecord: 0.0ms | Allocations: 86638)

Started GET "/t/10.json" for 176.243.226.205 at 2021-03-20 15:51:20 +0100

Processing by TopicsController#show as JSON

Parameters: {"id"=>"10"}

Completed 200 OK in 143ms (Views: 0.1ms | ActiveRecord: 0.0ms | Allocations: 52707)

Started GET "/draft.json?draft_key=topic_10" for 176.243.226.205 at 2021-03-20 15:51:27 +0100

Processing by DraftController#show as JSON

Parameters: {"draft_key"=>"topic_10"}

Completed 200 OK in 38ms (Views: 0.2ms | ActiveRecord: 0.0ms | Allocations: 4317)

Started GET "/posts/13" for 176.243.226.205 at 2021-03-20 15:51:27 +0100

Processing by PostsController#show as JSON

Parameters: {"id"=>"13"}

Completed 200 OK in 16ms (Views: 0.1ms | ActiveRecord: 0.0ms | Allocations: 5026)

Started POST "/presence/publish" for 176.243.226.205 at 2021-03-20 15:51:29 +0100

Processing by Presence::PresencesController#handle_message as */*

Parameters: {"state"=>"editing", "topic_id"=>"10", "post_id"=>"13"}

Completed 200 OK in 20ms (Views: 0.3ms | ActiveRecord: 0.0ms | Allocations: 3304)

Started GET "/posts/13" for 176.243.226.205 at 2021-03-20 15:51:38 +0100

Processing by PostsController#show as JSON

Parameters: {"id"=>"13"}

Completed 200 OK in 121ms (Views: 0.2ms | ActiveRecord: 0.0ms | Allocations: 56890)

また、PUMA ログには DELETE リクエストが表示されません

2021-03-20 16:01:38 +0100 : |Puma| 176.243.226.205 - - [20/Mar/2021:16:01:38 +0100] "GET /t/e-previsto-un-ritorno-di-freddo-nutro/10 HTTP/1.1" 200 - 1.0685

2021-03-20 16:01:39 +0100 : |Puma| 176.243.226.205 - - [20/Mar/2021:16:01:39 +0100] "GET /uploads/default/optimized/1X/_129430568242d1b7f853bb13ebea28b3f6af4e7_2_32x32.png HTTP/1.1" 200 11945 0.0119

2021-03-20 16:01:39 +0100 : |Puma| 176.243.226.205 - - [20/Mar/2021 16:01:39] "POST /message-bus/557c51e14e57450c8c76ab216af0a279/poll HTTP/1.1" HIJACKED -1 0.0956

2021-03-20 16:01:42 +0100 : |Puma| 176.243.226.205 - - [20/Mar/2021:16:01:42 +0100] "POST /message-bus/557c51e14e57450c8c76ab216af0a279/poll HTTP/1.1" 200 - 0.0128

2021-03-20 16:01:43 +0100 : |Puma| 176.243.226.205 - - [20/Mar/2021 16:01:43] "POST /message-bus/557c51e14e57450c8c76ab216af0a279/poll HTTP/1.1" HIJACKED -1 0.0886

2021-03-20 16:01:54 +0100 : |Puma| 176.243.226.205 - - [20/Mar/2021:16:01:54 +0100] "GET /t/e-previsto-un-ritorno-di-freddo-nutro/10 HTTP/1.1" 200 - 0.1436

2021-03-20 16:01:55 +0100 : |Puma| 176.243.226.205 - - [20/Mar/2021:16:01:55 +0100] "GET /uploads/default/optimized/1X/_129430568242d1b7f853bb13ebea28b3f6af4e7_2_32x32.png HTTP/1.1" 200 11945 0.0383

2021-03-20 16:01:56 +0100 : |Puma| 176.243.226.205 - - [20/Mar/2021 16:01:56] "POST /message-bus/1bddd2f9aaf54ec5a589bc74c9c8a409/poll HTTP/1.1" HIJACKED -1 0.0453

2021-03-20 16:01:59 +0100 : |Puma| 176.243.226.205 - - [20/Mar/2021:16:01:59 +0100] "POST /message-bus/1bddd2f9aaf54ec5a589bc74c9c8a409/poll HTTP/1.1" 200 - 0.0129

2021-03-20 16:01:59 +0100 : |Puma| 176.243.226.205 - - [20/Mar/2021 16:01:59] "POST /message-bus/1bddd2f9aaf54ec5a589bc74c9c8a409/poll HTTP/1.1" HIJACKED -1 0.0096

2021-03-20 16:02:07 +0100 : |Puma| 176.243.226.205 - - [20/Mar/2021:16:02:07 +0100] "GET /draft.json?draft_key=topic_10 HTTP/1.1" 200 - 0.0131

2021-03-20 16:02:08 +0100 : |Puma| 176.243.226.205 - - [20/Mar/2021:16:02:08 +0100] "GET /posts/13 HTTP/1.1" 200 - 0.3559

2021-03-20 16:02:08 +0100 : |Puma| 176.243.226.205 - - [20/Mar/2021:16:02:08 +0100] "GET /composer_messages?composer_action=edit&topic_id=10&post_id=13 HTTP/1.1" 200 - 0.2087

2021-03-20 16:02:12 +0100 : |Puma| 176.243.226.205 - - [20/Mar/2021:16:02:12 +0100] "POST /presence/publish HTTP/1.1" 200 - 0.0155

2021-03-20 16:02:24 +0100 : |Puma| 176.243.226.205 - - [20/Mar/2021 16:02:24] "POST /message-bus/1bddd2f9aaf54ec5a589bc74c9c8a409/

つまり、リバースプロキシの設定が誤っており、GET/POST 以外のリクエストが破棄されているということです。これは非常に一般的な問題で、そのため、人々がこの設定に手を出す必要がないよう、コンテナ内に事前に設定されたリバースプロキシを同梱しています。

HAProxy を外して、コンテナ自体を 80/443 でリッスンさせた場合でも、問題は発生しますか?

「いいね!」 2

@Falco 試しましたが、問題はまだ発生しています。DELETE リクエストを破棄しているのは、Web サーバーとしての Puma 自体でしょうか?

本番環境では、Discourse 公式の標準インストール に従って Puma をインストールしている場合は使用していません。

すべてのインストールにおいて、アプリ全体で DELETE/PUT 動詞を使用していますが、問題は見つかりません。したがって、これは特定のインストールに固有の問題だと推測されます。

可能性は低いですが、@Andrea_Giovacchini さん、このドメインの前面に WAF(Web Application Firewall)のようなものが設置されてはいませんか?

「いいね!」 2

公式のインストールを試みた後、同じ問題が発生したため、別のインストール方法を試みました。

その後、再度公式のセットアップ(https://github.com/discourse/discourse/blob/master/docs/INSTALL-cloud.md)を試みましたが、「./launcher rebuild app」で失敗し、以下のメッセージが表示されました(2 日前は失敗していませんでしたが、DELETE 問題の影響も受けていました)。

Make sure that `gem install libv8 -v '8.4.255.0' --source 'https://rubygems.org/'` succeeds before bundling.

In Gemfile:
  mini_racer was resolved to 0.3.1, which depends on
    libv8

/usr/local/lib/ruby/gems/2.7.0/gems/bundler-2.2.15/lib/bundler/installer/parallel_installer.rb:220:in `handle_error'
  /usr/local/lib/ruby/gems/2.7.0/gems/bundler-2.2.15/lib/bundler/installer/parallel_installer.rb:102:in `call'
  /usr/local/lib/ruby/gems/2.7.0/gems/bundler-2.2.15/lib/bundler/installer/parallel_installer.rb:71:in `call'
  /usr/local/lib/ruby/gems/2.7.0/gems/bundler-2.2.15/lib/bundler/installer.rb:270:in `install_in_parallel'
  /usr/local/lib/ruby/gems/2.7.0/gems/bundler-2.2.15/lib/bundler/installer.rb:210:in `install'
  /usr/local/lib/ruby/gems/2.7.0/gems/bundler-2.2.15/lib/bundler/installer.rb:90:in `block in run'
  /usr/local/lib/ruby/gems/2.7.0/gems/bundler-2.2.15/lib/bundler/process_lock.rb:12:in `block in lock'
  /usr/local/lib/ruby/gems/2.7.0/gems/bundler-2.2.15/lib/bundler/process_lock.rb:9:in `open'
  /usr/local/lib/ruby/gems/2.7.0/gems/bundler-2.2.15/lib/bundler/process_lock.rb:9:in `lock'
  /usr/local/lib/ruby/gems/2.7.0/gems/bundler-2.2.15/lib/bundler/installer.rb:72:in `run'
  /usr/local/lib/ruby/gems/2.7.0/gems/bundler-2.2.15/lib/bundler/installer.rb:24:in `install'
  /usr/local/lib/ruby/gems/2.7.0/gems/bundler-2.2.15/lib/bundler/cli/install.rb:64:in `run'
  /usr/local/lib/ruby/gems/2.7.0/gems/bundler-2.2.15/lib/bundler/cli.rb:259:in `block in install'
  /usr/local/lib/ruby/gems/2.7.0/gems/bundler-2.2.15/lib/bundler/settings.rb:115:in `temporary'
  /usr/local/lib/ruby/gems/2.7.0/gems/bundler-2.2.15/lib/bundler/cli.rb:258:in `install'
  /usr/local/lib/ruby/gems/2.7.0/gems/bundler-2.2.15/lib/bundler/vendor/thor/lib/thor/command.rb:27:in `run'
  /usr/local/lib/ruby/gems/2.7.0/gems/bundler-2.2.15/lib/bundler/vendor/thor/lib/thor/invocation.rb:127:in `invoke_command'
  /usr/local/lib/ruby/gems/2.7.0/gems/bundler-2.2.15/lib/bundler/vendor/thor/lib/thor.rb:392:in `dispatch'
  /usr/local/lib/ruby/gems/2.7.0/gems/bundler-2.2.15/lib/bundler/cli.rb:30:in `dispatch'
  /usr/local/lib/ruby/gems/2.7.0/gems/bundler-2.2.15/lib/bundler/vendor/thor/lib/thor/base.rb:485:in `start'
  /usr/local/lib/ruby/gems/2.7.0/gems/bundler-2.2.15/lib/bundler/cli.rb:24:in `start'
  /usr/local/lib/ruby/gems/2.7.0/gems/bundler-2.2.15/exe/bundle:49:in `block in <top (required)>'
  /usr/local/lib/ruby/gems/2.7.0/gems/bundler-2.2.15/lib/bundler/friendly_errors.rb:130:in `with_friendly_errors'
  /usr/local/lib/ruby/gems/2.7.0/gems/bundler-2.2.15/exe/bundle:37:in `<top (required)>'
  /usr/local/bin/bundle:23:in `load'
  /usr/local/bin/bundle:23:in `<main>'

I, [2021-03-20T23:42:40.998961 #1]  INFO -- : Terminating async processes
I, [2021-03-20T23:42:40.998991 #1]  INFO -- : Sending INT to 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 pid: 66
I, [2021-03-20T23:42:40.999030 #1]  INFO -- : Sending TERM to exec chpst -u redis -U redis /usr/bin/redis-server /etc/redis/redis.conf pid: 183
2021-03-20 23:42:40.999 UTC [66] LOG:  received fast shutdown request
183:signal-handler (1616283760) Received SIGTERM scheduling shutdown...
2021-03-20 23:42:41.013 UTC [66] LOG:  aborting any active transactions
2021-03-20 23:42:41.014 UTC [66] LOG:  background worker "logical replication launcher" (PID 75) exited with exit code 1
2021-03-20 23:42:41.016 UTC [70] LOG:  shutting down
183:M 20 Mar 2021 23:42:41.058 # User requested shutdown...
183:M 20 Mar 2021 23:42:41.058 * Saving the final RDB snapshot before exiting.
183:M 20 Mar 2021 23:42:41.061 * DB saved on disk
183:M 20 Mar 2021 23:42:41.061 # Redis is now ready to exit, bye bye...
2021-03-20 23:42:41.263 UTC [66] LOG:  database system is shut down


FAILED
--------------------
Pups::ExecError: cd /var/www/discourse && su discourse -c 'bundle install --deployment --retry 3 --jobs 4 --verbose --without test development' failed with return #<Process::Status: pid 348 exit 5>
Location of failure: /pups/lib/pups/exec_command.rb:112:in `spawn'
exec failed with the params {"cd"=>"$home", "hook"=>"bundle_exec", "cmd"=>["su discourse -c 'bundle install --deployment --retry 3 --jobs 4 --verbose --without test development'"]}
9b0ca932a7dd52ccdd11e268910e3edcd8369c0c08f65e7f8686d542b9be473b
** FAILED TO BOOTSTRAP ** 上へスクロールして、以前のエラーメッセージを確認してください。複数のエラーが存在する可能性があります。
./discourse-doctor で問題を診断できる場合があります。
➜  discourse git:(master) ✗

@Falco 公式セットアップを「tests-passed」で再試行しましたが、「stable」ではなく、mini_racer gem のエラーは出なくなりました。しかし、まだ DELETE の問題が発生しています。nginx ログの tail とブラウザのコンソールを開いた様子が動画でご確認いただけます。

POST は nginx ログに即座に記録されますが、DELETE はエラー発生後にのみ記録されます。これは奇妙です。

この画面録画はこちらです:
https://drive.google.com/file/d/1SEOdZjjVkQTpqT3ZQJ7SaR-Ib2mO6m4M/view?usp=sharing

このテストは、Discourse を他のソフトウェア(例:HAPROXY など)を介さずに直接ポート 80 で実行するように提案された通りに行いました。

「いいね!」 2

なるほど、確認して明日再現を試みます。ご報告ありがとうございます。

「いいね!」 3

はい、「stable」は現在、bundler のリグレッションにより残念ながら機能していません。

今後 1 日以内に修正に取り組む予定です。

「いいね!」 2

@Falco 問題は再現しましたか?

「いいね!」 1

@Andrea_Giovacchini さん、こんにちは。

まず、2 つの異なる問題があります。

  1. DELETE リクエストがブロックされている問題
  2. 「stable」ブランチ上のユーザー向けに再構築が破損している問題

2 については本日、以下のスレッドで修正されました。
https://meta.discourse.org/t/cant-rebuild-current-stable/183859/6?u=falco

1 について、私の調査結果を共有します。

新しく Discourse をインストールした環境でテスト用 DELETE コマンドを送信すると、以下のようになります。

curl -X DELETE https://falcoland.falco.dev/draft.json
["BAD CSRF"]%

これは、そのコマンドにはユーザーセッションの有効なクッキーも必要であるため、想定された動作です。

一方、あなたのサイトでは以下のようになります。

curl -X DELETE http://apicolturaitalianawebinar.it/draft.json -v
*   Trying 213.229.86.117:80...
* Connected to apicolturaitalianawebinar.it (213.229.86.117) port 80 (#0)
> DELETE /draft.json HTTP/1.1
> Host: apicolturaitalianawebinar.it
> User-Agent: curl/7.75.0
> Accept: */*
>
* Mark bundle as not supporting multiuse
< HTTP/1.1 404 Not Found
< Date: Mon, 22 Mar 2021 18:51:55 GMT
< Server: Apache/2.4.37 (centos) OpenSSL/1.1.1g Phusion_Passenger/6.0.4 mod_perl/2.0.11 Perl/v5.26.3
< X-Runtime: 0.001594
< X-Request-Id: ebe50251-0f06-4b71-acd0-887fb2666abb
< X-Powered-By: Phusion Passenger 6.0.4
< Content-Length: 1351
< Status: 404 Not Found
< Content-Type: text/html; charset=UTF-8
<

Phusion Passenger から 404 エラーが返されています。これは通常の Discourse インストールではないようです。:thinking:

Discourseは削除機能の問題により使用できなくなったためシャットダウンしました。現在、そのURLには別のアプリケーションが応答しています。

なるほど、新規インストールでは問題が再現しないとのことですので、この件はクローズさせていただきます。もし再度同じ問題が発生した場合は、再現手順を明記して新しいトピックを作成してください。

「いいね!」 2

@Falco 再度 http://discourse.apicolturaitalianafb.it/ に設置しましたので、お試しください。ドキュメントに従った標準的なインストールが可能です。

Curl コマンドでは CSRF エラーが発生し、即座に Discourse 内部の nginx ログに記録されますが、インターフェースからの削除は機能せず、私が送信した動画と同様にログへの記録が約 35 秒遅れて表示されます。

app.yml でホスト名を discourse.apicolturaitalianafb.it:8880 に設定し、再構築して http://discourse.apicolturaitalianafb.it:8880 にアクセスすると正常に動作しますが、この方法では利用できません。

Apache で運用中のプロダクションサイトがあるため、このウェブサイトのドキュメントに記載されている通り HAProxy の背後に配置してみましたが、Discourse からの削除が機能しなくなりました。ただし、curl コマンドは動作します。Apache のリバースプロキシを試しても、curl は動作しますが、Discourse からの削除は機能しません。Discourse を Unix ソケットで動作させ、それをリバースプロキシするように設定してみましたが、問題は同じでした。

私が見る限り、リバースプロキシが削除機能を直接「破壊」しているわけではなく、何らかの理由で Discourse の JavaScript が正しい HTML 削除を実行しなくなっているようです。

あなたが試されたフレッシュインストールは、直接公開されていますか?