Open Timmoth opened 1 month ago
This looks like Sentinel is not returning a valid endpoint (or one we recognize) when asked what the master is.
If you connect up directly and query sentinel master mymaster
, what do you get back?
@NickCraver We have identified something similar with this, see https://github.com/samcook/RedLock.net/issues/112#issuecomment-2187152737
It exists cases when sentinel returns IP addresses that isn't longer included in the cluster, the connection multiplexer will work correctly and abort them during initialization, but the IConnectionMultiplexer.GetEndPoints()
includes them and when executing the IConnectionMultiplexer.GetServer(endPoint)
for an endpoint that not received and answer the ArgumentException
is thrown.
Is the expectation that IConnectionMultiplexer.GetEndPoints()
should return all entries that sentinel knows about?
I'm running a three node redis:7.2-alpine cluster on kubernetes, 1 master, 2 replicas, 3 sentinels. My config is here
In dotnet I am using this code to connect:
Which works fine when running a redis cluster in docker compose, it has also worked on/off in the k8 cluster. When it doesn't work the endpoint summary looks correct. As far as i can tell from the logs it's connected to the sentinels and resolved the correct ip / port for each redis endpoint, the exception thrown is the only thing I can tell that seems out of place:
This suggests something might be wrong with my config? But the fact that it has worked on the cluster, and consistently works locally has me confused.
Does anyone have any ideas or would be able to provide me with some direction to trouble shoot?