On 10/07/2019 11:02 AM, Lukas Tribus wrote:

On Mon, Oct 7, 2019 at 6:30 AM rihad <ri...@mail.ru> wrote:
Thanks! But according to the manual, shouldn't haproxy re-resolve AWS server 
name regardless of its resolver settings?

A few other events can trigger a name resolution at run time:
   - when a server's health check ends up in a connection timeout: this may be
     because the server has a new IP address. So we need to trigger a name
     resolution to know this new IP.
No. That is when the resolver is actually configured. Please read from
the same section:
Oh, ok, I must have misunderstood "A few other events *can trigger* a name resolution at run time" But that doesn't mean it will necessarily succeed in case no resolvers have been configured ) I should say that no errors or warnings regarding failed name resolution even appeared in syslog which left me puzzled about what the root cause could be.

Anyway, I've added this:

resolvers mydns
# this sugar seems to require haproxy-2.0:
#    parse-resolv-conf
    nameserver mydns0

hoping it will help.


HAProxy allows using a host name on the server line to retrieve its IP address
using name servers. By default, HAProxy resolves the name when parsing the
configuration file, at startup and cache the result for the process' life.
This is not sufficient in some cases, such as in Amazon where a server's IP
can change after a reboot or an ELB Virtual IP can change based on current
This chapter describes how HAProxy can be configured to process server's name
resolution at run time.


Reply via email to