1

It's working fine. All of a sudden it started throwing 504 Timeout error. In SSH it was showing ubuntu upgrade warning, I've installed the necessary and upgraded correctly hoping that it would not throw errors anymore. But still the issue persist. I've checked the inbound rules in AWS, all good for port 80,443 and 22. I dont have SSM agent installed in AWS and I dont find the right guide to install that.

Which could have possibly gone wrong?

112233
  • 2,406
  • 3
  • 38
  • 88
  • 1
    Maybe IP address has changed? Have you verified it? – Marcin Mar 01 '21 at 07:07
  • @Marcin yes it is. Thank you so much and really sorry for the silly mistake. I didnt realize it changed after reboot – 112233 Mar 01 '21 at 07:32
  • No problem. If you don't mind I will provide an answer with extra info. – Marcin Mar 01 '21 at 07:33
  • 1
    Yes please go ahead. The apache not starting..though I restart it..Just if you could help with that – 112233 Mar 01 '21 at 07:34
  • Have you enabled it? `systemctl enable apache` - the exact command depend on your OS. You can make new question specific to apache if you want with details of its setup as well as instance that you use, any error messages. – Marcin Mar 01 '21 at 07:37
  • Fixed now as I restarted as root – 112233 Mar 01 '21 at 07:38

2 Answers2

1

Based on the comments.

The issue was that instance was restarted. Consequently, the public IP provided by AWS has changed:

We release your instance's public IP address when it is stopped, hibernated, or terminated. Your stopped or hibernated instance receives a new public IP address when it is started.

To overcome this issue in the future, you can attach an elastic IP (EIP) to your instance. EIP persists between restarts and is free as long as it is attached to a running instance.

Marcin
  • 215,873
  • 14
  • 235
  • 294
  • 1
    Thanks a lot .. I'll use the elastic IP then. ALso I managed to restart the apache by logging in as root user. SO prblm solved. Thanks a lot – 112233 Mar 01 '21 at 07:37
0

First, attach one elastic IP with your existing instance which then you can one public IP and EIP

if you don't attach the EIP every time when you will restart the server you get a new instance IP.

Also, you have to check the security group applied on that instance.

Kishor Pant
  • 136
  • 1
  • 4