無効なGitHubリポジトリ追加後のDiscourse再構築

Discourseサイトでapp.ymlファイルに誤って無効なGitHubリポジトリを追加した後、問題が発生しています。./launcher rebuild appを実行したところ、プロセスが失敗し、サイトが再構築できなくなりました。残念ながら、バックアップはありますが、復元プロセス中に失敗します。以下に、問題の詳細と完全なエラーログを示します。

実施した手順:

  1. こちらの投稿のガイダンスに従って、DiscourseのインストールにDeepSeek LLMを追加しようとしました。
  2. リポジトリURL https://github.com/deepseek-ai/DeepSeek-LLMapp.ymlファイルに追加しました。
  3. ./launcher rebuild appを実行したところ、失敗し、サイトが機能しなくなりました。

完全なエラーログ:

(See full trace by running task with --trace)
I, [2025-01-21T02:32:16.599723 #1]  INFO -- : gem install multipart-post -v 2.4.0 -i /var/www/discourse/plugins/discourse-ai-topic-summary/gems/3.3.6 --no-document --ignore-dependencies --no-user-install
Successfully installed multipart-post-2.4.0
1 gem installed
gem install faraday-multipart -v 1.0.4 -i /var/www/discourse/plugins/discourse-ai-topic-summary/gems/3.3.6 --no-document --ignore-dependencies --no-user-install
Successfully installed faraday-multipart-1.0.4
1 gem installed
gem install event_stream_parser -v 1.0.0 -i /var/www/discourse/plugins/discourse-ai-topic-summary/gems/3.3.6 --no-document --ignore-dependencies --no-user-install
Successfully installed event_stream_parser-1.0.0
1 gem installed
gem install ruby-openai -v 7.0.0 -i /var/www/discourse/plugins/discourse-ai-topic-summary/gems/3.3.6 --no-document --ignore-dependencies --no-user-install
Successfully installed ruby-openai-7.0.0
1 gem installed
gem install tokenizers -v 0.4.4 -i /var/www/discourse/plugins/discourse-ai/gems/3.3.6 --no-document --ignore-dependencies --no-user-install
Successfully installed tokenizers-0.4.4-x86_64-linux
1 gem installed
gem install tiktoken_ruby -v 0.0.9 -i /var/www/discourse/plugins/discourse-ai/gems/3.3.6 --no-document --ignore-dependencies --no-user-install
Successfully installed tiktoken_ruby-0.0.9-x86_64-linux
1 gem installed
gem install ed25519 -v 1.2.4 -i /var/www/discourse/plugins/discourse-ai/gems/3.3.6 --no-document --ignore-dependencies --no-user-install
Building native extensions. This could take a while...
Successfully installed ed25519-1.2.4
1 gem installed
... (more gem installation logs) ...
I, [2025-01-21T02:32:16.600035 #1]  INFO -- : Terminating async processes
I, [2025-01-21T02:32:16.600051 #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: 39
I, [2025-01-21T02:32:16.600103 #1]  INFO -- : Sending TERM to exec chpst -u redis -U redis /usr/bin/redis-server /etc/redis/redis.conf pid: 107
2025-01-21 02:32:16.600 UTC [39] LOG:  received fast shutdown request
107:signal-handler (1737426736) Received SIGTERM scheduling shutdown...
2025-01-21 02:32:16.602 UTC [39] LOG:  aborting any active transactions
2025-01-21 02:32:16.604 UTC [39] LOG:  background worker "logical replication launcher" (PID 54) exited with exit code 1
2025-01-21 02:32:16.605 UTC [49] LOG:  shutting down
107:M 21 Jan 2025 02:32:16.612 # User requested shutdown...
107:M 21 Jan 2025 02:32:16.612 * Saving the final RDB snapshot before exiting.
2025-01-21 02:32:16.634 UTC [39] LOG:  database system is shut down
107:M 21 Jan 2025 02:32:16.667 * DB saved on disk
107:M 21 Jan 2025 02:32:16.667 # Redis is now ready to exit, bye bye...

> FAILED
--------------------
Pups::ExecError: cd /var/www/discourse && su discourse -c 'bundle exec rake db:migrate' failed with return #<Process::Status: pid 837 exit 1>
Location of failure: /usr/local/lib/ruby/gems/3.3.0/gems/pups-1.2.1/lib/pups/exec_command.rb:132:in `spawn'
exec failed with the params {"cd"=>"$home", "tag"=>"migrate", "hook"=>"db_migrate", "cmd"=>["su discourse -c 'bundle exec rake db:migrate'"]}
bootstrap failed with exit code 1
** 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.

課題:

  • バックアップからサイトを復元できません。
  • 再構築は一貫して失敗し、サイトは動作不能なままです。

ヘルプのお願い:

  1. これらの問題にどのように対処すればよいでしょうか?rebuild appの実行により、誤ったプラグインなどが作成された可能性があります。
  2. 手動での復旧手順はありますか?
  3. この状態から安全にサイトを再構築するための提案はありますか?

ホストされているDiscourseインスタンスにサインアップし、バックアップをアップロードしましたが、ファイルは正常にアップロードされたにもかかわらず、復元オプションが表示されません。

進め方について、どのようなアドバイスやガイダンスでもいただけると大変助かります。さらに詳細が必要な場合はお知らせください!

プラグインを削除しても、リビルドはまだ失敗しますか?

また、そのリポジトリはプラグインではありません。Deepseekのソースコードです。サムが言及していたのは、それをプラグインにすることだったと思いますか?

「いいね!」 1

そして、手動復旧の手順は ./launcher start app です。これは、最後に稼働していたコンテナが破棄されていない場合です。その後、app.yml からそのリポジトリを削除し、再構築します。

「いいね!」 1

上記が失敗の原因ですか? どのマイグレーションが失敗しているかを示す上記の部分を含める必要があります。

壊れたプラグインか、YAML ファイルのフォーマットエラーのいずれかだと思いますが、提供された情報だけでは判断できません。

バックアップを復元するには、team@discourse.org にメールで復元を依頼する必要があります。

「いいね!」 1

これはすぐに削除してください。

GitHub - deepseek-ai/DeepSeek-LLM: DeepSeek LLM: Let there be answers は Discourse プラグインではないため、app.yml ファイルに含めるべきではありません。

「いいね!」 6

フィードバックをくださった皆様に感謝いたします。どのように解決したのか説明できませんが、機能しているようです。Discourseをクラッシュさせた原因は、app.ymlにプラグインではないGitHubリポジトリを配置したことだと気づき、最初にその行を削除して再構築を試みましたが、成功しませんでした。サーバーを数回再起動しましたが、うまくいきませんでした。再起動するとサイトは動作状態に戻りましたが、管理者またはSSHから再構築すると再びクラッシュしました。その後、突然BAM!SSHから再構築され、その後プラグインを更新し、管理者から再構築しました。Ubuntuを更新し、問題ないようです。解決したようですが、まだ少し謎です。:partying_face:

「いいね!」 3