简体   繁体   中英

No connection is available to service this operation - Redis with StackExchange.Redis

I am trying to access Redis(hosted on docker container) in a window service written in C#.net, I am using StackExchange.Redis SDK to access Redis, Whenever I try to access Redis, I am getting following error

StackExchange.Redis.RedisConnectionException: No connection is available to service this operation: FLUSHDB; UnableToConnect (None, last-recv: 23) on 10.0.5.122:57457/Interactive, Flushed/ReadAsync, last: ECHO, origin: ResetNonConnected, outstanding: 0, last-read: 5s ago, last-write: 5s ago, keep-alive: 60s, state: ConnectedEstablishing, mgr: 10 of 10 available, last-heartbeat: never, global: 5s ago, v: 2.0.601.3402; IOCP: (Busy=0,Free=1000,Min=2,Max=1000), WORKER: (Busy=0,Free=32767,Min=2,Max=32767), Local-CPU: n/a ---> StackExchange.Redis.RedisConnectionException: UnableToConnect (None, last-recv: 23) on 10.0.5.122:57457/Interactive, Flushed/ReadAsync, last: ECHO, origin: ResetNonConnected, outstanding: 0, last-read: 5s ago, last-write: 5s ago, keep-alive: 60s, state: ConnectedEstablishing, mgr: 10 of 10 available, last-heartbeat: never, global: 5s ago, v: 2.0.601.3402\r\n --- End of inner exception stack trace ---\r\n

I am using latest version of StackExchange.Redis, I also tried by downgrading version as suggested in couple of articles but no luck, I am also setting AbortOnConnectFail as false. Redis server is up and working fine, I can do telnet and also can see all keys through a tool(Redis React)

Strange things is that, same code is working fine when using in a website with same Redis server.

Please guide. Thanks

For some reason System.Numerics.Vectors.dll was not present in output folder, I copied this manually and it started working

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM