アップグレード失敗 - SSH を使って修復するための助けが欲しい

Yesterday I had an admin message about upgrades. From the web UI, I did the Docker upgrade first and this seemed to go well. After it finished, the upgrade button for Discourse was enabled and I initiated that. At some point something broke and now our site is down. I was on my phone at the time and I didn’t manage to look at the log carefully to see where exactly things broke, before

I’m currently pocking around over SSH and about to try ./launcher rebuild app to hopefully get a better idea about what exactly is the problem in the upgrade. I’ve never done Discourse command-line repair and I want to make sure that I don’t blow away our data. Looking over app.yml, I see that the container is stateless - great - and that all the data is on the host, accessed as a shared volume.

I ran discourse-doctor and it looks like disk space is not the issue. Will the rebuild app command touch the local data store?

Yes, do the ./launcher rebuild app that should do it. It will not blow away your data.

If you’d rather not to it yourself, please see Automatic Rebuilds When You Need Them.

Thanks, the rebuild seems to have worked - the GitHub avatars and favicon don’t show for some reason, though.

こんにちは!
アップグレードを行ったところ、ページで 504 Gateway Time-out エラーが表示されました。
以下の手順を実行しましたが、まだ動作しません。

cd /var/discourse
git pull; ./launcher rebuild app

なぜまだ動作しないのか、何か原因が思い当たることはありますか?

いいえ、何か手がかりを得られる可能性はあまりありません。私の最善の推測では、サーバーが完全に再起動するのを待たなかったことが原因かもしれませんが、他のあらゆることかもしれません。再構築はエラーなく完了しましたか?ディスク容量が不足していませんか?docker ps でコンテナが実行中であることを示していますか?

docker ps で以下が表示されます:
Captura de pantalla 2020-11-04 a las 16.52.52

./launcher enter app を実行すると、Container is not running(コンテナが実行されていません)と表示されます。これを起動するにはどうすればよいでしょうか?

ログファイルには以下が記載されています:
rake-13.0.1 がいずれのソースからも見つかりませんでした
bundle install を実行して不足している gem をインストールしてください

これは何か関係があるでしょうか?
ありがとうございます。

そのコンテナ名は、再構築がまだ進行中であり、わずか4分間であることを示しています。

ログを追い続けるには、以下を実行してください。

docker logs -tf sweet_chatelet

ログは更新されていますか?

再構築が完了し、以下のみが表示されます:
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES

./launcher enter app を実行すると、次のエラーが表示されます:
Error response from daemon: Container … is not running

リビルドが何らかのステップで失敗しているようです。

./launcher rebuild app のみで新しいリビルドを実行し、ログを確認してください。別のエラーで停止したら、スクロールしてエラーメッセージを検索してください。それが問題の原因を示します。それらをここにコピーしていただければ、お手伝いできます。

@Falco ./launcher logs app と入力すると、以下が表示されます:
rake-13.0.1 がどのソースからも見つかりませんでした
欠落している gem をインストールするには bundle install を実行してください。

これはログの全体ですか?もっと広い範囲のログを共有していただけますか?

このサーバーは、奇妙なファイアウォールや企業環境の背後にありますか?それとも、インターネット上の単純な VPS ですか?

./launcher rebuild app を完了した後、以下が表示されました:ブートストラップに失敗しました。上記をスクロールして、以前のエラーメッセージを探してください。複数のエラーが存在する可能性があります。
./discourse-doctor を実行すると問題の診断に役立つかもしれません。

しかし、./discourse-doctor を実行しても何も解決されません。

上にスクロールして、以前のエラーメッセージを確認していただけますか?

これが何が起こっているかを確認するのに役立つかわかりませんが!

最初の 3 つのスクリーンショットは ./launcher logs app の出力ですが、これらは役に立ちません。

最後の 1 つは ./launcher rebuild app の出力で、答えが含まれています!エラーがないか確認し、可能であれば出力全体をテキストとしてここに貼り付けてください。

ありがとうございます!

/pups/lib/pups/config.rb:106:in `block (2 levels) in run_commands': Invalid run command cd (SyntaxError)
\tfrom /pups/lib/pups/config.rb:100:in `each'
\tfrom /pups/lib/pups/config.rb:100:in `block in run_commands'
\tfrom /pups/lib/pups/config.rb:99:in `each'
\tfrom /pups/lib/pups/config.rb:99:in `run_commands'
\tfrom /pups/lib/pups/config.rb:78:in `run'
\tfrom /pups/lib/pups/cli.rb:31:in `run'
\tfrom /pups/bin/pups:8:in `<main>'
44bf915bdff740d4441ad5239f79d5b14a6ed375300c52b85c10eefb7af677a2
** ブートストラップに失敗しました ** 上にスクロールして、以前のエラーメッセージを探してください。複数のエラーがある可能性があります。
./discourse-doctor を使用すると、問題の診断に役立つ場合があります。

app.yml に無効なコマンドが含まれているようです。

プラグインを追加する際に、無効な文字を入力してしまった可能性があります。

パスワードを削除した上で、app.yml の内容をここに貼り付けていただけますか?

はい、こちらです:
app.txt (3.4 KB)

Subfolder support with Docker を有効にしようとしたようですが、最初のブロックのインデントが崩れてしまったようです。

必要なことは、82 行目、83 行目、84 行目、85 行目の先頭にスペースを 2 つ追加することだけです。

その後、ファイルを保存して再構築してください。