|
|
楼主 |
发表于 2020-7-26 11:01:06
|
显示全部楼层
Jul 26 10:46:26 centos7 systemd[1]: Started HAProxy Load Balancer.
2 G" C, ?8 ?) d3 |Jul 26 10:46:26 centos7 systemd[1]: Starting HAProxy Load Balancer...
9 t0 |9 Z' l1 J! S7 fJul 26 10:46:26 centos7 haproxy-systemd-wrapper[2744]: haproxy-systemd-wrapper: executing /usr/sbin/haproxy ...-Ds. p* J/ G* g8 x7 A- E6 u5 F( f. E( [
Jul 26 10:46:26 centos7 haproxy-systemd-wrapper[2744]: [WARNING] 207/104626 (2745) : config : 'option forwar...de.
f* H0 f. c9 {8 H- s- y; wJul 26 10:46:26 centos7 haproxy-systemd-wrapper[2744]: [ALERT] 207/104626 (2745) : Starting proxy Stats: can...00]
# G7 d+ v+ X* ~; @Jul 26 10:46:26 centos7 haproxy-systemd-wrapper[2744]: [ALERT] 207/104626 (2745) : Starting proxy mariadb_cl...06]
% a- y9 p% V% I9 \4 }Jul 26 10:46:26 centos7 haproxy-systemd-wrapper[2744]: haproxy-systemd-wrapper: exit, haproxy RC=1# D$ Q: _0 D1 d1 F( w
Jul 26 10:46:26 centos7 systemd[1]: haproxy.service: main process exited, code=exited, status=1/FAILURE
0 x' o9 @+ ^2 QJul 26 10:46:26 centos7 systemd[1]: Unit haproxy.service entered failed state.
6 k7 ?6 Y7 d9 O {* |Jul 26 10:46:26 centos7 systemd[1]: haproxy.service failed.* |. o. M: U- }' L$ p$ T2 K8 x& U/ i
Hint: Some lines were ellipsized, use -l to show in full.
" ?0 o+ j4 o$ u& P; r- E" Q9 t- R
主要是修改内核参数进行限制:
( K: S: Y: A# D. k" J9 b, E5 P) v5 @8 `: }% f
在sysctl.conf文件中加入些参数:. {" X% h* r5 T7 e1 m/ @8 n, D
* R- @; G, [) }6 C
net.ipv4.ip_nonlocal_bind = 1
( `$ P( e4 C: {" u4 a) h, hnet.nf_conntrack_max=1048576% j7 j6 y! C. p: O" D4 g# s
net.ipv4.tcp_keepalive_intvl = 3
& |, Z" ?0 b7 y( m! h6 lnet.ipv4.tcp_keepalive_time = 60
4 q- i/ K; ?3 I# a1 X, Snet.ipv4.tcp_keepalive_probes = 8/ d+ N) Y5 m8 n/ g/ Z( H
' G5 k, c5 Q/ U" s$ D
\/ L6 Z8 c! @: g9 u8 Z
& S( Z6 F1 a6 _% y) T: T0 L8 S执行下
+ S! i/ L$ H* vsysctl -p
+ E* k# B' |0 f3 n) ?8 ]
! w) d. m9 V3 h& M& s9 d* q f0 @0 Y+ Z9 d& S% S, `
重启haproxy服务即可
' V+ Z; k7 |$ j, v' { |
|