EC2 instance is out of service in loadbalancer

Question:

I have an EC2 instance up and running.
I have a load balancer where its associated with EC2 instance.

enter image description here
Now the instance is shown as OutofService.
I even tried changing listening ports and all. Things were working until,rebooted my EC2 instance.
Any help would be higly appreciated.

Just for the info: I have rails app running at port 3001 and I have one listenser for HTTP:80(loadbalancer) to HTTP:3001.

I also have checked the working app through ssh in the terminal.

Answer:

The problem was, after rebooting the instance aws assigns new ip
to the EC2 which I didn’t notice.

And I was logging in thorough ssh to the old ec2 instance.
And hence curl was never failing too.

(I am quite curious why this ip address still active and when I last checked it was active even after 15 days)

Nevertheless great check points(in general) by SkyWalker.

Finally what I had to:

With new ip, my pem file also got screwed up. Hence created new instance, new pem file, adjusted load balancer to point to this instance and security groups accorindgly.

PS:I couldn’t be any more stupid.

Leave a Reply