6

I am having problems configuring ELB for my servers.

I start 2 micro instances with the exact same conf and try to do Load Balancing. However they never pass the health check (HTTP port 80 path:"/").

  • Ping is ok on the website. So is telnet on 80.

How did the health check works? Am I doing anything really wrong?

EDIT:

  • Both Direct browser access and GET (via curl) works correctly (status 200)
4
  • 1
    I have the same problem. I just have it checking TCP:80 as an interim solution (which works fine).
    – samuelkf
    Nov 24, 2011 at 17:05
  • It worked! Thanks! But I still dont know how the health check works .. :( Can you write an answer so I can check it as accepted?
    – diegodias
    Nov 24, 2011 at 17:25
  • Are you using Django? Are you redirect HTTP to HTTPS? I summarized my experience how to solve AWS ELB health check with HTTP to my blog: androidkr.blogspot.kr/2014/03/…
    – Wonil
    Mar 29, 2014 at 14:19
  • They both don't pass the health check?
    – rogerdpack
    Feb 9, 2022 at 22:35

6 Answers 6

1

I have the same problem. I just have it checking TCP:80 as an interim solution (which works fine).

2

I've come to the conclusion that the response, apart from being a HTTP 200 response, must contain certain headers. I've had a HTTP 200 returned from my tomcat server running on the instance not work, but a static html page served by httpd (also returning a 200 code) work fine. Looking at the headers, one of the few differences was that the tomcat one didn't contain the content-type. Not sure why that would make a difference, though.

1

I assume it performs an HTTP GET request to the specified path "/", of each of the servers and looks for a successful HTTP response code (200). Can you successfully make a GET request to http://<backend_server_IP>:80/ via a browser (or CLI tool such as wget or curl).

If the request is served successfully, the second thing to ask is: have you configured your servers' security group so that access to port 80 is limited to a particular source address or subnet? If so, you need to add ELB's security group to the filter. The group is always called:

amazon-elb/amazon-elb-sg

So you can just add this under the 'Source' field in the Security Groups section of the AWS Console.

3
  • The port 80 is open to the world (0.0.0.0/0). Both direct browser access and curl works correctly (200)
    – diegodias
    Nov 24, 2011 at 13:34
  • Are the webservers bound only to the public IP/domain? I assume ELB uses the internal (private) IPs so that no external bandwidth is used. Can you successfully make a request from one of your Amazon instances to http://<private_IP>:80/ If so then I'm out of ideas! Nov 24, 2011 at 14:22
  • It was not accessible working with the internal IP. I changed it, its now working, but the health check still not passing.
    – diegodias
    Nov 24, 2011 at 16:32
1

You must be using a specific domain name on your web server. Or you set up your web server to meet any request (binding *) or follow the documentation.

0

so i've just got the http check to work by pointing it at a static html file (as opposed to a php page).

'/' does not work despite it returning a valid http status when using curl, etc. '/file.html' does however pass the health check.

0
  • Firstly, Ensure the ELB security traffic has allowed traffic back from the instance, and the instance security group allows traffic from the ELB.
  • It was mentioned response must be 200
  • And finally do you have more than one interface from what I can tell it will choose randomly which interface.
  • ELB Needs to be in a subnet with internet route to IGW

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .