Running Apache 2.4.7 on an amazon EC2 CentOS 2.6 instance. I'm using the AWS Route 53 dns to access our ELB. With our 'friendly' name being a CNAME to the AWS name which is very long (about 60-70 characters long, dynamically generated and seems to change at least once a week) We have multiple interfaces on the ELB so its normal to return two or more IP addresses (which makes local host files not effective)
I keep getting the error generated from Apache Proxy Error
The proxy server received an invalid response from an upstream server. The proxy server could not handle the request GET /.
Reason: DNS lookup failure for: XXXXXXXXXXXX.com
This DNS failure does not occur when I lookup the hostname with either dig or nslookup, so the DNS 'is' working. But something about the DNS is confusing Apache.
The error doesn't occur if I put the current IP address for one of the interfaces in the local /etc/hosts file, bypassing DNS, but that's not a working solution as I need the dynamic DNS since Amazon frequently changes these addresses, as well that local hosts files only handle the case of single address for given name and we have multiple routes and availability zones for our ELB's.
So is there a CName length limitation that Amazon is exceeding? Does apache lookup DNS in some way that is different than the command line tools?