Proxy warning for Dashboard "request and preserve host set forcing hostname to be dashboard"

61 views
Skip to first unread message

Domingos Gonçalves

unread,
May 7, 2019, 7:41:01 AM5/7/19
to OpenConext Community
Hi,

We have Dashboard working fine but on the logs we can see some warning messages from the Haproxy testing Dashboard.

That happens since the beginning we are using the Dashboard. We didn't try to solve the problem at first because it was working :)

But we would like to understand how can that be solved and see if you have an idea why it's happening.

The message is the following:


May  7 11:58:37 [server-name] Apache-dashboard: [Tue May 07 11:58:37.897713 2019] [proxy:warn] [pid 64582] [client [server-ip]:57
682] AH01092: no HTTP 0.9 request (with no host line) on incoming request and preserve host set forcing hostname to be dashboard.rctsaai.pt for uri /
health



The configuration at Haproxy:

#---------------------------------------------------------------------
# dashboard backend
#---------------------------------------------------------------------
#
backend dashboard_be
  option httpchk GET
/health HTTP/1.0
  option forwardfor
# This sets X-Forwarded-For
  rspdel
^Strict-Transport-Security:.* #Remove hsts header from backend applications
  mode http
  balance roundrobin
  option httpclose


  cookie HTTPSERVERID insert nocache indirect httponly secure maxidle
3600


  server java01
server01:620 cookie java01 check inter 8000 fall 5 rise 2 maxconn 1024


Virtualhost configuration in attach file dashboard.conf

The service is working fine but the with those annoying message on the logs all the time

Any suggestion?

Best regards

Domingos
dashboard.conf

Tim van Dijen

unread,
May 7, 2019, 7:54:33 AM5/7/19
to OpenConext Community
Hi Domingos,

What happens if you replace:
option httpchk GET /health HTTP/1.0

with:
option httpchk GET /health "HTTP/1.0\r\nHost: dashboard.rctsaai.pt"

I think because you don't specify the host in the request, the request never ends up in the virtual host but on the Apache test-page..

- Tim

Op dinsdag 7 mei 2019 13:41:01 UTC+2 schreef Domingos Gonçalves:

Domingos Gonçalves

unread,
May 7, 2019, 8:12:13 AM5/7/19
to OpenConext Community
Replacing the config we get a code 400 and Haproxy don't validate the service as available.


May  7 13:10:23 server01 Apache-dashboard: 193.137.196.33 - - [07/May/2019:13:10:23 +0100] "GET /health \"HTTP/1.0" 400 226 "-" "-" "-"


Tim van Dijen

unread,
May 7, 2019, 8:20:08 AM5/7/19
to OpenConext Community
What's that backslash doing there after /health?

Op dinsdag 7 mei 2019 14:12:13 UTC+2 schreef Domingos Gonçalves:

Domingos Gonçalves

unread,
May 7, 2019, 12:18:46 PM5/7/19
to OpenConext Community
I don't know.

The config I applied was the following. Is it correct?

The config for Dashboard don't fallow the same pattern then the other applications to test the services with /health ?

#---------------------------------------------------------------------
# dashboard backend
#---------------------------------------------------------------------
#

  backend dashboard_be
  option httpchk GET
/health "HTTP/1.0\r\nHost: dashboard.rctsaai.pt"

  option forwardfor
# This sets X-Forwarded-For

  rspdel
^Strict-Transport-Security:.* #Remove hsts header from backend applications
  mode http
  balance roundrobin
  option httpclose

  cookie HTTPSERVERID insert nocache indirect httponly secure maxidle
3600


  server java
...


Message at log file

May  7 17:17:02 japp01 Apache-dashboard: 193.137.196.33 - - [07/May/2019:17:17:02 +0100] "GET /health \"HTTP/1.0" 400 226 "-" "-" "-"


Bart Geesink

unread,
May 9, 2019, 6:54:51 AM5/9/19
to openc...@googlegroups.com, Domingos Gonçalves
Hi Domingos,

On 5/7/19 6:18 PM, Domingos Gonçalves wrote:
> I don't know.
>
> The config I applied was the following. Is it correct?
>
> The config for Dashboard don't fallow the same pattern then the other applications to test the
> services with */health ?*
>
> |
> #---------------------------------------------------------------------
> # dashboard backend
> #---------------------------------------------------------------------
> #
>   backend dashboard_be
>   option httpchk GET /health "HTTP/1.0\r\nHost: dashboard.rctsaai.pt"
>   option forwardfor # This sets X-Forwarded-For
>
>   rspdel ^Strict-Transport-Security:.*#Remove hsts header from backend applications
>   mode http
>   balance roundrobin
>   option httpclose
>
>   cookie HTTPSERVERID insert nocache indirect httponly secure maxidle 3600
>
>   server java ...
>
> |
>
> Message at log file
>
> |
> May 717:17:02japp01 Apache-dashboard:193.137.196.33--[07/May/2019:17:17:02+0100]"GET /health
> \"HTTP/1.0"400226"-""-""-"
> |
>
The formatting is a bit different in haproxy 1.5. You would need to put this line in your haproxy
config:

option httpchk GET /health HTTP/1.0\r\nHost:\ dashboard.rctsaai.pt

you could try to upgrade to Haproxy 1.7 as well, where the quotes do work.
FYI, we have just added the hostnames in the Haproxy health check in the Haproxy OpenConext-deploy
role, where Haproxy 1.7 is installed now as well.


Regards,

Bart


>
>
>
>
> terça-feira, 7 de Maio de 2019 às 13:20:08 UTC+1, Tim van Dijen escreveu:
>
> What's that backslash doing there after /health?
>
> Op dinsdag 7 mei 2019 14:12:13 UTC+2 schreef Domingos Gonçalves:
>
> Replacing the config we get a code 400 and Haproxy don't validate the service as available.
>
> |
>
> May 713:10:23/server01/Apache-dashboard:193.137.196.33--[07/May/2019:13:10:23+0100]"GET
> /health \"HTTP/1.0"400226"-""-""-"
>
> |
>
>
> terça-feira, 7 de Maio de 2019 às 12:54:33 UTC+1, Tim van Dijen escreveu:
>
> Hi Domingos,
>
> What happens if you replace:
> option httpchk GET /health HTTP/1.0
>
> with:
> option httpchk GET /health "HTTP/1.0\r\nHost: dashboard.rctsaai.pt
> <http://dashboard.rctsaai.pt>"
>
> I think because you don't specify the host in the request, the request never ends up in
> the virtual host but on the Apache test-page..
>
> - Tim
>
> Op dinsdag 7 mei 2019 13:41:01 UTC+2 schreef Domingos Gonçalves:
>
> Hi,
>
> We have Dashboard working fine but on the logs we can see some warning messages from
> the Haproxy testing Dashboard.
>
> That happens since the beginning we are using the Dashboard. We didn't try to solve
> the problem at first because it was working :)
>
> But we would like to understand how can that be solved and see if you have an idea
> why it's happening.
>
> The message is the following:
>
> |
>
> May 711:58:37[/server-name/]Apache-dashboard:[TueMay0711:58:37.8977132019][proxy:warn][pid
> 64582][client [/server-ip/]:57
> 682]AH01092:noHTTP 0.9request (withnohost line)on incoming request andpreserve host
> setforcing hostname to be dashboard.rctsaai.pt foruri /health
>
> |
>
>
> The configuration at Haproxy:
>
> |
> #---------------------------------------------------------------------
> # dashboard backend
> #---------------------------------------------------------------------
> #
> backend dashboard_be
>   option httpchk GET /health HTTP/1.0
>   option forwardfor # This sets X-Forwarded-For
>   rspdel ^Strict-Transport-Security:.*#Remove hsts header from backend applications
>   mode http
>   balance roundrobin
>   option httpclose
>
>
>   cookie HTTPSERVERID insert nocache indirect httponly secure maxidle 3600
>
>
>   server java01 /server01/:620cookie java01 check inter 8000fall 5rise 2maxconn 1024
> |
>
>
> Virtualhost configuration in attach file *dashboard.conf*
>
> The service is working fine but the with those annoying message on the logs all the time
>
> Any suggestion?
>
> Best regards
>
> Domingos
>
> --
> OpenConext - Open For Collaboration
> ---
> You received this message because you are subscribed to the Google Groups "OpenConext Community" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to
> openconext+...@googlegroups.com <mailto:openconext+...@googlegroups.com>.
> To post to this group, send email to openc...@googlegroups.com <mailto:openc...@googlegroups.com>.
> Visit this group at https://groups.google.com/group/openconext.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/openconext/70a9b5a6-60db-4b2a-9e41-0e70b9386716%40googlegroups.com
> <https://groups.google.com/d/msgid/openconext/70a9b5a6-60db-4b2a-9e41-0e70b9386716%40googlegroups.com?utm_medium=email&utm_source=footer>.
> For more options, visit https://groups.google.com/d/optout.

Domingos Gonçalves

unread,
May 10, 2019, 10:34:46 AM5/10/19
to OpenConext Community
Hi,

It's working fine now with that new line config. The annoying warning messages on the logs is solved.

For now we still have the version 1.5.18

Soon I will test the new version of Haproxy. I notice you config as a self repo (https://build.surfconext.nl/yum/) for the Haproxy version > 1.7

Thanks
Reply all
Reply to author
Forward
0 new messages