0
votes

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?

1

1 Answers

0
votes

Each node has a label, which is zero to 63 octets in length.
(Taken from the RFC 1034)

So in general if the whole FQDN is >63 characters thats no problem.

To simplify implementations, the total number of octets that represent a domain name (i.e., the sum of all label octets and label lengths) is limited to 255.

But if one "node" or "label" (the part between two dots) is longer than 63 characters that would be a violation of that RFC.

As I understand your post this isn't the case (and if dig works I assume it is RFC compliant) and so the issue should not be the CNAME itself.