First of all, English is not my native language, so my words may be a bit strange.
Please forgive me.
I am configuring haproxy and redis.
status :
haproxy A , redis master : B slave : C
A telnet to B,C is Ok
netstat a <-> b,c is OK.
By the way !!
Apr 12 04:23:20 HOSTNAME haproxy[24487]: Server bk_redis_slave/R1 is DOWN, reason: Layer7 timeout, info: " at step 1 of tcp-check (connect)", check duration: 1001ms. 1 active and 0 backup servers left. 0 sessions active, 0 requeued, 0 remaining in queue.
Apr 12 04:23:21 HOSTNAME haproxy[24487]: Server bk_redis_slave/R2 is DOWN, reason: Layer7 timeout, info: " at step 1 of tcp-check (connect)", check duration: 1001ms. 0 active and 0 backup servers left. 0 sessions active, 0 requeued, 0 remaining in queue.
Apr 12 04:23:21 ctablehaprx01 haproxy[24487]: backend bk_redis_slave has no server available!
These logs are displayed, so it is not possible to check whether they are alive or not.
configuration is as follows
Please advise what could be the cause.
#########################################################################################################
global
log /dev/log local0
log /dev/log local1 notice
daemon
maxconn 1000000
defaults REDIS
mode tcp
timeout connect 4s
timeout server 15s
timeout client 15s
timeout tunnel 24d
log global
frontend ft_redis_master
bind *:5000 name redis
default_backend bk_redis_master
backend bk_redis_master
option tcp-check
tcp-check send AUTH\ ‘test()!!password’\r\n
tcp-check expect string +OK
tcp-check send PING\r\n
tcp-check expect string +PONG
tcp-check send info\ replication\r\n
tcp-check expect string role:master
tcp-check expect string repl_backlog_active:1
tcp-check send QUIT\r\n
tcp-check expect string +OK
Redis Master And Redis Slave List
server R1 10.10.10.11:6379 check inter 1s
server R2 10.10.10.12:6379 check inter 1s
frontend ft_redis_slave
bind *:5001 name redis
default_backend bk_redis_slave
backend bk_redis_slave
balance roundrobin
option tcp-check
tcp-check send AUTH\ ‘test()!!password’\r\n
tcp-check expect string +OK
tcp-check send PING\r\n
tcp-check expect string +PONG
tcp-check send info\ replication\r\n
tcp-check expect string role:slave
tcp-check send QUIT\r\n
tcp-check expect string +OK
tcp-check send QUIT\r\n
tcp-check expect string +OK
Redis Master And Redis Slave List
server R1 10.10.10.11:6379 check inter 1s
server R2 10.10.10.12:6379 check inter 1s
#listen 은 haproxy 의 모니터링
#Listen on all IP’s on port 9001
listen stats
bind 1.0.0.0:9001
mode http
balance
timeout client 5000
timeout connect 4000
timeout server 30000
#This is the virtual URL to access the stats page
stats uri /stats
#Authentication realm. This can be set to anything. Escape space characters with a backslash.
stats realm HAProxy\ Statistics
#The user/pass you want to use. Change this password!
#WebUI userId / password
stats auth ntri:‘1Mxpo(3A)WvB2X3’
#This allows you to take down and bring up back end servers.
#This will produce an error on older versions of HAProxy.
stats admin if TRUE
#########################################################################################################
1 post - 1 participant