前提・実現したいこと
railsアプリをAWS(ec2)へのデプロイ時に「We're sorry, but something went wrong.」
のエラーをなくし、正常にwebアプリを表示させたい。
発生している問題・エラーメッセージ
元々デプロイしていたwebアプリを更新し、unicornやNginxを再起動し、再度IPアドレスを打ってwebアプリにアクセスしようとしたら、
![イ(450a91417ed53acc03de2f00136385f0.png)
のエラーが表示されます。
エラーログを確認したところ
「ActionController::RoutingError」
というエラー文は表示されていますが、どこのルーティングエラーなのか全くわかりません。
ローカルの開発環境ではルーティングエラーは出ず、正常に動作しています。
わかる方いましたら、ご教授お願いします。
production.log エラーログの一部 ↓
I, [2021-12-20T13:13:06.212963 #3396] INFO -- : [ab866cee-181c-461e-a6e8-3ea9c06db9f3] Rendered layouts/header.html.erb (Duration: 0.0ms | Allocations: 12) I, [2021-12-20T13:13:06.213122 #3396] INFO -- : [ab866cee-181c-461e-a6e8-3ea9c06db9f3] Rendered layouts/footer.html.erb (Duration: 0.0ms | Allocations: 4) I, [2021-12-20T13:13:06.213202 #3396] INFO -- : [ab866cee-181c-461e-a6e8-3ea9c06db9f3] Rendered layout layouts/application.html.erb (Duration: 1.0ms | Allocations: 455) I, [2021-12-20T13:13:06.213359 #3396] INFO -- : [ab866cee-181c-461e-a6e8-3ea9c06db9f3] Completed 200 OK in 2ms (Views: 1.4ms | Allocations: 755) I, [2021-12-20T13:13:06.898466 #3395] INFO -- : [9dcba367-9534-419d-88ea-b829f2b6956c] Started POST "/HNAP1/" for 34.65.149.129 at 2021-12-20 13:13:06 +0000 F, [2021-12-20T13:13:06.898988 #3395] FATAL -- : [9dcba367-9534-419d-88ea-b829f2b6956c] [9dcba367-9534-419d-88ea-b829f2b6956c] ActionController::RoutingError (No route matches [POST] "/HNAP1"): [9dcba367-9534-419d-88ea-b829f2b6956c] I, [2021-12-20T13:25:59.827594 #3395] INFO -- : [059e6061-7694-4304-a1e5-054a5f3c279b] Started GET "/" for 168.232.14.138 at 2021-12-20 13:25:59 +0000 I, [2021-12-20T13:25:59.828278 #3395] INFO -- : [059e6061-7694-4304-a1e5-054a5f3c279b] Processing by HomeController#index as HTML I, [2021-12-20T13:25:59.829054 #3395] INFO -- : [059e6061-7694-4304-a1e5-054a5f3c279b] Rendered home/index.html.erb within layouts/application (Duration: 0.2ms | Allocations: 74) I, [2021-12-20T13:25:59.829656 #3395] INFO -- : [059e6061-7694-4304-a1e5-054a5f3c279b] Rendered layouts/header.html.erb (Duration: 0.0ms | Allocations: 12) I, [2021-12-20T13:25:59.829811 #3395] INFO -- : [059e6061-7694-4304-a1e5-054a5f3c279b] Rendered layouts/footer.html.erb (Duration: 0.0ms | Allocations: 4) I, [2021-12-20T13:25:59.829870 #3395] INFO -- : [059e6061-7694-4304-a1e5-054a5f3c279b] Rendered layout layouts/application.html.erb (Duration: 1.0ms | Allocations: 455) I, [2021-12-20T13:25:59.830022 #3395] INFO -- : [059e6061-7694-4304-a1e5-054a5f3c279b] Completed 200 OK in 2ms (Views: 1.3ms | Allocations: 756) I, [2021-12-20T13:33:16.039367 #3395] INFO -- : [1dc3c0a8-045d-471f-8c14-e460057102b2] Started GET "/.env" for 3.239.174.91 at 2021-12-20 13:33:16 +0000 F, [2021-12-20T13:33:16.039901 #3395] FATAL -- : [1dc3c0a8-045d-471f-8c14-e460057102b2] [1dc3c0a8-045d-471f-8c14-e460057102b2] ActionController::RoutingError (No route matches [GET] "/.env"): [1dc3c0a8-045d-471f-8c14-e460057102b2] I, [2021-12-20T13:33:16.336928 #3396] INFO -- : [d99f163f-ba3a-49a3-a8d0-d9998d2018b7] Started POST "/" for 3.239.174.91 at 2021-12-20 13:33:16 +0000 F, [2021-12-20T13:33:16.337412 #3396] FATAL -- : [d99f163f-ba3a-49a3-a8d0-d9998d2018b7] [d99f163f-ba3a-49a3-a8d0-d9998d2018b7] ActionController::RoutingError (No route matches [POST] "/"): [d99f163f-ba3a-49a3-a8d0-d9998d2018b7] I, [2021-12-20T13:49:53.070793 #3396] INFO -- : [0442c896-22a9-4275-81cb-768847bf7f07] Started GET "/config/getuser?index=0" for 209.141.50.223 at 2021-12-20 13:49:53 +0000 F, [2021-12-20T13:49:53.071329 #3396] FATAL -- : [0442c896-22a9-4275-81cb-768847bf7f07] [0442c896-22a9-4275-81cb-768847bf7f07] ActionController::RoutingError (No route matches [GET] "/config/getuser"): [0442c896-22a9-4275-81cb-768847bf7f07] I, [2021-12-20T13:56:36.825103 #3395] INFO -- : [05004d69-d799-4ffb-92f8-19e4f9349550] Started POST "/GponForm/diag_Form?images/" for 45.229.54.57 at 2021-12-20 13:56:36 +0000 F, [2021-12-20T13:56:36.825651 #3395] FATAL -- : [05004d69-d799-4ffb-92f8-19e4f9349550] [05004d69-d799-4ffb-92f8-19e4f9349550] ActionController::RoutingError (No route matches [POST] "/GponForm/diag_Form"): [05004d69-d799-4ffb-92f8-19e4f9349550] I, [2021-12-22T14:00:45.372054 #17965] INFO -- : Migrating to CreateUserQuestions (20210908141213) I, [2021-12-22T14:00:45.427347 #17965] INFO -- : Migrating to CreatePostQuestions (20210909113913) I, [2021-12-22T14:00:45.436396 #17965] INFO -- : Migrating to AddPostquestionidToUserquestion (20210909115016) I, [2021-12-22T14:00:45.441730 #17965] INFO -- : Migrating to RemoveNomberOfFromPostQuestions (20210915133111) I, [2021-12-22T14:00:45.444236 #17965] INFO -- : Migrating to RemoveUserIdFromUserQuestions (20210918131802) I, [2021-12-22T14:00:45.446785 #17965] INFO -- : Migrating to AddMylistToUsers (20211201130149) I, [2021-12-22T14:00:45.452807 #17965] INFO -- : Migrating to RemoveMylistFromUsers (20211204005551) I, [2021-12-22T14:00:45.455448 #17965] INFO -- : Migrating to CreateMylists (20211204010352)
試したこと
- ec2インスタンスの再起動
- unicornの再起動
- Nginxの再起動
- railsのルーティングを一部変更
- アセットファイルのコンパイル
補足情報(FW/ツールのバージョンなど)
ruby 2.7.2
rails 6.1.3.2
unicorn 6.0.0
Nginx
回答1件
あなたの回答
tips
プレビュー
バッドをするには、ログインかつ
こちらの条件を満たす必要があります。