redis-node icon indicating copy to clipboard operation
redis-node copied to clipboard

Error: ERR operation not permitted

Open Thibaut opened this issue 14 years ago • 6 comments

Hi

I have problem when using redis-node with RedisToGo. The following error is throwned once a connection has been idling for a few minutes: (probably = RedisToGo's timeout config)

vendor/redis-node/lib/client.js:590
    if (err) throw err;
             ^
Error: ERR operation not permitted

at Client.handleReply (vendor/redis-node/lib/client.js:287:25)
at Client.<anonymous> (native)
at Client.emit (events:31:17)
at Client.handleData (vendor/redis-node/lib/client.js:249:18)
at Stream.<anonymous> (native)
at Stream.emit (events:31:17)
at IOWatcher.callback (net:490:16)
at node.js:773:9

It's probably due to a timeout error, however, I couldn't find a way to catch it and reconnect.

I was expecting redis-node to reconnect automatically and try again, but that's not happening with this error. Even a listener on "connection error" does not catch the error, and the callback of whichever command failed is never called (the error happens indenpdently of the command sent).

I don't have this problem with my local installation of Redis but other clients (namely, redis-rb) are working fine with RedisToGo, even after a timeout.

Thanks for the help, and this lib.

Thibaut avatar Feb 21 '11 18:02 Thibaut

I won't be able to reply for a few hours. Find me online later on gchat.

bnoguchi avatar Feb 21 '11 20:02 bnoguchi

I've nailed the cause: it has to do with authentication. My redis server (RedisToGo) is password-protected and when I create a client I also do a "client.auth(password)", however, the auth command is not sent again on a reconnect. Surprisingly, I don't get this error when using subscribeTo, even though a reconnect does happen following each timeout.

Thibaut avatar Feb 22 '11 08:02 Thibaut

+1 on this issue. It is also due to auth for us.

ghost avatar Jun 07 '11 17:06 ghost

+1 on this issue for me as well.

Blue-Dog-Archolite avatar Dec 04 '12 20:12 Blue-Dog-Archolite

Open to pull requests.

bnoguchi avatar Dec 04 '12 23:12 bnoguchi

+1 on this issue for me as well.

Ashish-IB avatar Dec 15 '15 12:12 Ashish-IB