Server could not resolve lxd address?

So I posted an issue in the LXD forum. I cloned a container (patriots), but it (patriotsplace) retains the IP of the cloned container so I end up with 2 containers with the same IP! Not good.

I shut down the original container (patriots), but now Haproxy is giving me the following error:
root@HAProxy:/etc/haproxy# sudo /usr/sbin/haproxy -c -V -f /etc/haproxy/haproxy.cfg

[ALERT] 325/182048 (5552) : parsing [/etc/haproxy/haproxy.cfg:129] : ‘server patriotsplace’ : could not resolve address ‘patriotsplace.lxd’.
[ALERT] 325/182048 (5552) : Failed to initialize server(s) addr.

Here is my haproxy config for the patriotsplace container:
frontend http_lb
acl patriotspl hdr(host) -i
use_backend patriots2 if patriotspl

backend patriots2
http-request set-header X-Client-IP %[src]
redirect scheme https if ! { ssl_fc }
server patriotsplace patriotsplace.lxd:80 check

A similar config for the original container worked fine.


DNS resolution of the hostname patriotsplace.lxd declared in the backend section as a server fails. What does

host patriotsplace.lxd


host patriotsplace.lxd
Host patriotsplace.lxd not found: 3(NXDOMAIN)



I can’t possible know what is wrong with your OS or containers, and it is completely unrelated to haproxy.