RE: Http HealthCheck Issue

2018-12-27 Thread Aleksandar Lazic
Hi Praveen.

That's because the http health check is on a different network layer.

The server line defines the tcp layer and the http check the application layer.

Please take a look into the doc about check and http-check.

http://cbonte.github.io/haproxy-dconv/1.7/configuration.html#5.2-check

http://cbonte.github.io/haproxy-dconv/1.7/configuration.html#4.2-option%20httpchk

As I don't know how deep the knowledge of the different layers is, let me 
suggest you this articel to refresh the knowledge.

https://en.m.wikipedia.org/wiki/TCP/IP_model

Regards
aleks


 Ursprüngliche Nachricht 
Von: "UPPALAPATI, PRAVEEN" 
Gesendet: 27. Dezember 2018 06:24:43 MEZ
An: Aleksandar Lazic , haproxy 
Betreff: RE: Http HealthCheck Issue

Hi Alex,

If I have one vhost representing all the nexus host's how can haproxy identify 
which server is down ?

I guess health check is to determine which server is healthy right if a vhost 
masks all the servers in the backend list how would haproxy divert the traffic?

Please advise.

Thanks,
Praveen.

-Original Message-
From: Aleksandar Lazic [mailto:al-hapr...@none.at] 
Sent: Thursday, December 20, 2018 2:34 AM
To: UPPALAPATI, PRAVEEN ; haproxy 
Subject: Re: Http HealthCheck Issue

Hi Praveen.

Please keep the list in the loop, thanks.

Am 20.12.2018 um 07:00 schrieb UPPALAPATI, PRAVEEN:
> Hi Alek,
> 
> Now I am totally confused:
> 
> When I say :
> 
> 
> backend bk_8093_read
> balancesource
> http-response set-header X-Server %s
> option log-health-checks
> option httpchk GET 
> /nexus/repository/rawcentral/com.att.swm.attpublic/healthcheck.txt 
> HTTP/1.1\r\nHost:\ server1.com:8093\r\nAuthorization:\ Basic\ ...
> server primary8093r server1.com:8093 check verify none
> server backUp08093r server2.com:8093 check backup verify none 
> server backUp18093r server3.com:8093 check backup verify none
> 
> Here server1.com,server2.com and physical server hostnames.

That's the issue. You should have a vhost name which is for all servers the 
same.

> When I define HOST header which server should I define I was expecting 
> haproxy will formulate that to 
> 
> https://urldefense.proofpoint.com/v2/url?u=http-3A__server1.com-3A8093_nexus_repository_rawcentral_com.att.swm.attpublic_healthcheck.txt=DwIFaQ=LFYZ-o9_HUMeMTSQicvjIg=V0kSKiLhQKpOQLIjj3-g9Q=OZ-O9xFFKCfaCy769FVtGWPRgXm2eydV92WYJPam8Yg=--6orxuqJAZSK_-qumJjuZEhy1Iru7mkgPPJvYpw4RQ=
> https://urldefense.proofpoint.com/v2/url?u=http-3A__server2.com-3A8093_nexus_repository_rawcentral_com.att.swm.attpublic_healthcheck.txt=DwIFaQ=LFYZ-o9_HUMeMTSQicvjIg=V0kSKiLhQKpOQLIjj3-g9Q=OZ-O9xFFKCfaCy769FVtGWPRgXm2eydV92WYJPam8Yg=eJkYBH7JAMAIU1ZIHXCFbOs3RLA0OtMHp1ky_rN-d7s=
> https://urldefense.proofpoint.com/v2/url?u=http-3A__server3.com-3A8093_nexus_repository_rawcentral_com.att.swm.attpublic_healthcheck.txt=DwIFaQ=LFYZ-o9_HUMeMTSQicvjIg=V0kSKiLhQKpOQLIjj3-g9Q=OZ-O9xFFKCfaCy769FVtGWPRgXm2eydV92WYJPam8Yg=sUUE7fa4pe0lN8iFaAuznj-m8sgwQS2X2xeeva-yCEM=
> 
> to monitor which servers are live right , so how could I dynamically populate 
> the HOST?

I have written the following:

> I assume that nexus have a general URL and not srv1,srv2, ...

This is also mentioned in the config example.

https://urldefense.proofpoint.com/v2/url?u=https-3A__help.sonatype.com_repomanager2_installing-2Dand-2Drunning_running-2Dbehind-2Da-2Dreverse-2Dproxy=DwIFaQ=LFYZ-o9_HUMeMTSQicvjIg=V0kSKiLhQKpOQLIjj3-g9Q=OZ-O9xFFKCfaCy769FVtGWPRgXm2eydV92WYJPam8Yg=vJtNj9Bd4EYr_kdknJiGcOOfWnV6Mgna31-JAbiKwq4=

This means on the nexus should be a generic hostname which is for all servers
the same.

Maybe you can share the nexus config, nexus setup and the nexus version, as it's
normally not a big deal to setup a vhost.

Regards
Aleks


PS: What's this urldefense.proofpoint.com crap 8-O

> Please advice.
> 
> Thanks,
> Praveen.
> 
> 
> 
> -Original Message-
> From: Aleksandar Lazic [mailto:al-hapr...@none.at] 
> Sent: Wednesday, December 19, 2018 3:25 PM
> To: UPPALAPATI, PRAVEEN 
> Cc: Jonathan Matthews ; Cyril Bonté 
> ; haproxy@formilux.org
> Subject: Re: Http HealthCheck Issue
> 
> Am 19.12.2018 um 21:04 schrieb UPPALAPATI, PRAVEEN:
>> Ok then do I need to add the haproxy server?
> 
> I suggest to use a `curl -v
> /nexus/v1/repository/rawcentral/com.att.swm.attpublic/healthcheck.txt`
> and see how curl make the request.
> 
> I assume that nexus have a general URL and not srv1,srv2, ...
> For example.
> 
> ###
> curl -vo /dev/null 
> https://urldefense.proofpoint.com/v2/url?u=https-3A__www.haproxy.org=DwIFaQ=LFYZ-o9_HUMeMTSQicvjIg=V0kSKiLhQKpOQLIjj3-g9Q=CaQ1GDp8D6XzObaEV3Ad9IQ3Q1TwhAAYhFQ24IgwP68=53v5RKBVFzzKyU7JGcd8i6eBlGyIfSavQBRkoYcXZm8=
> 
> * Rebuilt URL to: 
> https://urldefense.proofpoint.com/v2/url?u=https-3A__www.haproxy.or

RE: Http HealthCheck Issue

2018-12-26 Thread UPPALAPATI, PRAVEEN
Hi Alex,

If I have one vhost representing all the nexus host's how can haproxy identify 
which server is down ?

I guess health check is to determine which server is healthy right if a vhost 
masks all the servers in the backend list how would haproxy divert the traffic?

Please advise.

Thanks,
Praveen.

-Original Message-
From: Aleksandar Lazic [mailto:al-hapr...@none.at] 
Sent: Thursday, December 20, 2018 2:34 AM
To: UPPALAPATI, PRAVEEN ; haproxy 
Subject: Re: Http HealthCheck Issue

Hi Praveen.

Please keep the list in the loop, thanks.

Am 20.12.2018 um 07:00 schrieb UPPALAPATI, PRAVEEN:
> Hi Alek,
> 
> Now I am totally confused:
> 
> When I say :
> 
> 
> backend bk_8093_read
> balancesource
> http-response set-header X-Server %s
> option log-health-checks
> option httpchk GET 
> /nexus/repository/rawcentral/com.att.swm.attpublic/healthcheck.txt 
> HTTP/1.1\r\nHost:\ server1.com:8093\r\nAuthorization:\ Basic\ ...
> server primary8093r server1.com:8093 check verify none
> server backUp08093r server2.com:8093 check backup verify none 
> server backUp18093r server3.com:8093 check backup verify none
> 
> Here server1.com,server2.com and physical server hostnames.

That's the issue. You should have a vhost name which is for all servers the 
same.

> When I define HOST header which server should I define I was expecting 
> haproxy will formulate that to 
> 
> https://urldefense.proofpoint.com/v2/url?u=http-3A__server1.com-3A8093_nexus_repository_rawcentral_com.att.swm.attpublic_healthcheck.txt=DwIFaQ=LFYZ-o9_HUMeMTSQicvjIg=V0kSKiLhQKpOQLIjj3-g9Q=OZ-O9xFFKCfaCy769FVtGWPRgXm2eydV92WYJPam8Yg=--6orxuqJAZSK_-qumJjuZEhy1Iru7mkgPPJvYpw4RQ=
> https://urldefense.proofpoint.com/v2/url?u=http-3A__server2.com-3A8093_nexus_repository_rawcentral_com.att.swm.attpublic_healthcheck.txt=DwIFaQ=LFYZ-o9_HUMeMTSQicvjIg=V0kSKiLhQKpOQLIjj3-g9Q=OZ-O9xFFKCfaCy769FVtGWPRgXm2eydV92WYJPam8Yg=eJkYBH7JAMAIU1ZIHXCFbOs3RLA0OtMHp1ky_rN-d7s=
> https://urldefense.proofpoint.com/v2/url?u=http-3A__server3.com-3A8093_nexus_repository_rawcentral_com.att.swm.attpublic_healthcheck.txt=DwIFaQ=LFYZ-o9_HUMeMTSQicvjIg=V0kSKiLhQKpOQLIjj3-g9Q=OZ-O9xFFKCfaCy769FVtGWPRgXm2eydV92WYJPam8Yg=sUUE7fa4pe0lN8iFaAuznj-m8sgwQS2X2xeeva-yCEM=
> 
> to monitor which servers are live right , so how could I dynamically populate 
> the HOST?

I have written the following:

> I assume that nexus have a general URL and not srv1,srv2, ...

This is also mentioned in the config example.

https://urldefense.proofpoint.com/v2/url?u=https-3A__help.sonatype.com_repomanager2_installing-2Dand-2Drunning_running-2Dbehind-2Da-2Dreverse-2Dproxy=DwIFaQ=LFYZ-o9_HUMeMTSQicvjIg=V0kSKiLhQKpOQLIjj3-g9Q=OZ-O9xFFKCfaCy769FVtGWPRgXm2eydV92WYJPam8Yg=vJtNj9Bd4EYr_kdknJiGcOOfWnV6Mgna31-JAbiKwq4=

This means on the nexus should be a generic hostname which is for all servers
the same.

Maybe you can share the nexus config, nexus setup and the nexus version, as it's
normally not a big deal to setup a vhost.

Regards
Aleks


PS: What's this urldefense.proofpoint.com crap 8-O

> Please advice.
> 
> Thanks,
> Praveen.
> 
> 
> 
> -Original Message-
> From: Aleksandar Lazic [mailto:al-hapr...@none.at] 
> Sent: Wednesday, December 19, 2018 3:25 PM
> To: UPPALAPATI, PRAVEEN 
> Cc: Jonathan Matthews ; Cyril Bonté 
> ; haproxy@formilux.org
> Subject: Re: Http HealthCheck Issue
> 
> Am 19.12.2018 um 21:04 schrieb UPPALAPATI, PRAVEEN:
>> Ok then do I need to add the haproxy server?
> 
> I suggest to use a `curl -v
> /nexus/v1/repository/rawcentral/com.att.swm.attpublic/healthcheck.txt`
> and see how curl make the request.
> 
> I assume that nexus have a general URL and not srv1,srv2, ...
> For example.
> 
> ###
> curl -vo /dev/null 
> https://urldefense.proofpoint.com/v2/url?u=https-3A__www.haproxy.org=DwIFaQ=LFYZ-o9_HUMeMTSQicvjIg=V0kSKiLhQKpOQLIjj3-g9Q=CaQ1GDp8D6XzObaEV3Ad9IQ3Q1TwhAAYhFQ24IgwP68=53v5RKBVFzzKyU7JGcd8i6eBlGyIfSavQBRkoYcXZm8=
> 
> * Rebuilt URL to: 
> https://urldefense.proofpoint.com/v2/url?u=https-3A__www.haproxy.org_=DwIFaQ=LFYZ-o9_HUMeMTSQicvjIg=V0kSKiLhQKpOQLIjj3-g9Q=CaQ1GDp8D6XzObaEV3Ad9IQ3Q1TwhAAYhFQ24IgwP68=k3KIXBm21aPgFFyUUyjSUxggMPVWIqkWYwdaWeDZ6NI=
>   % Total% Received % Xferd  Average Speed   TimeTime Time  
> Current
>  Dload  Upload   Total   SpentLeft  Speed
>   0 00 00 0  0  0 --:--:-- --:--:-- --:--:-- 
> 0*
>   Trying 51.15.8.218...
> * Connected to 
> https://urldefense.proofpoint.com/v2/url?u=http-3A__www.haproxy.org=DwIFaQ=LFYZ-o9_HUMeMTSQicvjIg=V0kSKiLhQKpOQLIjj3-g9Q=CaQ1GDp8D6XzObaEV3Ad9IQ3Q1TwhAAYhFQ24IgwP68=WMHYWYJP4ycNXvPYov7PnJdkQB26fgfXm_ByW2BCM8g=
>  (51.15.8.218) port 443 (#0)
> * found 148 certificates in /etc/ssl/certs/ca-cer

Re: Http HealthCheck Issue

2018-12-19 Thread Jarno Huuskonen
Hi,

On Wed, Dec 19, Jonathan Matthews wrote:
> On Wed, 19 Dec 2018 at 19:23, UPPALAPATI, PRAVEEN  wrote:
> >
> > Hmm. Wondering why do we need host header? I was able to do curl without 
> > the header. I did not find anything in the doc.
> 
> "curl" automatically adds a Host header unless you are directly
> hitting an IP address.

Even curl [-v] http://ip.add.re.ss adds host header (Host:
ip.add.re.ss). (At least the version I'm using (the one that comes with
centos 7.6)).

-Jarno

-- 
Jarno Huuskonen



Re: Http HealthCheck Issue

2018-12-19 Thread Aleksandar Lazic
Am 19.12.2018 um 21:04 schrieb UPPALAPATI, PRAVEEN:
> Ok then do I need to add the haproxy server?

I suggest to use a `curl -v
/nexus/v1/repository/rawcentral/com.att.swm.attpublic/healthcheck.txt`
and see how curl make the request.

I assume that nexus have a general URL and not srv1,srv2, ...
For example.

###
curl -vo /dev/null https://www.haproxy.org

* Rebuilt URL to: https://www.haproxy.org/
  % Total% Received % Xferd  Average Speed   TimeTime Time  Current
 Dload  Upload   Total   SpentLeft  Speed
  0 00 00 0  0  0 --:--:-- --:--:-- --:--:-- 0*
  Trying 51.15.8.218...
* Connected to www.haproxy.org (51.15.8.218) port 443 (#0)
* found 148 certificates in /etc/ssl/certs/ca-certificates.crt
* found 599 certificates in /etc/ssl/certs
* ALPN, offering http/1.1
* SSL connection using TLS1.2 / ECDHE_RSA_AES_128_GCM_SHA256
*server certificate verification OK
*server certificate status verification SKIPPED
*common name: *.haproxy.org (matched)
*server certificate expiration date OK
*server certificate activation date OK
*certificate public key: RSA
*certificate version: #3
*subject: OU=Domain Control Validated,OU=EssentialSSL
Wildcard,CN=*.haproxy.org
*start date: Fri, 21 Apr 2017 00:00:00 GMT
*expire date: Mon, 20 Apr 2020 23:59:59 GMT
*issuer: C=GB,ST=Greater Manchester,L=Salford,O=COMODO CA
Limited,CN=COMODO RSA Domain Validation Secure Server CA
*compression: NULL
* ALPN, server accepted to use http/1.1
> GET / HTTP/1.1
> Host: www.haproxy.org # <<<< That's the host header which is missing in your
check line
> User-Agent: curl/7.47.0
> Accept: */*
>
< HTTP/1.1 200 OK
< date: Wed, 19 Dec 2018 21:09:30 GMT
< server: Apache
< last-modified: Wed, 19 Dec 2018 18:32:39 GMT
< etag: "504ff5-148d4-57d643d22eab7"
< accept-ranges: bytes
< content-length: 84180
< content-type: text/html
< age: 511
<
{ [16150 bytes data]

###

Btw.: This is also shown in the manual in the Example of the option.

https://cbonte.github.io/haproxy-dconv/1.8/configuration.html#4-option%20httpchk

`option httpchk OPTIONS * HTTP/1.1\r\nHost:\ www `

The manual is good, I suggest to read it several times, what I do always ;-)

You should also avoid `X-` in the response header in your config

`http-response set-header X-Server %s`

As Norman mentioned it in on the list couples of days before.

https://www.mail-archive.com/haproxy@formilux.org/msg32110.html

Best regards
Aleks

> -Original Message-
> From: Jonathan Matthews [mailto:cont...@jpluscplusm.com] 
> Sent: Wednesday, December 19, 2018 1:32 PM
> To: UPPALAPATI, PRAVEEN 
> Cc: Cyril Bonté ; haproxy@formilux.org
> Subject: Re: Http HealthCheck Issue
> 
> On Wed, 19 Dec 2018 at 19:23, UPPALAPATI, PRAVEEN  wrote:
>>
>> Hmm. Wondering why do we need host header? I was able to do curl without the 
>> header. I did not find anything in the doc.
> 
> "curl" automatically adds a Host header unless you are directly
> hitting an IP address.
> 




RE: Http HealthCheck Issue

2018-12-19 Thread UPPALAPATI, PRAVEEN
Ok then do I need to add the haproxy server?

-Original Message-
From: Jonathan Matthews [mailto:cont...@jpluscplusm.com] 
Sent: Wednesday, December 19, 2018 1:32 PM
To: UPPALAPATI, PRAVEEN 
Cc: Cyril Bonté ; haproxy@formilux.org
Subject: Re: Http HealthCheck Issue

On Wed, 19 Dec 2018 at 19:23, UPPALAPATI, PRAVEEN  wrote:
>
> Hmm. Wondering why do we need host header? I was able to do curl without the 
> header. I did not find anything in the doc.

"curl" automatically adds a Host header unless you are directly
hitting an IP address.


Re: Http HealthCheck Issue

2018-12-19 Thread Jonathan Matthews
On Wed, 19 Dec 2018 at 19:23, UPPALAPATI, PRAVEEN  wrote:
>
> Hmm. Wondering why do we need host header? I was able to do curl without the 
> header. I did not find anything in the doc.

"curl" automatically adds a Host header unless you are directly
hitting an IP address.



RE: Http HealthCheck Issue

2018-12-19 Thread UPPALAPATI, PRAVEEN
Hmm. Wondering why do we need host header? I was able to do curl without the 
header. I did not find anything in the doc.

Thanks,
Praveen.

-Original Message-
From: Cyril Bonté [mailto:cyril.bo...@free.fr] 
Sent: Wednesday, December 19, 2018 11:27 AM
To: UPPALAPATI, PRAVEEN 
Cc: haproxy@formilux.org
Subject: Re: Http HealthCheck Issue

> De: "PRAVEEN UPPALAPATI" 
> À: "Cyril Bonté" 
> Cc: haproxy@formilux.org
> Envoyé: Mercredi 19 Décembre 2018 18:10:50
> Objet: RE: Http HealthCheck Issue
> 
> The pointed mistake was GET which I updated and tried. I'm not sure
> if there was something else pointed.

Then please read again the answers, talking about the missing Host header in 
your forged request.

> 
> Thanks,
> Praveen.
> 
> -Original Message-
> From: Cyril Bonté [mailto:cyril.bo...@free.fr]
> Sent: Wednesday, December 19, 2018 9:28 AM
> To: UPPALAPATI, PRAVEEN 
> Cc: haproxy@formilux.org
> Subject: Re: Http HealthCheck Issue
> 
> please, please, PLEASE ! Read the answers before telling again it's
> not working.
> Several users already told you where you made a mistake.
> 
> 
> - Mail original -
> > De: "PRAVEEN UPPALAPATI" 
> > À: "Jarno Huuskonen" 
> > Cc: haproxy@formilux.org, "THANIGAIVEL SIVANANDHAM"
> > 
> > Envoyé: Mercredi 19 Décembre 2018 15:55:34
> > Objet: RE: Http HealthCheck Issue
> > 
> > Hi Jarno,
> > 
> > Even after updating to GET it is still failing:
> > 
> > [Dec 19 06:12:41]  Health check for server
> > bk_8093_read/primary8093r
> > failed, reason: Layer7 timeout, check duration: 2001ms, status: 0/2
> > DOWN.
> > [Dec 19 06:12:44]  Health check for server
> > bk_8093_read/primary8093r
> > failed, reason: Layer7 wrong status, code: 400, info: "No Host",
> > check duration: 769ms, status: 0/2 DOWN.
> > [Dec 19 06:49:30]  Health check for server bk_8089/primary8089
> > succeeded, reason: Layer4 check passed, check duration: 0ms,
> > status:
> > 3/3 UP.
> > [Dec 19 06:49:31]  Health check for server
> > bk_5100_read/primary5100r
> > failed, reason: Layer7 wrong status, code: 400, info: "No Host",
> > check duration: 379ms, status: 0/2 DOWN.
> > [Dec 19 06:49:31]  Health check for backup server
> > bk_5100_read/backUp05100r failed, reason: Layer7 wrong status,
> > code:
> > 400, info: "No Host", check duration: 105ms, status: 0/2 DOWN.
> > [Dec 19 06:51:32]  Health check for server bk_8089/primary8089
> > succeeded, reason: Layer4 check passed, check duration: 0ms,
> > status:
> > 3/3 UP.
> > [Dec 19 06:51:32]  Health check for server
> > bk_8093_read/primary8093r
> > failed, reason: Layer7 wrong status, code: 400, info: "No Host",
> > check duration: 124ms, status: 0/2 DOWN.
> > [Dec 19 06:51:33]  Health check for backup server
> > bk_8093_read/backUp08093r failed, reason: Layer7 wrong status,
> > code:
> > 400, info: "No Host", check duration: 1ms, status: 0/2 DOWN.
> > [Dec 19 06:51:33]  Health check for backup server
> > bk_8093_read/backUp18093r failed, reason: Layer4 connection
> > problem,
> > info: "Connection refused", check duration: 63ms, status: 0/2 DOWN.
> > [Dec 19 06:51:33]  Health check for server
> > bk_8093_write/primary8093w
> > failed, reason: Layer7 invalid response, info: "<15><03><03>",
> > check
> > duration: 128ms, status: 0/2 DOWN.
> > [Dec 19 06:51:34]  Health check for server
> > bk_5100_read/primary5100r
> > failed, reason: Layer7 wrong status, code: 400, info: "No Host",
> > check duration: 269ms, status: 0/2 DOWN.
> > [Dec 19 06:51:34]  Health check for backup server
> > bk_5100_read/backUp05100r failed, reason: Layer7 wrong status,
> > code:
> > 400, info: "No Host", check duration: 20ms, status: 0/2 DOWN.
> > [haproxy@zld05596 etc]$
> > 
> > 
> > backend bk_8093_read
> > balancesource
> > 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\ 
> > server primary8093r :8093 check verify none
> > server backUp08093r :8093 check backup verify none
> > server backUp18093r :8093 check backup verify none
> > 
> > also wanted to find out if the same option httpchk will work for
> > https?
> > 
> > frontend http-5100
> > bind *:5100 ssl crt .pem
> > 

Re: Http HealthCheck Issue

2018-12-19 Thread Cyril Bonté
> De: "PRAVEEN UPPALAPATI" 
> À: "Cyril Bonté" 
> Cc: haproxy@formilux.org
> Envoyé: Mercredi 19 Décembre 2018 18:10:50
> Objet: RE: Http HealthCheck Issue
> 
> The pointed mistake was GET which I updated and tried. I'm not sure
> if there was something else pointed.

Then please read again the answers, talking about the missing Host header in 
your forged request.

> 
> Thanks,
> Praveen.
> 
> -Original Message-
> From: Cyril Bonté [mailto:cyril.bo...@free.fr]
> Sent: Wednesday, December 19, 2018 9:28 AM
> To: UPPALAPATI, PRAVEEN 
> Cc: haproxy@formilux.org
> Subject: Re: Http HealthCheck Issue
> 
> please, please, PLEASE ! Read the answers before telling again it's
> not working.
> Several users already told you where you made a mistake.
> 
> 
> - Mail original -
> > De: "PRAVEEN UPPALAPATI" 
> > À: "Jarno Huuskonen" 
> > Cc: haproxy@formilux.org, "THANIGAIVEL SIVANANDHAM"
> > 
> > Envoyé: Mercredi 19 Décembre 2018 15:55:34
> > Objet: RE: Http HealthCheck Issue
> > 
> > Hi Jarno,
> > 
> > Even after updating to GET it is still failing:
> > 
> > [Dec 19 06:12:41]  Health check for server
> > bk_8093_read/primary8093r
> > failed, reason: Layer7 timeout, check duration: 2001ms, status: 0/2
> > DOWN.
> > [Dec 19 06:12:44]  Health check for server
> > bk_8093_read/primary8093r
> > failed, reason: Layer7 wrong status, code: 400, info: "No Host",
> > check duration: 769ms, status: 0/2 DOWN.
> > [Dec 19 06:49:30]  Health check for server bk_8089/primary8089
> > succeeded, reason: Layer4 check passed, check duration: 0ms,
> > status:
> > 3/3 UP.
> > [Dec 19 06:49:31]  Health check for server
> > bk_5100_read/primary5100r
> > failed, reason: Layer7 wrong status, code: 400, info: "No Host",
> > check duration: 379ms, status: 0/2 DOWN.
> > [Dec 19 06:49:31]  Health check for backup server
> > bk_5100_read/backUp05100r failed, reason: Layer7 wrong status,
> > code:
> > 400, info: "No Host", check duration: 105ms, status: 0/2 DOWN.
> > [Dec 19 06:51:32]  Health check for server bk_8089/primary8089
> > succeeded, reason: Layer4 check passed, check duration: 0ms,
> > status:
> > 3/3 UP.
> > [Dec 19 06:51:32]  Health check for server
> > bk_8093_read/primary8093r
> > failed, reason: Layer7 wrong status, code: 400, info: "No Host",
> > check duration: 124ms, status: 0/2 DOWN.
> > [Dec 19 06:51:33]  Health check for backup server
> > bk_8093_read/backUp08093r failed, reason: Layer7 wrong status,
> > code:
> > 400, info: "No Host", check duration: 1ms, status: 0/2 DOWN.
> > [Dec 19 06:51:33]  Health check for backup server
> > bk_8093_read/backUp18093r failed, reason: Layer4 connection
> > problem,
> > info: "Connection refused", check duration: 63ms, status: 0/2 DOWN.
> > [Dec 19 06:51:33]  Health check for server
> > bk_8093_write/primary8093w
> > failed, reason: Layer7 invalid response, info: "<15><03><03>",
> > check
> > duration: 128ms, status: 0/2 DOWN.
> > [Dec 19 06:51:34]  Health check for server
> > bk_5100_read/primary5100r
> > failed, reason: Layer7 wrong status, code: 400, info: "No Host",
> > check duration: 269ms, status: 0/2 DOWN.
> > [Dec 19 06:51:34]  Health check for backup server
> > bk_5100_read/backUp05100r failed, reason: Layer7 wrong status,
> > code:
> > 400, info: "No Host", check duration: 20ms, status: 0/2 DOWN.
> > [haproxy@zld05596 etc]$
> > 
> > 
> > backend bk_8093_read
> > balancesource
> > 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\ 
> > server primary8093r :8093 check verify none
> > server backUp08093r :8093 check backup verify none
> > server backUp18093r :8093 check backup verify none
> > 
> > also wanted to find out if the same option httpchk will work for
> > https?
> > 
> > frontend http-5100
> > bind *:5100 ssl crt .pem
> > option httplog
> > capture request header Host len 24
> > acl is_get  method GET
> > use_backend bk_5100_read  if is_get
> > 
> > 
> > 
> > backend bk_5100_read
> > balancesource
> > http-response set-header X-Server %s
> > option log-health-checks
>

RE: Http HealthCheck Issue

2018-12-19 Thread UPPALAPATI, PRAVEEN
The pointed mistake was GET which I updated and tried. I'm not sure if there 
was something else pointed.

Thanks,
Praveen.

-Original Message-
From: Cyril Bonté [mailto:cyril.bo...@free.fr] 
Sent: Wednesday, December 19, 2018 9:28 AM
To: UPPALAPATI, PRAVEEN 
Cc: haproxy@formilux.org
Subject: Re: Http HealthCheck Issue

please, please, PLEASE ! Read the answers before telling again it's not working.
Several users already told you where you made a mistake.


- Mail original -
> De: "PRAVEEN UPPALAPATI" 
> À: "Jarno Huuskonen" 
> Cc: haproxy@formilux.org, "THANIGAIVEL SIVANANDHAM" 
> Envoyé: Mercredi 19 Décembre 2018 15:55:34
> Objet: RE: Http HealthCheck Issue
> 
> Hi Jarno,
> 
> Even after updating to GET it is still failing:
> 
> [Dec 19 06:12:41]  Health check for server bk_8093_read/primary8093r
> failed, reason: Layer7 timeout, check duration: 2001ms, status: 0/2
> DOWN.
> [Dec 19 06:12:44]  Health check for server bk_8093_read/primary8093r
> failed, reason: Layer7 wrong status, code: 400, info: "No Host",
> check duration: 769ms, status: 0/2 DOWN.
> [Dec 19 06:49:30]  Health check for server bk_8089/primary8089
> succeeded, reason: Layer4 check passed, check duration: 0ms, status:
> 3/3 UP.
> [Dec 19 06:49:31]  Health check for server bk_5100_read/primary5100r
> failed, reason: Layer7 wrong status, code: 400, info: "No Host",
> check duration: 379ms, status: 0/2 DOWN.
> [Dec 19 06:49:31]  Health check for backup server
> bk_5100_read/backUp05100r failed, reason: Layer7 wrong status, code:
> 400, info: "No Host", check duration: 105ms, status: 0/2 DOWN.
> [Dec 19 06:51:32]  Health check for server bk_8089/primary8089
> succeeded, reason: Layer4 check passed, check duration: 0ms, status:
> 3/3 UP.
> [Dec 19 06:51:32]  Health check for server bk_8093_read/primary8093r
> failed, reason: Layer7 wrong status, code: 400, info: "No Host",
> check duration: 124ms, status: 0/2 DOWN.
> [Dec 19 06:51:33]  Health check for backup server
> bk_8093_read/backUp08093r failed, reason: Layer7 wrong status, code:
> 400, info: "No Host", check duration: 1ms, status: 0/2 DOWN.
> [Dec 19 06:51:33]  Health check for backup server
> bk_8093_read/backUp18093r failed, reason: Layer4 connection problem,
> info: "Connection refused", check duration: 63ms, status: 0/2 DOWN.
> [Dec 19 06:51:33]  Health check for server bk_8093_write/primary8093w
> failed, reason: Layer7 invalid response, info: "<15><03><03>", check
> duration: 128ms, status: 0/2 DOWN.
> [Dec 19 06:51:34]  Health check for server bk_5100_read/primary5100r
> failed, reason: Layer7 wrong status, code: 400, info: "No Host",
> check duration: 269ms, status: 0/2 DOWN.
> [Dec 19 06:51:34]  Health check for backup server
> bk_5100_read/backUp05100r failed, reason: Layer7 wrong status, code:
> 400, info: "No Host", check duration: 20ms, status: 0/2 DOWN.
> [haproxy@zld05596 etc]$
> 
> 
> backend bk_8093_read
> balancesource
> 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\ 
> server primary8093r :8093 check verify none
> server backUp08093r :8093 check backup verify none
> server backUp18093r :8093 check backup verify none
> 
> also wanted to find out if the same option httpchk will work for
> https?
> 
> frontend http-5100
> bind *:5100 ssl crt .pem
> option httplog
> capture request header Host len 24
> acl is_get  method GET
> use_backend bk_5100_read  if is_get
> 
> 
> 
> backend bk_5100_read
> balancesource
> http-response set-header X-Server %s
> option log-health-checks
> option httpchk GET /v1/_ping HTTP/1.1\r\nAuthorization:\ Basic\
>     
> server primary5100r :5100 ssl check verify none
> server backUp05100r :5100 ssl check backup verify none
> 
> Thanks,
> Praveen.
> -Original Message-
> From: Jarno Huuskonen [mailto:jarno.huusko...@uef.fi]
> Sent: Wednesday, December 19, 2018 1:05 AM
> To: UPPALAPATI, PRAVEEN 
> Cc: haproxy@formilux.org; SIVANANDHAM, THANIGAIVEL 
> Subject: Re: Http HealthCheck Issue
> 
> Hi,
> 
> On Tue, Dec 18, UPPALAPATI, PRAVEEN wrote:
> > My backend config is:
> > 
> > backend bk_8093_read
> > balancesource
> > 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\nAut

Re: Http HealthCheck Issue

2018-12-19 Thread Cyril Bonté
please, please, PLEASE ! Read the answers before telling again it's not working.
Several users already told you where you made a mistake.


- Mail original -
> De: "PRAVEEN UPPALAPATI" 
> À: "Jarno Huuskonen" 
> Cc: haproxy@formilux.org, "THANIGAIVEL SIVANANDHAM" 
> Envoyé: Mercredi 19 Décembre 2018 15:55:34
> Objet: RE: Http HealthCheck Issue
> 
> Hi Jarno,
> 
> Even after updating to GET it is still failing:
> 
> [Dec 19 06:12:41]  Health check for server bk_8093_read/primary8093r
> failed, reason: Layer7 timeout, check duration: 2001ms, status: 0/2
> DOWN.
> [Dec 19 06:12:44]  Health check for server bk_8093_read/primary8093r
> failed, reason: Layer7 wrong status, code: 400, info: "No Host",
> check duration: 769ms, status: 0/2 DOWN.
> [Dec 19 06:49:30]  Health check for server bk_8089/primary8089
> succeeded, reason: Layer4 check passed, check duration: 0ms, status:
> 3/3 UP.
> [Dec 19 06:49:31]  Health check for server bk_5100_read/primary5100r
> failed, reason: Layer7 wrong status, code: 400, info: "No Host",
> check duration: 379ms, status: 0/2 DOWN.
> [Dec 19 06:49:31]  Health check for backup server
> bk_5100_read/backUp05100r failed, reason: Layer7 wrong status, code:
> 400, info: "No Host", check duration: 105ms, status: 0/2 DOWN.
> [Dec 19 06:51:32]  Health check for server bk_8089/primary8089
> succeeded, reason: Layer4 check passed, check duration: 0ms, status:
> 3/3 UP.
> [Dec 19 06:51:32]  Health check for server bk_8093_read/primary8093r
> failed, reason: Layer7 wrong status, code: 400, info: "No Host",
> check duration: 124ms, status: 0/2 DOWN.
> [Dec 19 06:51:33]  Health check for backup server
> bk_8093_read/backUp08093r failed, reason: Layer7 wrong status, code:
> 400, info: "No Host", check duration: 1ms, status: 0/2 DOWN.
> [Dec 19 06:51:33]  Health check for backup server
> bk_8093_read/backUp18093r failed, reason: Layer4 connection problem,
> info: "Connection refused", check duration: 63ms, status: 0/2 DOWN.
> [Dec 19 06:51:33]  Health check for server bk_8093_write/primary8093w
> failed, reason: Layer7 invalid response, info: "<15><03><03>", check
> duration: 128ms, status: 0/2 DOWN.
> [Dec 19 06:51:34]  Health check for server bk_5100_read/primary5100r
> failed, reason: Layer7 wrong status, code: 400, info: "No Host",
> check duration: 269ms, status: 0/2 DOWN.
> [Dec 19 06:51:34]  Health check for backup server
> bk_5100_read/backUp05100r failed, reason: Layer7 wrong status, code:
> 400, info: "No Host", check duration: 20ms, status: 0/2 DOWN.
> [haproxy@zld05596 etc]$
> 
> 
> backend bk_8093_read
> balancesource
> 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\ 
> server primary8093r :8093 check verify none
> server backUp08093r :8093 check backup verify none
> server backUp18093r :8093 check backup verify none
> 
> also wanted to find out if the same option httpchk will work for
> https?
> 
> frontend http-5100
> bind *:5100 ssl crt .pem
> option httplog
> capture request header Host len 24
> acl is_get  method GET
> use_backend bk_5100_read  if is_get
> 
> 
> 
> backend bk_5100_read
> balancesource
> http-response set-header X-Server %s
> option log-health-checks
> option httpchk GET /v1/_ping HTTP/1.1\r\nAuthorization:\ Basic\
>     
> server primary5100r :5100 ssl check verify none
> server backUp05100r :5100 ssl check backup verify none
> 
> Thanks,
> Praveen.
> -Original Message-
> From: Jarno Huuskonen [mailto:jarno.huusko...@uef.fi]
> Sent: Wednesday, December 19, 2018 1:05 AM
> To: UPPALAPATI, PRAVEEN 
> Cc: haproxy@formilux.org; SIVANANDHAM, THANIGAIVEL 
> Subject: Re: Http HealthCheck Issue
> 
> Hi,
> 
> On Tue, Dec 18, UPPALAPATI, PRAVEEN wrote:
> > My backend config is:
> > 
> > backend bk_8093_read
> > balancesource
> > 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\ 
> 
> Change get to GET, at least apache, ngingx and tomcat expect GET not
> get.
> Or test with for example netcat that your server1 accepts get.
> 
> Something like: nc server1.add.re.ss 8093
> get
> /nexus/v1/repository/rawcentral/com.att.swm.attpublic/healthcheck.txt
> HTTP/1.1
> H

RE: Http HealthCheck Issue

2018-12-19 Thread UPPALAPATI, PRAVEEN
Hi Jarno,

Even after updating to GET it is still failing:

[Dec 19 06:12:41]  Health check for server bk_8093_read/primary8093r failed, 
reason: Layer7 timeout, check duration: 2001ms, status: 0/2 DOWN.
[Dec 19 06:12:44]  Health check for server bk_8093_read/primary8093r failed, 
reason: Layer7 wrong status, code: 400, info: "No Host", check duration: 769ms, 
status: 0/2 DOWN.
[Dec 19 06:49:30]  Health check for server bk_8089/primary8089 succeeded, 
reason: Layer4 check passed, check duration: 0ms, status: 3/3 UP.
[Dec 19 06:49:31]  Health check for server bk_5100_read/primary5100r failed, 
reason: Layer7 wrong status, code: 400, info: "No Host", check duration: 379ms, 
status: 0/2 DOWN.
[Dec 19 06:49:31]  Health check for backup server bk_5100_read/backUp05100r 
failed, reason: Layer7 wrong status, code: 400, info: "No Host", check 
duration: 105ms, status: 0/2 DOWN.
[Dec 19 06:51:32]  Health check for server bk_8089/primary8089 succeeded, 
reason: Layer4 check passed, check duration: 0ms, status: 3/3 UP.
[Dec 19 06:51:32]  Health check for server bk_8093_read/primary8093r failed, 
reason: Layer7 wrong status, code: 400, info: "No Host", check duration: 124ms, 
status: 0/2 DOWN.
[Dec 19 06:51:33]  Health check for backup server bk_8093_read/backUp08093r 
failed, reason: Layer7 wrong status, code: 400, info: "No Host", check 
duration: 1ms, status: 0/2 DOWN.
[Dec 19 06:51:33]  Health check for backup server bk_8093_read/backUp18093r 
failed, reason: Layer4 connection problem, info: "Connection refused", check 
duration: 63ms, status: 0/2 DOWN.
[Dec 19 06:51:33]  Health check for server bk_8093_write/primary8093w failed, 
reason: Layer7 invalid response, info: "<15><03><03>", check duration: 128ms, 
status: 0/2 DOWN.
[Dec 19 06:51:34]  Health check for server bk_5100_read/primary5100r failed, 
reason: Layer7 wrong status, code: 400, info: "No Host", check duration: 269ms, 
status: 0/2 DOWN.
[Dec 19 06:51:34]  Health check for backup server bk_5100_read/backUp05100r 
failed, reason: Layer7 wrong status, code: 400, info: "No Host", check 
duration: 20ms, status: 0/2 DOWN.
[haproxy@zld05596 etc]$


backend bk_8093_read
balancesource
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\ 
server primary8093r :8093 check verify none
server backUp08093r :8093 check backup verify none 
server backUp18093r :8093 check backup verify none

also wanted to find out if the same option httpchk will work for https?

frontend http-5100
bind *:5100 ssl crt .pem
option httplog
capture request header Host len 24
acl is_get  method GET
use_backend bk_5100_read  if is_get



backend bk_5100_read
balancesource
http-response set-header X-Server %s
option log-health-checks
option httpchk GET /v1/_ping HTTP/1.1\r\nAuthorization:\ Basic\ 
server primary5100r :5100 ssl check verify none 
server backUp05100r :5100 ssl check backup verify none

Thanks,
Praveen.
-Original Message-
From: Jarno Huuskonen [mailto:jarno.huusko...@uef.fi] 
Sent: Wednesday, December 19, 2018 1:05 AM
To: UPPALAPATI, PRAVEEN 
Cc: haproxy@formilux.org; SIVANANDHAM, THANIGAIVEL 
Subject: Re: Http HealthCheck Issue

Hi,

On Tue, Dec 18, UPPALAPATI, PRAVEEN wrote:
> My backend config is:
> 
> backend bk_8093_read
> balancesource
> 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\ 

Change get to GET, at least apache, ngingx and tomcat expect GET not get.
Or test with for example netcat that your server1 accepts get.

Something like: nc server1.add.re.ss 8093
get /nexus/v1/repository/rawcentral/com.att.swm.attpublic/healthcheck.txt 
HTTP/1.1
Host: ...
Authorization: Basic ...

> server primary8093r :8093 check verify none
> server backUp08093r ::8093 check backup verify none
> server backUp18093r ::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.

Like Jonathan said "No Host" is telling you what's wrong.
(HTTP/1.1 requests expect Host: header).

-Jarno

-- 
Jarno Huuskonen



RE: Http HealthCheck Issue

2018-12-19 Thread UPPALAPATI, PRAVEEN
Sry missed this message you are correct changing get to GET worked . Thanks a 
lot for the quick response.

Thanks,
Praveen.

-Original Message-
From: Jarno Huuskonen [mailto:jarno.huusko...@uef.fi] 
Sent: Wednesday, December 19, 2018 1:05 AM
To: UPPALAPATI, PRAVEEN 
Cc: haproxy@formilux.org; SIVANANDHAM, THANIGAIVEL 
Subject: Re: Http HealthCheck Issue

Hi,

On Tue, Dec 18, UPPALAPATI, PRAVEEN wrote:
> My backend config is:
> 
> backend bk_8093_read
> balancesource
> 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\ 

Change get to GET, at least apache, ngingx and tomcat expect GET not get.
Or test with for example netcat that your server1 accepts get.

Something like: nc server1.add.re.ss 8093
get /nexus/v1/repository/rawcentral/com.att.swm.attpublic/healthcheck.txt 
HTTP/1.1
Host: ...
Authorization: Basic ...

> server primary8093r :8093 check verify none
> server backUp08093r ::8093 check backup verify none
> server backUp18093r ::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.

Like Jonathan said "No Host" is telling you what's wrong.
(HTTP/1.1 requests expect Host: header).

-Jarno

-- 
Jarno Huuskonen



RE: Http HealthCheck Issue

2018-12-19 Thread UPPALAPATI, PRAVEEN

Hi John,

Still not sure what the issue . When I issue a curl it returns 200  ok

curl -X GET 
http://:8093/nexus/repository/rawcentral/com.att.swm.attpublic/healthcheck.txt
 -H 'authorization: Basic '
Nexus is running.

Can you please point me to what I am passing wrong

Thanks,
Praveen.
From: Jonathan Matthews [mailto:cont...@jpluscplusm.com]
Sent: Tuesday, December 18, 2018 9:23 AM
To: UPPALAPATI, PRAVEEN 
Cc: Jarno Huuskonen ; SIVANANDHAM, THANIGAIVEL 
; haproxy@formilux.org
Subject: Re: Http HealthCheck Issue

On Tue, 18 Dec 2018 at 14:56, UPPALAPATI, PRAVEEN 
mailto:pu5...@att.com>> wrote:

wcentral/com.att.swm.attpublic/healthcheck.txt HTTP/1.1\r\nAuthorization:\ 
Basic\ 

[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

Hey there, Praveen.

This log line is literally telling you what your problem is!

I know different folks like the satisfaction of discovering their own 
solutions, so I'll ask before simply telling you the solution: do you need help 
in finding the error hidden in that log line, or can you manage to fix it?

All the best,
Jon
--
Jonathan Matthews
London, UK
http://www.jpluscplusm.com/contact.html<https://urldefense.proofpoint.com/v2/url?u=http-3A__www.jpluscplusm.com_contact.html=DwMFaQ=LFYZ-o9_HUMeMTSQicvjIg=V0kSKiLhQKpOQLIjj3-g9Q=r3cpa0nqxCXtJRL5f6VaB4wJIJpIwTLIwBB6Eh66AUw=Hb6fRKlMTFsoZrFziJs1B5Eq_kIiVKXXO8xvl_SjCLc=>


Re: Http HealthCheck Issue

2018-12-18 Thread Jarno Huuskonen
Hi,

On Tue, Dec 18, UPPALAPATI, PRAVEEN wrote:
> My backend config is:
> 
> backend bk_8093_read
> balancesource
> 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\ 

Change get to GET, at least apache, ngingx and tomcat expect GET not get.
Or test with for example netcat that your server1 accepts get.

Something like: nc server1.add.re.ss 8093
get /nexus/v1/repository/rawcentral/com.att.swm.attpublic/healthcheck.txt 
HTTP/1.1
Host: ...
Authorization: Basic ...

> server primary8093r :8093 check verify none
> server backUp08093r ::8093 check backup verify none
> server backUp18093r ::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.

Like Jonathan said "No Host" is telling you what's wrong.
(HTTP/1.1 requests expect Host: header).

-Jarno

-- 
Jarno Huuskonen



Re: Http HealthCheck Issue

2018-12-18 Thread Jonathan Matthews
On Tue, 18 Dec 2018 at 14:56, UPPALAPATI, PRAVEEN  wrote:

>
> wcentral/com.att.swm.attpublic/healthcheck.txt HTTP/1.1\r\nAuthorization:\
> Basic\ 
>
> [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


Hey there, Praveen.

This log line is literally telling you what your problem is!

I know different folks like the satisfaction of discovering their own
solutions, so I'll ask before simply telling you the solution: do you need
help in finding the error hidden in that log line, or can you manage to fix
it?

All the best,
Jon
-- 
Jonathan Matthews
London, UK
http://www.jpluscplusm.com/contact.html


RE: Http HealthCheck Issue

2018-12-18 Thread UPPALAPATI, PRAVEEN


Hi Jarno,

My backend config is:

backend bk_8093_read
balancesource
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\ 
server primary8093r :8093 check verify none
server backUp08093r ::8093 check backup verify none
server backUp18093r ::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:jarno.huusko...@uef.fi] 
Sent: Tuesday, December 18, 2018 1:11 AM
To: UPPALAPATI, PRAVEEN 
Cc: haproxy@formilux.org
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 
> 

Re: Http HealthCheck Issue

2018-12-17 Thread Jarno Huuskonen
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\ 

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



RE: Http HealthCheck Issue

2018-12-17 Thread UPPALAPATI, PRAVEEN
haproxy@zld05596 ~]$ cat //opt/app/haproxy/log/haproxy.log | grep v1
[haproxy@zld05596 ~]$

From: UPPALAPATI, PRAVEEN
Sent: Monday, December 17, 2018 8:53 AM
To: 'haproxy@formilux.org' 
Subject: Http HealthCheck Issue

HI HAProxy Team,

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\ 
[haproxy@zld05596 ~]$ cat //opt/app/haproxy/log/haproxy.log | grep /nexus/v1
[haproxy@zld05596 ~]$

Version used :

~]$ //opt/app/haproxy/sbin/haproxy -v
HA-Proxy version 1.8.12-8a200c7 2018/06/27
Copyright 2000-2018 Willy Tarreau wi...@haproxy.org<mailto:wi...@haproxy.org>

Any Help will be highly appreciated.

Thanks,
Praveen.




Re: Http HealthCheck Issue

2018-12-17 Thread Marco Corte

Il 2018-12-17 15:52 UPPALAPATI, PRAVEEN ha scritto:


option httpchk get
/nexus/v1/repository/rawcentral/com.att.swm.attpublic/healthcheck.txt
HTTP/1.1\r\nAuthorization:\ Basic\ 



Is maybe the lowercase get method not understood?
Did you try with GET?

.marcoc



Http HealthCheck Issue

2018-12-17 Thread UPPALAPATI, PRAVEEN
HI HAProxy Team,

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\ 
[haproxy@zld05596 ~]$ cat //opt/app/haproxy/log/haproxy.log | grep /nexus/v1
[haproxy@zld05596 ~]$

Version used :

~]$ //opt/app/haproxy/sbin/haproxy -v
HA-Proxy version 1.8.12-8a200c7 2018/06/27
Copyright 2000-2018 Willy Tarreau wi...@haproxy.org

Any Help will be highly appreciated.

Thanks,
Praveen.