I have set up redis sentinel mode on a remote server through docker, which includes one master node and two slave nodes.
The remote sentinel configuration is as follows:
port 26379
daemonize no
pidfile "/var/run/redis-sentinel.pid"
logfile "/usr/local/redis/logs/sentinel-26379.log"
dir "/data"
sentinel monitor mymaster 172.10.0.3 6379 2
sentinel auth-pass mymaster xxxxxxxx
The local engineering configuration is as follows:
redis:
sentinel:
master: mymaster
nodes: {remoteip}:26379,{remoteip}:26380,{remoteip}:26381
password: xxxxxxxx
lettuce:
pool:
enabled: true
max-active: 20
max-idle: 5
max-wait: 1000ms
min-idle: 1
But running the local springboot project reported an error:connection timed out: /172.10.0.3:6379
Obviously, the local attempt to connect is the intranet address of the main node of the remote server. I think it should be to connect to remoteip, but I don't know how to configure it
how to configure it