Re: tcp-check not checking

2014-10-02 Thread Willy Tarreau
On Fri, Sep 19, 2014 at 09:04:08PM +0200, Dennis Jacobfeuerborn wrote:
 Hi,
 indeed after removing the option tcp-check line the checks now work as
 expected. Thanks for the pointer.

Hey guys, no, that's a bug. Look at what is written in the documentation
(which should always be the reference to know if something is expected or
not) :

  option tcp-check
  Perform health checks using tcp-check send/expect sequences
  ...
- no tcp-check directive : the health check only consists in a connection
  attempt, which remains the default mode.

So this doesn't match what you're observing and it's not acceptable. I could
reproduce it, I'm now checking the cause and trying to fix it. What I can tell
is that the servers are probed, but the result is ignored. I don't know why
yet.

Regards,
Willy




Re: tcp-check not checking

2014-10-02 Thread Willy Tarreau
On Thu, Oct 02, 2014 at 11:29:27AM +0200, Willy Tarreau wrote:
 On Fri, Sep 19, 2014 at 09:04:08PM +0200, Dennis Jacobfeuerborn wrote:
  Hi,
  indeed after removing the option tcp-check line the checks now work as
  expected. Thanks for the pointer.
 
 Hey guys, no, that's a bug. Look at what is written in the documentation
 (which should always be the reference to know if something is expected or
 not) :
 
   option tcp-check
   Perform health checks using tcp-check send/expect sequences
   ...
 - no tcp-check directive : the health check only consists in a 
 connection
   attempt, which remains the default mode.
 
 So this doesn't match what you're observing and it's not acceptable. I could
 reproduce it, I'm now checking the cause and trying to fix it. What I can tell
 is that the servers are probed, but the result is ignored. I don't know why
 yet.

OK so I fixed this. And it now correctly reports L4 OK in case of success and
not L7OK anymore.

Regards,
Willy




Re: tcp-check not checking

2014-09-19 Thread PiBa-NL

Hi Dennis,

option tcp-check  that requires more send/expect options to actually perform 
L7 checks.
For a simple L4 check remove the line completely or add :  tcp-check connect
You might also want to look at option httpchk. Which is more friendly for basic 
http checks.

Greets PiBa-NL

Dennis Jacobfeuerborn schreef op 19-9-2014 19:45:

Hi,
I just configured the load-balacing for systems that are yet to be
installed yet according to the tcp-check of haproxy these systems are
all available. This is the backend config I'm using right now:

backend back-api
 bind-process 1
 option tcp-check
 mode http
 balance roundrobin

 stick-table type ip size 100k expire 20m
 stick on src
 server web1 10.2.0.224:80 check
 server web2 10.2.0.254:80 check
 server web3 10.2.0.223:80 check
 server web4 10.2.0.253:80 check
 server web5 10.2.0.222:80 check
 server web6 10.2.0.252:80 check

When I look at the stats page all servers are marked active and LastChk
says Layer7 check passed: (tcp-check) even though none of the servers
are online yet.

Does anyone know the reason for this?

Regards,
   Dennis






Re: tcp-check not checking

2014-09-19 Thread Dennis Jacobfeuerborn
Hi,
indeed after removing the option tcp-check line the checks now work as
expected. Thanks for the pointer.

Regards,
  Dennis

On 19.09.2014 20:02, PiBa-NL wrote:
 Hi Dennis,
 
 option tcp-check  that requires more send/expect options to actually
 perform L7 checks.
 For a simple L4 check remove the line completely or add :  tcp-check
 connect
 You might also want to look at option httpchk. Which is more friendly
 for basic http checks.
 
 Greets PiBa-NL
 
 Dennis Jacobfeuerborn schreef op 19-9-2014 19:45:
 Hi,
 I just configured the load-balacing for systems that are yet to be
 installed yet according to the tcp-check of haproxy these systems are
 all available. This is the backend config I'm using right now:

 backend back-api
  bind-process 1
  option tcp-check
  mode http
  balance roundrobin

  stick-table type ip size 100k expire 20m
  stick on src
  server web1 10.2.0.224:80 check
  server web2 10.2.0.254:80 check
  server web3 10.2.0.223:80 check
  server web4 10.2.0.253:80 check
  server web5 10.2.0.222:80 check
  server web6 10.2.0.252:80 check

 When I look at the stats page all servers are marked active and LastChk
 says Layer7 check passed: (tcp-check) even though none of the servers
 are online yet.

 Does anyone know the reason for this?

 Regards,
Dennis