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
<vhost_for_the_server>/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   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
  0     0    0     0    0     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/[email protected]/msg32110.html

Best regards
Aleks

> -----Original Message-----
> From: Jonathan Matthews [mailto:[email protected]] 
> Sent: Wednesday, December 19, 2018 1:32 PM
> To: UPPALAPATI, PRAVEEN <[email protected]>
> Cc: Cyril Bonté <[email protected]>; [email protected]
> Subject: Re: Http HealthCheck Issue
> 
> On Wed, 19 Dec 2018 at 19:23, UPPALAPATI, PRAVEEN <[email protected]> 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.
> 


Reply via email to