I'm running redis (4.0.9) inside docker with stunnel to connect to the outside docker.

slave-announce-ip helped to map the ports for slaves, but seems that the master doesn't use this and there isn't any setting to set the mapping for master. It seems that slaves will get the port (and write it to their slaveof setting) that master is actually used (e.g. 6379).

This presented a problem. There is a way to work around this though, so in the end it didn't matter too much, but it meant that slave-announce-ip wouldn't help at all, in my case at least.

Summary: so, because I could only map slaves, not the master, I couldn't use the mapping at all.

Suggestion: would it be better to have a setting announce-ip, which would apply to master and slaves, rather than slave-announce-ip, which applies only to slaves?

Comment From: gray19950103

you can specify master's announce ip by edit the sentinel.conf as: sentinel monitor mymaster <host ip you'd like to announce for master> <port you'd like to announce for master> <quorum>