Backend no server has available

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

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.

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

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…

@vamsiha 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

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

Thanks & Regards,
Vamsi

try simply

curl http://xyz.domain.com/keepAlive.txt

Hi ASA

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

curl https://xyz.domain.com/keepAlive.txt got below response.

Document Moved

Object Moved

This document may be found here

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

Thanks & Regards,
Vamsi

This file should be accessible from haproxy on backend server

Hi ASA,

Can you please tell how i can make it…

Thanks & Regards,
Vamsi

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.

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

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