Skip to content

Redis Sentinel: Command cannot be issued to a slave: ROLE #2876

@dave-yotta

Description

@dave-yotta

Hey we've set up redis sentinel but connecting with stackexchange.redis getting a ROLE command sent to a slave inside GetSentinelMasterConnection.

I'm sure this is something we've messed up, it's been tricky to get set up - any chance of help? <3

ERROR Hangfire.Pro.Redis.RedisStorage [(null)] - Couldn't connect to Redis server(s) 'redis-sentinel-0.redis-sentinel-svc.gnigats.svc.cluster.local:26379,redis-sentinel-1.redis-sentinel-svc.gnigats.svc.cluster.local:26379,redis-sentinel-2.redis-sentinel-svc.gnigats.svc.cluster.local:26379', will reconnect in 00:00:30
StackExchange.Redis.RedisCommandException: Command cannot be issued to a slave: ROLE
   at StackExchange.Redis.ConnectionMultiplexer.TryPushMessageToBridge[T](Message message, ResultProcessor`1 processor, ResultBox`1 resultBox, ServerEndPoint& server) in C:\projects\stackexchange-redis\StackExchange.Redis\StackExchange\Redis\ConnectionMultiplexer.cs:line 1934
   at StackExchange.Redis.ConnectionMultiplexer.ExecuteSyncImpl[T](Message message, ResultProcessor`1 processor, ServerEndPoint server) in C:\projects\stackexchange-redis\StackExchange.Redis\StackExchange\Redis\ConnectionMultiplexer.cs:line 2196
   at StackExchange.Redis.RedisServer.Role(CommandFlags flags) in C:\projects\stackexchange-redis\StackExchange.Redis\StackExchange\Redis\RedisServer.cs:line 326
   at StackExchange.Redis.ConnectionMultiplexer.GetSentinelMasterConnection(ConfigurationOptions config, Action`1 log) in C:\projects\stackexchange-redis\StackExchange.Redis\StackExchange\Redis\ConnectionMultiplexer.Sentinel.cs:line 210
   at Hangfire.Pro.Redis.RedisStorage.CreateMultiplexer(EventWaitHandle reconnectEvent)
   at Hangfire.Pro.Redis.RedisStorage.ConnectLoop() in C:\projects\hangfire-pro-redis\src\Hangfire.Pro.Redis\RedisStorage.cs:line 508

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions