Skip to content

Can't write to slave #354

@tallesl

Description

@tallesl

I have a slave with slave-read-only set to no but when I attempt to do a SADD to it I got a No connection is available to service this operation.

at StackExchange.Redis.ConnectionMultiplexer.ExecuteSyncImpl[T](Message message, ResultProcessor`1 processor, ServerEndPoint server) in c:\TeamCity\buildAgent\work\3ae0647004edff78\StackExchange.Redis\StackExchange\Redis\ConnectionMultiplexer.cs:line 1857
at StackExchange.Redis.RedisBase.ExecuteSync[T](Message message, ResultProcessor`1 processor, ServerEndPoint server) in c:\TeamCity\buildAgent\work\3ae0647004edff78\StackExchange.Redis\StackExchange\Redis\RedisBase.cs:line 80
at StackExchange.Redis.RedisDatabase.SetAdd(RedisKey key, RedisValue[] values, CommandFlags flags) in c:\TeamCity\buildAgent\work\3ae0647004edff78\StackExchange.Redis\StackExchange\Redis\RedisDatabase.cs:line 921

When I issue SMEMBERS it works fine, I'm assuming it's a write problem.

Inspecting the variables while debugging, I noticed that the Server object has SlaveReadOnly set to false as expected, but there's AllowSlaveWrites also set to false. I don't know how those are set (or what exactly they affect), but I forcefully changed AllowSlaveWrites to true with no luck.

Setting abortConnect=false on configuration string didn't help either.

If I set the instance to master everything works fine.
It's reproducible in my development machine where the redis configuration is pretty much vanilla.
This is not an intermittent error, I get it as soon I start my application.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions