Hi Jarno,

My backend config is:

backend bk_8093_read
    balance    source
    http-response set-header X-Server %s
    option log-health-checks
    option httpchk get 
/nexus/v1/repository/rawcentral/com.att.swm.attpublic/healthcheck.txt 
HTTP/1.1\r\nAuthorization:\ Basic\ <auth>
    server primary8093r <server1>:8093 check verify none
    server backUp08093r <server2>::8093 check backup verify none
    server backUp18093r <server3>::8093 check backup verify none


Output of log:

[Dec 18 05:22:51]  Health check for server bk_8093_read/primary8093r failed, 
reason: Layer7 wrong status, code: 400, info: "No Host", check duration: 543ms, 
status: 0/2 DOWN.
[Dec 18 05:27:36]  Health check for server bk_8093_read/primary8093r failed, 
reason: Layer7 timeout, check duration: 2001ms, status: 0/2 DOWN.
[Dec 18 05:27:40]  Health check for server bk_8093_read/primary8093r failed, 
reason: Layer7 wrong status, code: 400, info: "No Host", check duration: 
1829ms, status: 0/2 DOWN.
[Dec 18 05:30:14]  Health check for server bk_8093_read/primary8093r failed, 
reason: Layer7 timeout, check duration: 2001ms, status: 0/2 DOWN.
[Dec 18 05:30:22]  Health check for server bk_8093_read/primary8093r failed, 
reason: Layer7 wrong status, code: 400, info: "No Host", check duration: 
1903ms, status: 0/2 DOWN.
[Dec 18 05:32:34]  Health check for server bk_8093_read/primary8093r failed, 
reason: Layer7 timeout, check duration: 2001ms, status: 0/2 DOWN.
[Dec 18 05:32:36]  Health check for server bk_8093_read/primary8093r failed, 
reason: Layer7 wrong status, code: 400, info: "No Host", check duration: 126ms, 
status: 0/2 DOWN.
[Dec 18 05:36:28]  Health check for backup server bk_8093_read/backUp18093r 
failed, reason: Socket error, info: "Connection reset by peer", check duration: 
117ms, status: 0/2 DOWN.
[Dec 18 05:36:30]  Health check for backup server bk_8093_read/backUp18093r 
failed, reason: Layer4 connection problem, info: "Connection refused", check 
duration: 58ms, status: 0/2 DOWN.
[Dec 18 06:01:44]  Health check for server bk_8093_read/primary8093r failed, 
reason: Layer7 timeout, check duration: 2001ms, status: 0/2 DOWN.
[Dec 18 06:01:50]  Health check for server bk_8093_read/primary8093r failed, 
reason: Layer7 wrong status, code: 400, info: "No Host", check duration: 235ms, 
status: 0/2 DOWN.
[Dec 18 06:02:13]  Health check for server bk_8093_read/primary8093r failed, 
reason: Layer7 timeout, check duration: 2001ms, status: 0/2 DOWN.
[Dec 18 06:02:19]  Health check for server bk_8093_read/primary8093r failed, 
reason: Layer7 wrong status, code: 400, info: "No Host", check duration: 125ms, 
status: 0/2 DOWN.
[Dec 18 06:02:26]  Health check for server bk_8093_read/primary8093r failed, 
reason: Layer7 timeout, check duration: 2000ms, status: 0/2 DOWN.
[Dec 18 06:02:28]  Health check for server bk_8093_read/primary8093r failed, 
reason: Layer7 wrong status, code: 400, info: "No Host", check duration: 115ms, 
status: 0/2 DOWN.
[Dec 18 06:09:31]  Health check for server bk_8093_read/primary8093r failed, 
reason: Layer7 timeout, check duration: 2001ms, status: 0/2 DOWN.
[Dec 18 06:09:42]  Health check for server bk_8093_read/primary8093r failed, 
reason: Layer7 wrong status, code: 400, info: "No Host", check duration: 
1027ms, status: 0/2 DOWN.
[Dec 18 06:12:12]  Health check for server bk_8093_read/primary8093r failed, 
reason: Layer7 timeout, check duration: 2000ms, status: 0/2 DOWN.
[Dec 18 06:12:22]  Health check for server bk_8093_read/primary8093r failed, 
reason: Layer7 wrong status, code: 400, info: "No Host", check duration: 119ms, 
status: 0/2 DOWN.
[Dec 18 06:12:34]  Health check for server bk_8093_read/primary8093r failed, 
reason: Layer7 timeout, check duration: 2001ms, status: 0/2 DOWN.
[Dec 18 06:12:36]  Health check for server bk_8093_read/primary8093r failed, 
reason: Layer7 wrong status, code: 400, info: "No Host", check duration: 116ms, 
status: 0/2 DOWN.
[Dec 18 06:17:35]  Health check for server bk_8093_read/primary8093r failed, 
reason: Layer7 timeout, check duration: 2001ms, status: 0/2 DOWN.
[Dec 18 06:17:42]  Health check for server bk_8093_read/primary8093r failed, 
reason: Layer7 wrong status, code: 400, info: "No Host", check duration: 
1210ms, status: 0/2 DOWN.
[haproxy@zld05596 ~]$


Before we used to rely on TCP health check but that is not working when server 
is in hung state, so wanted to switch to http log where we check if the server 
is responding and have no luck in getting that working.

Any help will be highly apprecuiated.


Thanks,
Praveen.



-----Original Message-----
From: Jarno Huuskonen [mailto:[email protected]] 
Sent: Tuesday, December 18, 2018 1:11 AM
To: UPPALAPATI, PRAVEEN <[email protected]>
Cc: [email protected]
Subject: Re: Http HealthCheck Issue

Hi,

On Mon, Dec 17, UPPALAPATI, PRAVEEN wrote:
> I am trying to use Option httpHealth Check is not working and is marking all 
> servers as down:
> 
> 
> [haproxy@zld05596 ~]$ cat //opt/app/haproxy/etc/haproxy.cfg | grep /nexus/v1
>     option httpchk get 
> /nexus/v1/repository/rawcentral/com.att.swm.attpublic/healthcheck.txt 
> HTTP/1.1\r\nAuthorization:\ Basic\ <basic auth>

s/get/GET/

Do you have check enabled on server lines ? Can you show the backend
config (with sensitive information obscured/removed) ?

> [haproxy@zld05596 ~]$ cat //opt/app/haproxy/log/haproxy.log | grep /nexus/v1

Is your logging working (you'll get logs in /opt/app/haproxy/log/haproxy.log) ?

grep 'Health check for' /opt/app/haproxy/log/haproxy.log

-Jarno

-- 
Jarno Huuskonen

Reply via email to