https://issues.apache.org/bugzilla/show_bug.cgi?id=54657
Bug ID: 54657
Summary: DNS lookup failure for load balancer member does not
stop affected member from receiving and failing
requests
Product: Apache httpd-2
Version: 2.2.21
Hardware: PC
OS: Linux
Status: NEW
Severity: minor
Priority: P2
Component: mod_proxy_balancer
Assignee: [email protected]
Reporter: [email protected]
Classification: Unclassified
the problem that i am reporting here is that when name resolution of a load
balancer member fails, the affected member is not marked as disabled (or in
error state), and taken out of the loop of actively load balanced members. the
bad member continues to get requests and fail them.
i believe what should occur is that the bad member should be marked as disabled
(or in error state), a log entry made to the error log (this already occurs),
and the request sent to a good member, if one is available. also, subsequent
requests should not be sent to the bad member until/unless it becomes
available. if a good member is not available to handle a request, then an error
response is appropriate.
this is a minor issue because the member can be disabled at runtime through the
balancer manager, or the name can be mapped to an address (even if it points to
an address where nothing is listening on the right port -- because as long as
the name resolves and the connection fails, then the member gets marked as
being in error state and removed from the load balancing loop), etc...
this problem was noticed in an environment where the same httpd config is used
in multiple testing environments. the testing environments have varying numbers
of cluster members actually provisioned and available. the idea was that the
loadbalancer would be able to determine when members were not available and
skip over them.
given this simplified config:
<Proxy balancer://api-cluster>
BalancerMember http://box01:8182/api
BalancerMember http://box02:8182/api
</Proxy>
ProxyPass /api/ balancer://api-cluster/
when the box02 name is not resolvable, then every other client request coming
into the load balancer generates a response similar to:
HTTP/1.1 502 Proxy Error
Date: Fri, 08 Mar 2013 15:12:03 GMT
Content-Length: 400
Content-Type: text/html; charset=iso-8859-1
<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 2.0//EN">
<html><head>
<title>502 Proxy Error</title>
</head><body>
<h1>Proxy Error</h1>
<p>The proxy server received an invalid
response from an upstream server.<br />
The proxy server could not handle the request <em><a
href="/api/whatever">GET /api/whatever</a></em>.<p>
Reason: <strong>DNS lookup failure for: box02</strong></p></p>
</body></html>
also, this goes to the error_log at error level:
[Fri Mar 08 10:12:03 2013] [error] [client 127.0.0.1] proxy: DNS lookup failure
for: box02 returned by /api/whatever
--
You are receiving this mail because:
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]