Bad Gateway 502 following AWS maintenance on EC2 instance

0

Hi,

Could someone explain in layman's terms, I'm not technical, why my App running perfectly until AWS did some maintenance work on my instance is now returning a 502 Bad Gateway Error?

And can anyone help fix it?

Thanks,

Gary

demandé il y a un an344 vues
2 réponses
2
Réponse acceptée

Hello Gary,

The causes can be multiple and it really depends on what type of services or applications you're running in your EC2 instance. If I take here some assumptions: you're running a web based application that runs in a web server like apache or nginx or other, which means that for some reason those services cannot reach the application (e.g. PHP application).

Please consider provide more details on which type of workload/services or applications you're running in your EC2.

Thanks, Luis

AWS
luis
répondu il y a un an
0

Thanks Luis,

We've solved the issue now.

My app service was down. Also apache was causing an issue.

We ran these commands:

sudo service apache2 stop

sudo systemctl restart nginx

rails s -d

It was frustrating as the error occurred following AWS maintenance work and they weren't keen to help solve the issue.

But, again, thanks for trying to help.

Gary

répondu il y a un an
  • Great and sorry to hear that - it looks like that apache2 overlaps with nginx and the most likely raison is that they use the same service ports (80 HTTP, 443 HTTPS). I would recommend to, if apache is not used at all, to remove it from your instance.

Vous n'êtes pas connecté. Se connecter pour publier une réponse.

Une bonne réponse répond clairement à la question, contient des commentaires constructifs et encourage le développement professionnel de la personne qui pose la question.

Instructions pour répondre aux questions