Error: ERR operation not permitted
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.
I won't be able to reply for a few hours. Find me online later on gchat.
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.
+1 on this issue. It is also due to auth for us.
+1 on this issue for me as well.
Open to pull requests.
+1 on this issue for me as well.