# Backend no server has available

**URL:** <https://discourse.haproxy.org/t/backend-no-server-has-available/2008>\
**Category:** Help!\
**Created:** [January 17, 2018, 6:17am UTC](https://discourse.haproxy.org/t/backend-no-server-has-available/2008 "2018-01-17T06:17:10Z")\
**Posts on this page:** 13\
**Page:** 1

<div class="post-metadata">

**Author:** ![vamsiha](https://avatars.discourse-cdn.com/v4/letter/v/ce7236/32.png) [@vamsiha](https://discourse.haproxy.org/u/vamsiha)\
**Post date:** [January 17, 2018, 6:17am UTC](https://discourse.haproxy.org/t/backend-no-server-has-available/2008/1 "2018-01-17T06:17:10Z")

</div>

Hi All,

I am facing below issue, Please help.

Jan 17 06:07:15 localhost haproxy[83847]: Proxy LMS\_Web started.  
Jan 17 06:07:15 localhost haproxy[83847]: Proxy jasperserver-pro started.  
Jan 17 06:07:15 localhost haproxy[83847]: Proxy LMS\_App started.  
Jan 17 06:07:15 localhost haproxy[83849]: Server jasperserver-pro/xyz.domain.com is DOWN, reason: Layer7 wrong status, code: 404, info: “Not Found”, check duration: 8ms. 0 active and 0 backup servers left. 0 sessions active, 0 requeued, 0 remaining in queue.  
Jan 17 06:07:15 localhost haproxy[83849]: backend jasperserver-pro has no server available!

Below is the my configuration Please help…

frontend LMS\_Web  
bind :80  
bind :443 ssl crt /etc/ssl/certificate.pem  
redirect scheme https if !{ ssl\_fc }  
option httplog  
mode http  
stats enable  
stats uri /stats  
stats realm Strictly\ Statistics  
stats auth user:pass  
acl url\_jasperserver-pro path\_reg -i jasperserver-pro  
acl url\_jasperserver-pro url\_reg -i jasperserver-pro  
use\_backend jasperserver-pro if url\_jasperserver-pro  
default\_backend LMS\_App

#---------------------------------------------------------------------

# static backend for serving up images, stylesheets and such

#---------------------------------------------------------------------  
backend jasperserver-pro  
balance roundrobin  
option httpchk HEAD /keepAlive.txt HTTP/1.0  
cookie SERVERid insert indirect nocache  
server \<URW\_hostname\> \<URW\_IP\>:8080 check cookie server1

#---------------------------------------------------------------------

# round robin balancing between the various backends

#---------------------------------------------------------------------  
backend LMS\_App  
balance roundrobin  
option httpchk HEAD /keepAlive.txt HTTP/1.0  
cookie SERVERid insert indirect nocache  
server \<UUW\_hostname\> \<UUW\_IP\>:80 check cookie server1

---

<div class="post-metadata">

**Author:** ![lukastribus](https://avatars.discourse-cdn.com/v4/letter/l/7ea924/32.png) [@lukastribus](https://discourse.haproxy.org/u/lukastribus)\
**Post date:** [January 17, 2018, 8:18am UTC](https://discourse.haproxy.org/t/backend-no-server-has-available/2008/2 "2018-01-17T08:18:10Z")

</div>

Your configured the health check to HEAD request the file /keepAlive.txt on the server, and the server responds with 404 Not Found.

Fix the configuration on the server, or haproxy.

---

<div class="post-metadata">

**Author:** ![vamsiha](https://avatars.discourse-cdn.com/v4/letter/v/ce7236/32.png) [@vamsiha](https://discourse.haproxy.org/u/vamsiha)\
**Post date:** [January 17, 2018, 1:04pm UTC](https://discourse.haproxy.org/t/backend-no-server-has-available/2008/3 "2018-01-17T13:04:19Z")

</div>

Thank you for responding…

Can you please elaborate “Fix the configuration on the server, or haproxy”

It will be great if you provide in-detail

---

<div class="post-metadata">

**Author:** ![vamsiha](https://avatars.discourse-cdn.com/v4/letter/v/ce7236/32.png) [@vamsiha](https://discourse.haproxy.org/u/vamsiha)\
**Post date:** [January 18, 2018, 12:23pm UTC](https://discourse.haproxy.org/t/backend-no-server-has-available/2008/4 "2018-01-18T12:23:27Z")

</div>

Can some one help me…

I am newbie for haproxy… I need to switch server based on string in URL… I have provided my configuration Please help…Struggling last 1 week…

---

<div class="post-metadata">

**Author:** ![ASA](https://avatars.discourse-cdn.com/v4/letter/a/dfb087/32.png) [@ASA](https://discourse.haproxy.org/u/ASA)\
**Post date:** [January 18, 2018, 12:58pm UTC](https://discourse.haproxy.org/t/backend-no-server-has-available/2008/5 "2018-01-18T12:58:11Z")

</div>

@vamsiha [http://cbonte.github.io/haproxy-dconv/1.8/configuration.html#4-option%20httpchk](http://cbonte.github.io/haproxy-dconv/1.8/configuration.html#4-option%20httpchk)  
you should check if the file keepAlive.txt is available for the haproxy

---

<div class="post-metadata">

**Author:** ![vamsiha](https://avatars.discourse-cdn.com/v4/letter/v/ce7236/32.png) [@vamsiha](https://discourse.haproxy.org/u/vamsiha)\
**Post date:** [January 18, 2018, 1:21pm UTC](https://discourse.haproxy.org/t/backend-no-server-has-available/2008/6 "2018-01-18T13:21:41Z")

</div>

Hi ASA,

Tried but same error…I have tried configuring below details in Haproxy.cfg file.

option httpchk OPTIONS \* HTTP/1.1\r\nHost:\ [www.xyz.com](http://www.xyz.com)

Thanks & Regards,  
Vamsi

---

<div class="post-metadata">

**Author:** ![ASA](https://avatars.discourse-cdn.com/v4/letter/a/dfb087/32.png) [@ASA](https://discourse.haproxy.org/u/ASA)\
**Post date:** [January 18, 2018, 1:44pm UTC](https://discourse.haproxy.org/t/backend-no-server-has-available/2008/7 "2018-01-18T13:44:32Z")

</div>

try simply

> curl [http://xyz.domain.com/keepAlive.txt](http://xyz.domain.com/keepAlive.txt)

---

<div class="post-metadata">

**Author:** ![vamsiha](https://avatars.discourse-cdn.com/v4/letter/v/ce7236/32.png) [@vamsiha](https://discourse.haproxy.org/u/vamsiha)\
**Post date:** [January 18, 2018, 2:01pm UTC](https://discourse.haproxy.org/t/backend-no-server-has-available/2008/8 "2018-01-18T14:01:29Z")

</div>

Hi ASA

I have tried and got no response and I have tried with below URL…

curl [https://xyz.domain.com/keepAlive.txt](https://xyz.domain.com/keepAlive.txt) got below response.

Document Moved
# Object Moved
This document may be found [here](http://xyz.domain.com/Core/keepAlive.txt/keepAlive.txt)

I am not sure where to place KeepAlive.txt file.

Thanks & Regards,  
Vamsi

---

<div class="post-metadata">

**Author:** ![ASA](https://avatars.discourse-cdn.com/v4/letter/a/dfb087/32.png) [@ASA](https://discourse.haproxy.org/u/ASA)\
**Post date:** [January 18, 2018, 4:19pm UTC](https://discourse.haproxy.org/t/backend-no-server-has-available/2008/9 "2018-01-18T16:19:26Z")

</div>

This file should be accessible from haproxy on backend server

---

<div class="post-metadata">

**Author:** ![vamsiha](https://avatars.discourse-cdn.com/v4/letter/v/ce7236/32.png) [@vamsiha](https://discourse.haproxy.org/u/vamsiha)\
**Post date:** [January 19, 2018, 6:24am UTC](https://discourse.haproxy.org/t/backend-no-server-has-available/2008/10 "2018-01-19T06:24:30Z")

</div>

Hi ASA,

Can you please tell how i can make it…

Thanks & Regards,  
Vamsi

---

<div class="post-metadata">

**Author:** ![lukastribus](https://avatars.discourse-cdn.com/v4/letter/l/7ea924/32.png) [@lukastribus](https://discourse.haproxy.org/u/lukastribus)\
**Post date:** [January 19, 2018, 8:38am UTC](https://discourse.haproxy.org/t/backend-no-server-has-available/2008/11 "2018-01-19T08:38:26Z")

</div>

If you don’t want HTTP health checks, just remove the “option httpchk” directive entirely. Otherwise you need to understand at least how to put a file on your backend server and serve it with a 200 OK message.

---

<div class="post-metadata">

**Author:** ![vamsiha](https://avatars.discourse-cdn.com/v4/letter/v/ce7236/32.png) [@vamsiha](https://discourse.haproxy.org/u/vamsiha)\
**Post date:** [January 19, 2018, 10:15am UTC](https://discourse.haproxy.org/t/backend-no-server-has-available/2008/12 "2018-01-19T10:15:54Z")

</div>

Hi Lukas,

So you mean to say If I remove below entry, nothing will happen to my rules.

option httpchk HEAD /keep.txt HTTP/1.0

It will only helpful to me Server health check.

Correct me if I am wrong.

Thanks & Regards,  
Vamsi

---

<div class="post-metadata">

**Author:** ![lukastribus](https://avatars.discourse-cdn.com/v4/letter/l/7ea924/32.png) [@lukastribus](https://discourse.haproxy.org/u/lukastribus)\
**Post date:** [January 19, 2018, 10:31am UTC](https://discourse.haproxy.org/t/backend-no-server-has-available/2008/13 "2018-01-19T10:31:11Z")

</div>

Yes, “option httpchk” only configures the http health check, which you seem to have so much trouble with.
