# HAProxy fails to start if backend server names don't resolve

**URL:** <https://discourse.haproxy.org/t/haproxy-fails-to-start-if-backend-server-names-dont-resolve/322>\
**Category:** Help!\
**Created:** [May 28, 2016, 7:33pm UTC](https://discourse.haproxy.org/t/haproxy-fails-to-start-if-backend-server-names-dont-resolve/322 "2016-05-28T19:33:49Z")\
**Posts on this page:** 1\
**Showing post:** 15

<div class="post-metadata">

**Author:** ![anon88575059](https://avatars.discourse-cdn.com/v4/letter/a/e495f1/32.png) [@anon88575059](https://discourse.haproxy.org/u/anon88575059)\
**Post date:** [December 2, 2016, 2:19pm UTC](https://discourse.haproxy.org/t/haproxy-fails-to-start-if-backend-server-names-dont-resolve/322/15 "2016-12-02T14:19:34Z")

</div>

Is this perhaps the same issue I have, I use aws opsworks and haproxy as a loadbalancer.

In haproxy 1.7 i have this:  
backend api  
description test api  
balance roundrobin  
cookie JSESSIONID prefix nocache  
option forwardfor  
option httpchk get /api/ping  
http-check expect status 200  
http-response add-header x-backend %s  
http-response set-header Access-Control-Allow-Origin "\*"  
server api1 v-api-s1.xxxx.aws:8080 check cookie s1  
server api2 v-api-s2.xxxx.aws:8080 check cookie s2  
server api3 v-api-s3.xxxx.aws:8080 check cookie s3  
server api4 v-api-s4.xxxx.aws:8080 check cookie s4  
server api5 v-api-s5.xxxx.aws:8080 check cookie s5

We have in total 50 servers in that list, and opsworks scales up and down on random times.  
and it is so automated that if it shutdown a server it removes it from also from the dns (route53), and adds it back on startup.

I keep getting the error:  
[ALERT] 336/141922 (1565) : parsing [/etc/haproxy1.7/haproxy.cfg:58] : ‘server api5’ : could not resolve address ‘v-api-s5.xxxx.aws’.  
[ALERT] 336/141922 (1565) : Failed to initialize server(s) addr.

How can I resolve this situation? should it not simply start since I provide a health check and not only look at that?

---

_[View the full topic](https://discourse.haproxy.org/t/haproxy-fails-to-start-if-backend-server-names-dont-resolve/322)._
