- 注册时间
- 2010-5-31
- 最后登录
- 2012-5-22
- 在线时间
- 12 小时
- 阅读权限
- 50
- 积分
- 563
- 帖子
- 10
- 主题
- 1
- 精华
- 0
- UID
- 9408

 - 注册时间
- 2010-5-31
- 最后登录
- 2012-5-22
- 在线时间
- 12 小时
- 阅读权限
- 50
- 积分
- 563
- 帖子
- 10
- 主题
- 1
- 精华
- 0
- UID
- 9408
|
发表于 2010-7-29 17:08:22
|显示全部楼层
我的haproxy负载均衡mysql
在启动时报:
[ALERT] 209/050247 (2826) : parsing haproxy.cfg : proxy 'admin_stats' has no dispatch address and is not in transparent or balance mode.
[ALERT] 209/050247 (2826) : Errors found in configuration file, aborting.
[ALERT] 209/050247 (2826) : Error reading configuration file : haproxy.cfg
以下是我的haproxy.cfg文件配置:
global
maxconn 4096
daemon
pidfile /usr/local/haproxy/run/haproxy.pid
#debug
#quiet
user haproxy
group haproxy
defaults
log global
mode http
option httplog
option dontlognull
log 127.0.0.1 local0
retries 3
option redispatch
maxconn 2000
contimeout 5000
clitimeout 50000
srvtimeout 50000
listen admin_stats 192.168.18.120:80
mode http
stats uri /dbs
stats realm Global\ statistics
stats auth test:123456
listen proxy-mysql 0.0.0.0:23306
mode tcp
stats enable
balance roundrobin
# option httpchk OPTIONS * HTTP/1.1\r\nHost:\ www
server db01 192.168.18.117:3306 weight 1 check port 6033 inter 1s rise 2 fall
2
server db02 192.168.18.110:3306 weight 1 check port 6033 inter 1s rise 2 fall
2
option tcpka |
|