LoginSignup
0
0

【heroku】サブスクを再契約したらアプリが動かなかった時の解決方法

Posted at

きっかけ

久しぶりにデプロイしたアプリを動かすために、herokuサブスクを再契約したら以下のエラーが出た。
image.png

エラーの確認方法

コンソールでアプリのルートディレクトリにアクセスし、heroku logs --tailsと入力する。→以下のエラーが表示された。

 Error: The following error occurred:
 »     Missing required flag app
 »   See more help with --help

コンソールでherokuにログインしていなかったので、heroku loginと入力してherokuにログインする。
再度heroku logs --tailsを入力するが同じエラーになる。

調べて以下のサイトを参考にしながら、gitとherokuを紐づける。
https://qiita.com/hirokik-0076/items/71c104158fa8b963ba85

  1. git remote -vを入力すると、herokuがリポジトリ一覧にない。
  2. heroku git:remote -a アプリ名を入力してgitとherokuを紐づける。
  3. heroku configと入力してアプリが紐づいているか確認する。

上記をやってから再度、heroku logs --tailsを入力すると、以下のログが表示された。

2024-05-31T12:48:09.473391+00:00 heroku[router]: at=error code=H14 desc="No web processes running" method=GET path="/" host=アプリ名.herokuapp.com request_id=xxxxxxxxxxxx fwd="xxxxx" dyno= connect= service= status=503 bytes= protocol=https

原因

Eco Dynos がOnになっていなかった。
herokuのアプリのページで、Recources > Eco Dynos を見るとスイッチがOffになっていた。
スイッチをOnにしてサイトにアクセスするとアプリが動いた。
image.png

参考サイト

https://qiita.com/hirokik-0076/items/71c104158fa8b963ba85
https://devcenter.heroku.com/articles/error-codes#h14-no-web-dynos-running

0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0