配置文件
global
maxconn 20000
ulimit-n 80012
log 127.0.0.1 local0
nbproc 1
daemon
defaults
timeout server 5000
timeout client 5000
timeout connect 5000
#haproxy管理页面
frontend stats
bind *:9061
mode http
stats refresh 5s
stats uri /stats
#tcp代理
listen dataproxy
bind *:5002
mode tcp
server m1 172.16.0.51:50020
server m2 10.0.5.37:50021
启动失败。。。
haproxy.service - HAProxy Load Balancer
Loaded: loaded (/usr/lib/systemd/system/haproxy.service; disabled; vendor preset: disabled)
Active: failed (Result: exit-code) since 二 2017-05-16 10:08:35 CST; 1s ago
Process: 31656 ExecStart=/usr/sbin/haproxy-systemd-wrapper -f /etc/haproxy/haproxy.cfg -p /run/haproxy.pid $OPTIONS (code=exited, status=1/FAILURE)
Main PID: 31656 (code=exited, status=1/FAILURE)
5月 16 10:08:35 localhost.localdomain systemd[1]: Started HAProxy Load Balancer.
5月 16 10:08:35 localhost.localdomain systemd[1]: Starting HAProxy Load Balancer...
5月 16 10:08:35 localhost.localdomain haproxy-systemd-wrapper[31656]: haproxy-systemd-wrapper: executing /usr/sbin/haproxy -f /etc/haproxy/haproxy.cfg -p /run/haproxy.pid -Ds
5月 16 10:08:35 localhost.localdomain haproxy-systemd-wrapper[31656]: [ALERT] 135/100835 (31659) : Starting frontend stats: cannot bind socket [0.0.0.0:9061]
5月 16 10:08:35 localhost.localdomain haproxy-systemd-wrapper[31656]: [ALERT] 135/100835 (31659) : Starting proxy dataproxy: cannot bind socket [0.0.0.0:5002]
5月 16 10:08:35 localhost.localdomain haproxy-systemd-wrapper[31656]: haproxy-systemd-wrapper: exit, haproxy RC=1
5月 16 10:08:35 localhost.localdomain systemd[1]: haproxy.service: main process exited, code=exited, status=1/FAILURE
5月 16 10:08:35 localhost.localdomain systemd[1]: Unit haproxy.service entered failed state.
5月 16 10:08:35 localhost.localdomain systemd[1]: haproxy.service failed.
centos 7.3 haproxy 是1.5.18 的版本,搜了半天没找到解决方法阿。。。 修改内核参数: /etc/sysctl.conf也该了 还是不行