Describe the bug

Sentinel failover does not happen when node went down. Log display

Failed to resolve hostname 'redis1'

when I execute

docker stop redis1

To reproduce

env detail: deploy redis with sentinel in High Availiability mode(cluster size =3)

docker image redis:6.2.8 docker network create -d bridge mybridge

redis1.conf

port 6379
bind 0.0.0.0
protected-mode no
replica-announce-ip "redis1"

redis2.conf

port 6379
bind 0.0.0.0
protected-mode no
replica-announce-ip "redis1"
replicaof redis1 6379

redis3.conf

port 6379
bind 0.0.0.0
protected-mode no
replica-announce-ip "redis1"
replicaof redis1 6379

sentinel1.conf

bind 0.0.0.0
protected-mode no
port 26379
sentinel announce-hostnames yes
sentinel resolve-hostnames yes
sentinel monitor mymaster redis1 6379 2
sentinel down-after-milliseconds mymaster 3000
sentinel failover-timeout mymaster 60000
sentinel announce-ip "sentinel1"

sentinel2.conf

bind 0.0.0.0
protected-mode no
port 26379
sentinel announce-hostnames yes
sentinel resolve-hostnames yes
sentinel monitor mymaster redis1 6379 2
sentinel down-after-milliseconds mymaster 3000
sentinel failover-timeout mymaster 60000
sentinel announce-ip "sentinel2"

sentinel3.conf

bind 0.0.0.0
protected-mode no
port 26379
sentinel announce-hostnames yes
sentinel resolve-hostnames yes
sentinel monitor mymaster redis1 6379 2
sentinel down-after-milliseconds mymaster 3000
sentinel failover-timeout mymaster 60000
sentinel announce-ip "sentinel3"

When I execute 'docker stop redis', the Docker will remove the host name mapping, but this situation can be understood as the node being unhealthy and causing a failover

Expected behavior

failover should start within configure time and slave nodes should be able to serve the request.

Additional information

1)when node went down failover is not happening and always getting resolve hostname error.

Comment From: zhaozhiguang

Something was described incorrectly redis2.conf

port 6379
bind 0.0.0.0
protected-mode no
replica-announce-ip "redis2"
replicaof redis1 6379

redis3.conf

port 6379
bind 0.0.0.0
protected-mode no
replica-announce-ip "redis3"
replicaof redis1 6379