That cleared up the error, thanks Ryan.

FYI I took that config straight out of the documentation - http://haproxy.1wt.eu/download/1.3/doc/architecture.txt

========================================
3.1. Alternate solution using Stunnel
=======================================

Is the documentation incorrect?

Craig


Ryan Schlesinger wrote:
Craig,

It looks like you're trying to specify the listen section's bind as its name. I think this is what you want:

listen www 64.164.194.16:80

(Any name will work in place of www).

Ryan

On 01/13/2010 08:09 PM, Craig Carl wrote:
All -
I have a simple config using stunnel. I am trying to load balance between 2 Apache servers, and place cookies for session mgmt. Stunnel should be handling :443 traffic and forwarding it to haproxy which should be accepting :80 traffic from stunnel and :80 from the public.

When I start haproxy I get this error -
############################################
 * Restarting haproxy haproxy
[ALERT] 012/195104 (11195) : parsing /etc/haproxy/haproxy.cfg : proxy '69.164.194.163:80' has no listen address. Please either specify a valid address on the <listen> line, or use the <bind> keyword.
[ALERT] 012/195104 (11195) : Errors found in configuration file,
[ALERT] 012/195104 (11195) : Error reading configuration file : /etc/haproxy/haproxy.cfg
...fail!
###########################################

Stunnel.conf is -
############################################
cert = /etc/ssl/certs/mycert.crt
key = /etc/ssl/certs/mykey.info.key
;setuid = nobody
;setgid = nogroup

pid = /etc/stunnel/stunnel.pid
debug = 3
output = /etc/stunnel/stunnel.log

socket=l:TCP_NODELAY=1
socket=r:TCP_NODELAY=1

[https]
accept=64.164.194.16:443
connect=64.164.194.16:80
TIMEOUTclose=0
xforwardedfor=yes
###########################################

haproxy.cfg is -
###########################################
        maxconn         10000 # Total Max Connections.
        ulimit-n        65536
        log             127.0.0.1       local0
        log             127.0.0.1       local1 notice
        daemon
        nbproc          4 # Number of processes
        user            haproxy
        group           haproxy
        daemon
defaults
        log             global
        option          httplog
        mode            http
        clitimeout      60000
        srvtimeout      30000
        contimeout      4000
        retries         3
        option          redispatch
        option          httpclose

listen 64.164.194.16:80
       mode http
       balance roundrobin
       option forwardfor except 64.164.194.16
       cookie SERVERID insert indirect nocache
       option httpchk HEAD /index.html HTTP/1.0
       server fe1-dal 192.168.146.169:80 cookie A check
       server fe2-dal 192.168.146.17:80 cookie B check
###########################################

Thanks for your help.

Craig




Reply via email to