strange behaviour : request always sent to the same server, not stats (byte in/out) reported on servers

From: Thomas Manson <dev.mansonthomas#gmail.com>
Date: Thu, 26 Nov 2009 23:40:51 +0100


Hi,

  I'm trying to setup a loadbalancing configuration between two server running lighttpd.
  A third server is running haproxy. (HAProxy version 1.3.15.2, released 2008/06/21)

  test.domain.com is pointing on a Virtual IP adress that points to the third server.

  a fourth server, configured as the third is here as a backup (with a manual change of the VIP)

on test.domain.com lighttpd servers I have a php script that display the IP adress of the server (which works correctly)

here is my complete configuration file of the third server :



global
  log 127.0.0.1 local0
  log 127.0.0.1 local1 notice
#log loghost local0 info

  maxconn 4096
#chroot /usr/share/haproxy

  user haproxy
  group haproxy
  daemon
#debug
#quiet

defaults
  log global
  mode http
  option httplog
  option dontlognull
  retries 3
  option redispatch
  maxconn 2000
  contimeout 5000
  clitimeout 50000
  srvtimeout 50000

listen ns1-rewrite 0.0.0.0:80
  stats enable
  stats auth thomas:pwd
  cookie SERVERID rewrite
  balance roundrobin
  server lighttpd_1 88.191.102.47:80 cookie app1inst1 check inter 2000 rise 2 fall 5
  server lighttpd_2 88.191.88.42:80 cookie app1inst2 check inter 2000 rise 2 fall 5

#errorloc 502 http://192.168.114.58/error502.html
#errorfile 503 /etc/haproxy/errors/503.http

  errorfile 400 /etc/haproxy/errors/400.http
  errorfile 403 /etc/haproxy/errors/403.http
  errorfile 408 /etc/haproxy/errors/408.http
  errorfile 500 /etc/haproxy/errors/500.http
  errorfile 502 /etc/haproxy/errors/502.http
  errorfile 503 /etc/haproxy/errors/503.http
  errorfile 504 /etc/haproxy/errors/504.http
*************************************************



when I reach the statistic page, it reports my two servers UP. If I stop lighttpd_1 or lighttd_2, it's correctly reported.

When I point my browser on a test.domain.com, it allways redirect to the first server (88.191.102.47:80), but no traffic is reported on stat. And more strangely, if I comment the first server, restart haproxy : on the stat page, the server disappear
if I make a try, I should arrive on the second server, and, no I still arrive on the first server.

If I stop the first server, even if the second server is still displayed as up, when I make a test with a browser, I get a server unavailable...

I really don't understand what's going on...

anybody can help me sort this ?

Thanks,
Thomas. Received on 2009/11/26 23:40

This archive was generated by hypermail 2.2.0 : 2009/11/26 23:45 CET