Hello Tim,

On Tue, Jun 21, 2011 at 08:55:11PM -0000, Tim Dunphy wrote:
> hello list.. for some reason I broke my config when I tried to move the web 
> servers out of the wrong group and into the right one..I was hoping I could 
> get your opinion on this.
> 
> ## haproxy version
> 
> [root@VIRTCENT01:~] #haproxy -v
> HA-Proxy version 1.3.25 2010/06/16
> Copyright 2000-2009 Willy Tarreau <w...@1wt.eu>

When you get config errors, do not hesitate to try with the latest
development snapshot. More and more corner cases are detected by
newer versions, warnings have been improved sometimes with hints
about what might be wrong. So basically you can keep a recent
version somewhere just as a config parser when you're in trouble.

> ## haproxy error
> 
> [root@VIRTCENT01:~] #service haproxy restart
> [ALERT] 171/142949 (13008) : Error(s) found in configuration file : 
> /etc/haproxy/haproxy.cfg
> [ALERT] 171/142949 (13008) : Fatal errors found in configuration.
> Errors in configuration file, check with haproxy check.

Indeed it's not much verbose :-(

> ## this haproxy.cfg doesn't work
> 
> frontend www 192.168.1.200:80
> log  global
> balance roundrobin
> stats enable
> cookie SERVERID insert indirect
> option httpchk HEAD /check.txt HTTP/1.0
> server web1 web1.summitnjhome.com:80 cookie A check maxconn 128
> server web2 web2.summitnjhome.com:80 cookie B check maxconn 128

You're having servers in the frontend section, this is not possible.
Servers can only be in a "listen" or "backend" section. It's the same
for the balance algo, the cookie and the checks. All this belongs to
a backend section. I'm sure this is the cause of your trouble.

> ## this haproxy.cfg does work but the web servers are in the wrong section
> 
> frontend www 192.168.1.200:80
> log  global
> default_backend app
> 
> 
> backend app
> log global
> balance roundrobin
> stats enable
> cookie SERVERID insert indirect
> option httpchk HEAD /check.txt HTTP/1.0
> server web1 web1.summitnjhome.com:80 cookie A check maxconn 128
> server web2 web2.summitnjhome.com:80 cookie B check maxconn 128

No, they're in the right one. Why do you think it's the wrong one ?

Also Tim, you posted a config with your user and password for the
stats page. Please double check on your side that this password is
not used anywhere else, as it's public now.

Regards,
Willy


Reply via email to