Closed idl0r closed 3 years ago
What version of the lib are you using?
Also, have you tried different policies? Right now you're setting REQUIRE
:
// REQUIRE connection to send PROXY header, reject if not present
// Note: even though the first read on the connection returns an error if
// a PROXY header is not present, subsequent reads do not. It is the task
// of the code using the connection to handle that case properly.
0.3.2. We tried without REQUIRE at first.
Can you share more about this QUIT message? I can't find references to this in the spec.
I have no idea to be honest. That's just what I found by googling for similar issues.
Can you please try with v0.4.0 and let me know? It addresses #60 (HAProxy) but maybe addresses your use-case as well.
It still fails. Are you able to reproduce it the way I described above?
Haven't tried, yet, I'm sorry. Maybe during the weekend.
I haven't checked yet, sorry. Lots of other things taking priority. Anyways, I did a bit more research and it all comes back to this. Whatever this QUIT
message is, it's an invalid HTTP request and/or PROXY header so HTTP 400 sounds about right.
I'm still leaving this open for others' reference and maybe I'll find time to reproduce and investigate.
I'm not sure where it comes from and if that really is the problem. I couldn't find it within the Varnish sources so far. So I might be wrong.
I just tested it again with Varnish 6.5.1 and 6.4.0 and it seems to work now. As of 0.4.1 it works. It's probably related to 70665b5dc439d3894d793050feec5331c4ea608f
Sweet! Can we close then?
Yup. Thanks!
Hi,
we use go-proxyproto for some stub backends for testing purpose and it fails when we tell Varnish to use v2 while v1 works. The connection between Varnish and HAProxy works fine so I suspect something's wrong within go-proxyproto. Here's anything required for a testcase:
Varnish 6.4.0 (or later): example.vcl:
Now varnishlog should report:
Now change .proxy_header from 1 to 2 in example.vcl:
And re-run the above testcase. varnishlog will now log:
So the probe fails. Looking into a tcpdump what it does is to send a QUIT via PROXYv2 before doing the probe request and I suspected that's the reason for the 400.
This might be related: https://github.com/kubernetes/kubernetes/issues/57250#issuecomment-475081213