AWS Load balancer connection reset

Posted by joshmmo on Server Fault See other posts from Server Fault or by joshmmo
Published on 2013-06-21T18:13:50Z Indexed on 2013/06/26 10:23 UTC
Read the original article Hit count: 290

I have an ELB set up with two instances. The issue I have with it is that when I do not add www. to it, the ELB just hangs. This is some info I get when I spider with wget:

Spider mode enabled. Check if remote file exists.
--2013-06-20 13:40:54--  http://learning.example.com/
Resolving learning.example.com... 54.xxx.x.x53, 50.xx.xxx.x71
Connecting to learning.example.com|54.xxx.x.x53|:80... connected.
HTTP request sent, awaiting response... No data received.
Retrying.

when I add www. it works great. I have a GoDaddy SSL cert that I added to the listener section that covers 3 domains, www.learning.example.com, files.learning.example.com and learning.example.com.

These are my listener settings:

- HTTP  80  HTTPS   443 N/A N/A 
- SSL   443 SSL 443 Change  canvasNew (Change)

My EC2 instances are running apache2 on Ubuntu 12.04. I will be happy to post my vhosts file if needed. However, when I ran the server with the domains pointing to just one EC2 instance things worked fine.

How can I fix this issue for learning.example.com? Why does www work just fine? A second question would be what is the difference between instance protocol and load balancer protocol?

EDIT:

Here are the dig results for learning.example.com from yesterday. I changed the DNS entry to point to one instance to make sure it was the elb. When I switch it back I will do it for www.learning.example.com

; <<>> DiG 9.9.1-P2 <<>> learning.example.com
;; global options: +cmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 20210
;; flags: qr rd ra; QUERY: 1, ANSWER: 3, AUTHORITY: 0, ADDITIONAL: 0

;; QUESTION SECTION:
;learning.example.com. IN    A

;; ANSWER SECTION:
learning.example.com. 2559 IN CNAME  canvas-22222222222.us-west-1.elb.amazonaws.com.
canvas-22222222222.us-west-1.elb.amazonaws.com. 60 IN A 54.xxx.x.x53
canvas-22222222222.us-west-1.elb.amazonaws.com. 60 IN A 50.xx.xxx.x71

;; Query time: 83 msec
;; SERVER: 10.x.xx.20#53(10.x.xx.20)
;; WHEN: Thu Jun 20 13:40:47 2013
;; MSG SIZE  rcvd: 137

EDIT 2:

Here is some more info that might be helpful.

Port Configuration: 80 (HTTP) forwarding to 443 (HTTPS)
Backend Authentication: Disabled
Stickiness: Disabled(edit)

443 (SSL, Certificate: canvasNew) forwarding to 443 (SSL)
Backend Authentication: Disabled

So I switched everything to one EC2 IP address to bypass the elb to make sure things are working. It's running great. www and the non-www url work perfectly fine. Its only when I switch things to the ELB that learning.example.com hangs and www.learning.example.com works.

Hopefully you can get some ideas flowing.

© Server Fault or respective owner

Related posts about apache2

Related posts about amazon-ec2