- 积分
- 16843
在线时间 小时
最后登录1970-1-1
|

楼主 |
发表于 2020-7-26 11:01:06
|
显示全部楼层
Jul 26 10:46:26 centos7 systemd[1]: Started HAProxy Load Balancer.$ S% }" L# W, U
Jul 26 10:46:26 centos7 systemd[1]: Starting HAProxy Load Balancer...
* e+ F" b0 d' A. K5 f. L9 R q3 Q* {Jul 26 10:46:26 centos7 haproxy-systemd-wrapper[2744]: haproxy-systemd-wrapper: executing /usr/sbin/haproxy ...-Ds
8 K: }3 N/ t9 R* y" UJul 26 10:46:26 centos7 haproxy-systemd-wrapper[2744]: [WARNING] 207/104626 (2745) : config : 'option forwar...de.! P* ~, E6 d8 Q6 t; H& P
Jul 26 10:46:26 centos7 haproxy-systemd-wrapper[2744]: [ALERT] 207/104626 (2745) : Starting proxy Stats: can...00]) e6 g7 l6 o$ N' S# c) _9 b
Jul 26 10:46:26 centos7 haproxy-systemd-wrapper[2744]: [ALERT] 207/104626 (2745) : Starting proxy mariadb_cl...06]+ A* M& P3 i' C3 Q
Jul 26 10:46:26 centos7 haproxy-systemd-wrapper[2744]: haproxy-systemd-wrapper: exit, haproxy RC=1
( G- {" u: d6 U3 S5 _& L0 O j4 E: mJul 26 10:46:26 centos7 systemd[1]: haproxy.service: main process exited, code=exited, status=1/FAILURE
% K6 I! t8 h9 R2 w @Jul 26 10:46:26 centos7 systemd[1]: Unit haproxy.service entered failed state.
% |7 n5 W2 Y: n1 V* j* l3 ]Jul 26 10:46:26 centos7 systemd[1]: haproxy.service failed.. w8 M2 d( s$ T6 v& V9 a) e0 ?
Hint: Some lines were ellipsized, use -l to show in full.$ D9 [: y! D0 y- N7 y8 i" a
/ @3 ^2 {3 I, m2 c主要是修改内核参数进行限制:, T, a8 y) D2 D4 b& O4 Z3 Y& R6 V
/ X7 t: {6 g0 a8 R* P# T' B8 w* j
在sysctl.conf文件中加入些参数:
" e- W% v/ Y6 n" B; n1 U7 x" y& m) v. W
net.ipv4.ip_nonlocal_bind = 1" o( U9 {" |! J" l" B& o) \
net.nf_conntrack_max=1048576
; T# Q1 j) ?) w8 r Q' a& fnet.ipv4.tcp_keepalive_intvl = 3+ s8 c( s; g4 r
net.ipv4.tcp_keepalive_time = 608 z" L( q: c1 R) A3 O
net.ipv4.tcp_keepalive_probes = 8
; V ^8 Q4 m# N
# v, ^( w; ]# @9 {6 c( g& `. P- Z7 k, I" j, e' H/ P4 h! S
* b% O+ ^$ i( x: I9 R. ~7 V
执行下
) z& x+ b3 P3 y6 H9 i6 J7 d/ hsysctl -p
6 V% T1 U, T+ u; a0 I5 ~2 o7 c) k. ?' Y9 a1 l! a( e! D
3 {6 Z5 @% v9 l0 R
重启haproxy服务即可
' t& o) f. g" [8 Z, o5 f# V( B7 i8 [ |
|