我正在使用couchdb项目中的以下haproxy.cfg:
global
maxconn 512
spread-checks 5
defaults
mode http
log global
monitor-uri /_haproxy_health_check
option log-health-checks
option httplog
balance roundrobin
option forwardfor
option redispatch
retries 4
option http-server-close
timeout client 150000
timeout server 3600000
timeout connect 500
stats enable
stats scope .
stats uri /_stats
frontend http-in
# This requires HAProxy 1.5.x
# bind *:$HAPROXY_PORT
bind *:5984
default_backend couchdbs
backend couchdbs
server couchdb1 127.0.0.1:15984 check inter 5s
server couchdb2 127.0.0.1:25984 check inter 5s
server couchdb3 127.0.0.1:35984 check inter 5s但是,我在haproxy.log文件中看到了以下内容:
[WARNING] 244/190008 (3040) : config : log format ignored for frontend
'http-in' since it has no log address.我的代理版本是:
# haproxy --version
HA-Proxy version 1.5.8 2014/10/31发布于 2016-01-08 00:18:21
这是因为配置文件要求使用“全局中指定的日志”(即log global语句),但是global部分不包含任何日志规范。
要解决此问题,请放置log 127.0.0.1 local0 (或您最喜欢的syslog服务器和工具),如这里所述
https://serverfault.com/questions/718648
复制相似问题