質問をすることでしか得られない、回答やアドバイスがある。

15分調べてもわからないことは、質問しよう!

新規登録して質問してみよう
ただいま回答率
85.48%
AWS(Amazon Web Services)

Amazon Web Services (AWS)は、仮想空間を機軸とした、クラスター状のコンピュータ・ネットワーク・データベース・ストーレッジ・サポートツールをAWSというインフラから提供する商用サービスです。

Q&A

解決済

1回答

1463閲覧

AWSで「502 Bad Gateway」エラーが出てしまう

kee4234

総合スコア23

AWS(Amazon Web Services)

Amazon Web Services (AWS)は、仮想空間を機軸とした、クラスター状のコンピュータ・ネットワーク・データベース・ストーレッジ・サポートツールをAWSというインフラから提供する商用サービスです。

0グッド

0クリップ

投稿2022/08/18 00:42

前提

半年以上AWSで運用していたサービスが突然「502 Bad Gateway」エラーになってしまいました。

インスタンスがエラー後正常に復帰したと通知があったのでそれが原因になっているとは思うのですがインスタンスのほうでは特にエラーなどは見当たらず正常に実行されているようです。

Amazon EC2 がインスタンスを自動復旧した場合何か再設定する必要があるのでしょうか?

ご教授いただけますと幸いです。

発生している問題・エラーメッセージ

Description One of your Amazon EC2 instances associated with your AWS account in the ap-northeast-1 Region was successfully recovered after a failed System status check. The Instance ID is listed in the 'Affected resources' tab. * What do I need to do? Your instance is running and reporting healthy. If you have startup procedures that aren't automated during your instance boot process, please remember that you need to log in and run them. * Why did Amazon EC2 auto recover my instance? Your instance was configured to automatically recover after a failed System status check. Your instance may have failed a System status check due to an underlying hardware failure or due to loss of network connectivity or power. Please refer to https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ec2-instance-recover.html#auto-recovery-configuration for more information. * How is the recovered instance different from the original instance? The recovered instance is identical to the original instance, including the instance ID, private IP addresses, public IP address, Elastic IP addresses, attached EBS volumes and all instance metadata. The instance is rebooted as part of the automatic recovery process and the contents of the memory (RAM) are not retained. You can learn more about Amazon EC2 Auto Recovery here: https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ec2-instance-recover.html If you have any questions or concerns, you can contact the AWS Support Team on the community forums and via AWS Premium Support at: https://aws.amazon.com/support

気になる質問をクリップする

クリップした質問は、後からいつでもMYページで確認できます。

またクリップした質問に回答があった際、通知やメールを受け取ることができます。

バッドをするには、ログインかつ

こちらの条件を満たす必要があります。

AbeTakashi

2022/08/18 01:29

これだけの情報だとちょっと分からないですね。第三者が判断するならもう少しサーバに関しての詳細な情報が必要かと思います。サーバ(Nginx?)のエラーログに502の理由とか書かれていませんか? PHP-FPMが起動してないとかだと502が出たりしますが(PHPかどうかもわかりませんけど)
kee4234

2022/08/18 01:35

アパッチを再起動したところ復旧することができました。 少ない情報にも関わらずご回答いただきましてありがとうございました。 普段はサーバーをあまりいじらないので焦ってしまいました。。
guest

回答1

0

自己解決

アパッチの再起動により復旧することができました。
ご迷惑おかけいたしました。

投稿2022/08/18 01:33

kee4234

総合スコア23

バッドをするには、ログインかつ

こちらの条件を満たす必要があります。

yu_1985

2022/08/18 06:07

再起動ではなくて、そもそもApacheが立ち上がってなかったということですかね。 もしそうなのであれば自動起動するようにしておきましょう。 古いOSでなければ sudo systemctl enable httpd で行けます。
kee4234

2022/08/18 09:25

ご指摘いただいた通りApacheの自動起動が無効になっておりました。 大変勉強になりました、ありがとうございます。
guest

あなたの回答

tips

太字

斜体

打ち消し線

見出し

引用テキストの挿入

コードの挿入

リンクの挿入

リストの挿入

番号リストの挿入

表の挿入

水平線の挿入

プレビュー

15分調べてもわからないことは
teratailで質問しよう!

ただいまの回答率
85.48%

質問をまとめることで
思考を整理して素早く解決

テンプレート機能で
簡単に質問をまとめる

質問する

関連した質問