@v0idqq wrote:
Hello everyone, I’m migrating haproxy from version 1.6.9 to version 2.0.4 on rhel 7.6.
In the configuration for haproxy 1.6.9 I’m using nbproc > 1 and peers, by trying to use the same configuration on version 2.0.4 I’ve errors because of the syntax change for peers and for the use of nbproc > 1.
Here the configuration that I’m trying to run:peers http_rate server hap1 127.0.0.1:1023 table t1 type ip size 10k expire 300s store gpc0_rate(30s) global maxconn 400000 log 127.0.0.1 local2 alert daemon ca-base /etc/ssl/self/ crt-base /etc/ssl/self/ tune.ssl.default-dh-param 2048 stats socket /etc/haproxy/haproxysock1 mode 0777 level admin process 1 stats socket /etc/haproxy/haproxysock2 mode 0777 level admin process 2 stats socket /etc/haproxy/haproxysock3 mode 0777 level admin process 3 stats socket /etc/haproxy/haproxysock4 mode 0777 level admin process 4 stats socket /etc/haproxy/haproxysock5 mode 0777 level admin process 5 stats socket /etc/haproxy/haproxysock6 mode 0777 level admin process 6 stats socket /etc/haproxy/haproxysock7 mode 0777 level admin process 7 stats socket /etc/haproxy/haproxysock8 mode 0777 level admin process 8 stats socket /etc/haproxy/haproxysock9 mode 0777 level admin process 9 stats socket /etc/haproxy/haproxysock10 mode 0777 level admin process 10 stats socket /etc/haproxy/haproxysock11 mode 0777 level admin process 11 stats socket /etc/haproxy/haproxysock12 mode 0777 level admin process 12 stats socket /etc/haproxy/haproxysock13 mode 0777 level admin process 13 stats socket /etc/haproxy/haproxysock14 mode 0777 level admin process 14 nbproc 14 cpu-map 1 1 cpu-map 2 2 cpu-map 3 3 cpu-map 4 4 cpu-map 5 5 cpu-map 6 6 cpu-map 7 7 cpu-map 8 8 cpu-map 9 9 cpu-map 10 10 cpu-map 11 11 cpu-map 12 12 cpu-map 13 13 cpu-map 14 14 defaults mode http timeout connect 300s timeout client 300s timeout server 300s log 127.0.0.1 local2 debug option httplog option forwardfor option http-server-close log-format %{+Q}o\ %{-Q}Ci\ -\ -\ [%t]\ %r\ %st\ %B\ ""\ ""\ %Cp\ %ms\ %ft\ %b\ %s\ %Tq\ %Tw\ %Tc\ %Tr\ %Tt\ %tsc\ %ac\ %fc\ %bc\ %sc\ %rc\ %sq\ %bq\ %cc\ %cs\ %hrl\ %hsl errorfile 503 /data/www/html/503.http errorfile 502 /data/www/html/503.http listen stats bind :1936 mode http stats enable stats hide-version stats realm Haproxy\ Statistics stats uri / stats auth datahuboper:$ciHub0per frontend http-in bind :80 bind :443 ssl crt selfsig.pem ciphers RC4-SHA:AES128-SHA:AES:!ADH:!aNULL:!DH:!EDH:!eNULL option splice-response acl missing_slash path_reg ^/test$ redirect code 301 prefix / drop-query append-slash if missing_slash reqrep ^([^:\ ]+\ +)/(/.+)$ \1\2 if { path_beg // } acl r_test path_beg /test/ use_backend bk_test_l1 if r_test backend bk_test_l1 bind-process 1-4 server preops_socket unix@/tmp/f_test_l1 send-proxy-v2 frontend bk_test_l2 bind-process 1-4 bind unix@/tmp/f_test_l1 accept-proxy default_backend bk_test backend bk_test balance roundrobin bind-process 1-4 timeout connect 15s timeout queue 3600s timeout server 3600s retries 15 timeout check 2m stick-table type ip size 10k expire 300s store gpc0_rate(30s) peers http_rate stick on src http-request track-sc0 src http-request deny deny_status 429 if { sc0_gpc0_rate gt 5 } http-response sc-inc-gpc0(0) if { status 401 } server node-1 127.0.0.1:8081 maxconn 350 check inter 1m fall 2 rise 2 server node-2 127.0.0.1:8082 maxconn 350 check inter 1m fall 2 rise 2
the errors are
root@myvm:/etc/haproxy# /usr/sbin/haproxy -c -f /etc/haproxy/test.cfg -L http_rate [WARNING] 227/172843 (21650) : parsing [/etc/haproxy/test.cfg:55]: 'log-format' overrides previous 'option httplog' in 'defaults' section. [WARNING] 227/172843 (21650) : parsing [/etc/haproxy/test.cfg:77] : The 'reqrep' directive is deprecated in favor of 'http-request replace-uri' and 'http-request replace-header' and will be removed in next version. [WARNING] 227/172843 (21650) : parsing [/etc/haproxy/test.cfg:77] : a 'reqrep' rule placed after a 'redirect' rule will still be processed before. [WARNING] 227/172843 (21650) : parsing [/etc/haproxy/test.cfg:55] : deprecated variable 'Ci' in 'log-format', please replace it with 'ci'. [WARNING] 227/172843 (21650) : parsing [/etc/haproxy/test.cfg:55] : deprecated variable 'st' in 'log-format', please replace it with 'ST'. [WARNING] 227/172843 (21650) : parsing [/etc/haproxy/test.cfg:55] : deprecated variable 'Cp' in 'log-format', please replace it with 'cp'. [WARNING] 227/172843 (21650) : parsing [/etc/haproxy/test.cfg:55] : deprecated variable 'cc' in 'log-format', please replace it with 'CC'. [WARNING] 227/172843 (21650) : parsing [/etc/haproxy/test.cfg:55] : deprecated variable 'cs' in 'log-format', please replace it with 'CS'. [WARNING] 227/172843 (21650) : parsing [/etc/haproxy/test.cfg:55] : deprecated variable 'Ci' in 'log-format', please replace it with 'ci'. [WARNING] 227/172843 (21650) : parsing [/etc/haproxy/test.cfg:55] : deprecated variable 'st' in 'log-format', please replace it with 'ST'. [WARNING] 227/172843 (21650) : parsing [/etc/haproxy/test.cfg:55] : deprecated variable 'Cp' in 'log-format', please replace it with 'cp'. [WARNING] 227/172843 (21650) : parsing [/etc/haproxy/test.cfg:55] : deprecated variable 'cc' in 'log-format', please replace it with 'CC'. [WARNING] 227/172843 (21650) : parsing [/etc/haproxy/test.cfg:55] : deprecated variable 'cs' in 'log-format', please replace it with 'CS'. [WARNING] 227/172843 (21650) : parsing [/etc/haproxy/test.cfg:55] : deprecated variable 'Ci' in 'log-format', please replace it with 'ci'. [WARNING] 227/172843 (21650) : parsing [/etc/haproxy/test.cfg:55] : deprecated variable 'st' in 'log-format', please replace it with 'ST'. [WARNING] 227/172843 (21650) : parsing [/etc/haproxy/test.cfg:55] : deprecated variable 'Cp' in 'log-format', please replace it with 'cp'. [WARNING] 227/172843 (21650) : parsing [/etc/haproxy/test.cfg:55] : deprecated variable 'cc' in 'log-format', please replace it with 'CC'. [WARNING] 227/172843 (21650) : parsing [/etc/haproxy/test.cfg:55] : deprecated variable 'cs' in 'log-format', please replace it with 'CS'. [WARNING] 227/172843 (21650) : Proxy 'stats': in multi-process mode, stats will be limited to process assigned to the current request. [WARNING] 227/172843 (21650) : Proxy 'bk_test': sticking rules will not work correctly in multi-process mode. [ALERT] 227/172843 (21650) : Peers section 'http_rate': peers referenced by sections running in different processes (4 different ones). Check global.nbproc and all tables' bind-process settings. [ALERT] 227/172843 (21650) : Fatal errors found in configuration.
except the warnings I cannot understand why I get this error.
Do anyone using nbproc > 1 and peers that can help me to resolve this issue?I’m trying to understand if I’m missing something from the new documentation about peers and stick-tables.
Thanks
Posts: 1
Participants: 1