teratail header banner
teratail header banner
質問するログイン新規登録

質問編集履歴

3

原因と解決方法の追記

2021/07/11 11:44

投稿

Peanuts888
Peanuts888

スコア6

title CHANGED
File without changes
body CHANGED
@@ -42,4 +42,20 @@
42
42
 
43
43
  === web (Free): java -jar target/*.jar -Dserver.port=$PORT (1)
44
44
  web.1: crashed 2021/07/11 18:53:48 +0900 (~ 10m ago)
45
- ```
45
+ ```
46
+
47
+ ###原因
48
+ ProcfileのPORT部分が間違っておりました。
49
+ ```java
50
+ // エラー発生
51
+ web: java -jar target/*.jar -Dserver.port=$PORT
52
+
53
+ // 解決
54
+ web: java -jar target/*.jar --server.port=$PORT
55
+ ```
56
+ 詳しくは回答者様に頂いたこちらのURLに載っています。
57
+ -Dserver.port=$PORTでの指定は別のやり方でやる必要があるっぽいです。
58
+ https://devcenter.heroku.com/ja/articles/setting-the-http-port-for-java-applications#spring-boot
59
+
60
+ 今回の教訓は、ドキュメントに全部載ってるから信じてちゃんと読む です。
61
+ 本当にありがとうございました。

2

追記

2021/07/11 11:43

投稿

Peanuts888
Peanuts888

スコア6

title CHANGED
File without changes
body CHANGED
@@ -1,7 +1,9 @@
1
1
  同じタイトルで別原因の質問をした者です。
2
2
  現在原因不明のエラーに見舞われています。
3
+ ローカル環境では
4
+ http://localhost:8080/login
5
+ にアクセスするとログイン画面が表示されます。
3
6
  ### 発生している問題・エラーメッセージ
4
-
5
7
  ```
6
8
  2021-07-11T09:53:47.779236+00:00 heroku[web.1]: Error R10 (Boot timeout) -> Web process failed to bind to $PORT within 90 seconds of launch
7
9
  2021-07-11T09:53:47.918220+00:00 heroku[web.1]: Stopping process with SIGKILL

1

試したこと追加

2021/07/11 10:39

投稿

Peanuts888
Peanuts888

スコア6

title CHANGED
File without changes
body CHANGED
@@ -28,9 +28,16 @@
28
28
  ```
29
29
 
30
30
  ### 試したこと
31
+ heroku ps を実行するとこのように表示されます。
32
+ ステータスが crashed になっているのが気になっていますが、関係ありませんでしょうか。
33
+ ```java
34
+ heroku ps
35
+ » Warning: heroku update available from 7.53.0 to 7.56.0.
36
+ Free dyno hours quota remaining this month: 997h 14m (99%)
37
+ Free dyno usage for this app: 0h 7m (0%)
38
+ For more information on dyno sleeping and how to upgrade, see:
39
+ https://devcenter.heroku.com/articles/dyno-sleeping
31
40
 
32
- ここに問題に対して試したことを記載してください。
41
+ === web (Free): java -jar target/*.jar -Dserver.port=$PORT (1)
33
-
34
- ### 補足情報(FW/ツールのバージョンなど)
42
+ web.1: crashed 2021/07/11 18:53:48 +0900 (~ 10m ago)
35
-
36
- ここにより詳細な情報を記載してください。
43
+ ```