アップグレードできません - アプリ再構築のブートストラップ失敗

アップグレードする必要があるという通知を受け取ったので、管理画面にアクセスしたところ、以下の表示がありました。

アップグレードリンクをクリックするとチェックが実行されましたが、どちらも「最新の状態です」と表示されました。そこで ./launcher rebuild app を実行したところ、以下のエラーが発生しました。

FAILED
--------------------
Pups::ExecError: cd /var/www/discourse & sudo -H -E -u discourse bash -c '
  set -o errexit
  if [ $(git rev-parse --is-shallow-repository) == "true" ]; then
      git remote set-branches --add origin main
      git remote set-branches origin tests-passed
      git fetch --depth 1 origin tests-passed
  else
      git fetch --tags --prune-tags --prune --force origin
  fi
' failed with return #<Process::Status: pid 130 exit 128>
Location of failure: /usr/local/lib/ruby/gems/3.2.0/gems/pups-1.2.1/lib/pups/exec_command.rb:132:in `spawn'
exec failed with the params {"cd"=>"$home", "hook"=>"code", "cmd"=>["sudo -H -E -u discourse git reset --hard", "sudo -H -E -u discourse git clean -f", "sudo -H -E -u discourse bash -c '\n  set -o errexit\n  if [ $(git rev-parse --is-shallow-repository) == \"true\" ]; then\n      git remote set-branches --add origin main\n      git remote set-branches origin $version\n      git fetch --depth 1 origin $version\n  else\n      git fetch --tags --prune-tags --prune --force origin\n  fi\n'", "sudo -H -E -u discourse bash -c '\n  set -o errexit\n  if [[ $(git symbolic-ref --short HEAD) == $version ]] ; then\n      git pull\n  else\n      git -c advice.detachedHead=false checkout $version\n  fi\n'", "sudo -H -E -u discourse git config user.discourse-version $version", "mkdir -p tmp", "chown discourse:www-data tmp", "mkdir -p tmp/pids", "mkdir -p tmp/sockets", "touch tmp/.gitkeep", "mkdir -p                    /shared/log/rails", "bash -c \"touch -a           /shared/log/rails/{production,production_errors,unicorn.stdout,unicorn.stderr,sidekiq}.log\"", "bash -c \"ln    -s           /shared/log/rails/{production,production_errors,unicorn.stdout,unicorn.stderr,sidekiq}.log $home/log\"", "bash -c \"mkdir -p           /shared/{uploads,backups}\"", "bash -c \"ln    -s           /shared/{uploads,backups} $home/public\"", "bash -c \"mkdir -p           /shared/tmp/{backups,restores}\"", "bash -c \"ln    -s           /shared/tmp/{backups,restores} $home/tmp\"", "chown -R discourse:www-data /shared/log/rails /shared/uploads /shared/backups /shared/tmp\"", "[ ! -d public/plugins ] || find public/plugins/ -maxdepth 1 -xtype l -delete"]}
bootstrap failed with exit code 128
** 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.
fd6a747d640a06c375439c5c134aa46ff11ceb8f677d6d16247cb57c9772f731

その後 ./discourse-doctor を実行したところ、サイトは復旧しました(ただし、テストメールがタイムアウトしたのは別の問題かもしれません)。再度 ./launcher rebuild app を試したところ、同じ問題でブートストラップに失敗しました。

何か手がかりはありますか? Docker on Ubuntu 22.04 を使用しています。

それを実行して、ここにその情報を追加していただけますか?

「いいね!」 1

app rebuild の完全なログはこちらです。

discourse-log.log.txt (17.7 KB)

app stopapp start を試すと、問題なく再開されることがわかりますが、これは古いバージョンでのことだと思います。

了解しました。ログ全体ではなく、明白なエラー(警告ではなく)のみが必要です。

(リンクでのアップロードがうまくいかない理由はわかりませんが)ログを確認したところ、唯一明らかなエラーは次のとおりです。

fatal: 'https://github.com/discourse/discourse.git/' にアクセスできません: ホスト名を解決できません: github.com

これは良くない兆候ですか?

サーバーで ~$ host github.com を実行すると、正しく解決されます。

エラーが明白なら、彼は投稿しないだろう。 :slight_smile: (しかし真面目な話、それらのログに詳しくない人が何が重要で何が重要でないかを判断するのは非常に難しく、誰かが間違ったエラーを推測したトピックが何百も見つかることがある。)

Dockerのネットワークが何らかの理由で壊れている問題のようだ。Dockerは最新か?OSは?

「いいね!」 2

しかし、@gilgongo は的を射ていました :wink:

「いいね!」 1

ああ、ネットワーキングですか?OK、では「基本的な」ことをしようとして、systemctl restart docker.service を実行し、次に ./launcher rebuild app を実行しました。そして(1万年かかりそうな時間後)、再起動して動作しました!今は「3.3.0.beta3-dev」を実行していると表示されています。これは良いことだと思いますか?少なくとも動作しているようです。

ふう、助けてくれてありがとう!Discourseが大好きです!

「いいね!」 2

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