0

I have created my load balancer and added ec2-instance to my load balancer but it marks my instance as out of service. My load balancer and the ec2-instance has the same security group assigned to it.

Security Group: (Inbound traffic and outbound-Type:HTTP, Protocol: TCP, Port range:80, source:0.0.0.0/0)

Load balancer  Health Check details:
Ping Protocol : TCP
Ping Port:80
Response timeout:5
Interval:10
Unhealthy Threshold:5
Healthy Threshold:3

Also,Tried removing the instance from the aws ELB and added to my elb again but that did'nt work. Can anyone give me any suggestions or help to resolve this issue.

nad87563
  • 3,672
  • 7
  • 32
  • 54
  • What is your Load Balncer and AWS ELB are they two separate? – Piyush Patil Jul 26 '16 at 19:22
  • What happen when you put the ip address of your EC2 in a browser? Do you see your application? – Piyush Patil Jul 26 '16 at 19:27
  • no i tried connecting my ip from browser but it says unable to connect. but i am able to ping to that ip – nad87563 Jul 26 '16 at 19:29
  • Do you have apache configured on your EC2 Instance? What application does it have? – Piyush Patil Jul 26 '16 at 19:30
  • i am new to this elb. i havent configured apache on my ec2 instance.and i am using amzon linux ami, ebs volume for glusterfs storage and have installed gluster server on it. do i need iam role for my instance ?? – nad87563 Jul 26 '16 at 19:39
  • 1
    If you don't have a website actually running on your EC2 instance yet then none of this is going to work. The ELB is checking to see if the website is actually accessible on the server, it's not just checking if it can ping the server. – Mark B Jul 26 '16 at 19:48
  • No you don't need IAM role you need to configure your server to listen to Port 80 run this command on the instance sudo iptables -A INPUT -p tcp --dport 80 -j ACCEPT and detach and attach the instance and see if it works? – Piyush Patil Jul 26 '16 at 20:00

1 Answers1

0

load balancer marked the instance as inservice after installing httpd

 sudo yum install httpd 
 sudo service httpd start
nad87563
  • 3,672
  • 7
  • 32
  • 54