{"action":"created","issue":{"url":"https://api.github.com/repos/luin/ioredis/issues/626","repository_url":"https://api.github.com/repos/luin/ioredis","labels_url":"https://api.github.com/repos/luin/ioredis/issues/626/labels{/name}","comments_url":"https://api.github.com/repos/luin/ioredis/issues/626/comments","events_url":"https://api.github.com/repos/luin/ioredis/issues/626/events","html_url":"https://github.com/luin/ioredis/issues/626","id":321495386,"number":626,"title":"Unhandled rejection ReplyError: CROSSSLOT Keys in request don't hash to the same slot ","user":{"login":"anuradhag","id":4667339,"avatar_url":"https://avatars3.githubusercontent.com/u/4667339?v=4","gravatar_id":"","url":"https://api.github.com/users/anuradhag","html_url":"https://github.com/anuradhag","followers_url":"https://api.github.com/users/anuradhag/followers","following_url":"https://api.github.com/users/anuradhag/following{/other_user}","gists_url":"https://api.github.com/users/anuradhag/gists{/gist_id}","starred_url":"https://api.github.com/users/anuradhag/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/anuradhag/subscriptions","organizations_url":"https://api.github.com/users/anuradhag/orgs","repos_url":"https://api.github.com/users/anuradhag/repos","events_url":"https://api.github.com/users/anuradhag/events{/privacy}","received_events_url":"https://api.github.com/users/anuradhag/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2018-05-09T09:24:58Z","updated_at":"2018-05-09T09:27:54Z","closed_at":null,"author_association":"NONE","body":"Hello there,\r\n\r\nI am using ioredis to enable redis cluster usage to set and purge keys. On purging keys, I get the above error. The purge happens anyway. When I use the redis instance in expressjs middleware I get this error otherwise I dont.\r\n\r\nI am using 4.10.x as the express version.\r\n\r\n```\r\nvar express = require('express');\r\nvar expressSession = require(\"express-session\");\r\nvar sessionStorage = require('connect-redis')(expressSession);\r\nvar redis = require('ioredis');\r\nvar config = require('./config');var app = express();\r\n\r\nvar client = new redis.Cluster([{\r\n\thost: config.session.host,\r\n\tport: config.session.port,\r\n\tpassword: config.session.pass,\r\n\tttl: config.session.ttl\r\n}]);\r\n\r\napp.use(expressSession({\r\n  unset: \"destroy\",\r\n  saveUninitialized: false,\r\n  resave: false,\r\n  secret: config.session.secret,\r\n  store: new sessionStorage({\r\n\t\tclient: client,\r\n\t\tttl: config.session.ttl,\r\n    prefix: '{sess}.'\r\n  }),\r\n  key: \"authorization.sid\",\r\n  cookie: {maxAge: config.session.maxAge}\r\n}))\r\n\r\napp.use(bodyParser.urlencoded({extended: true}));\r\napp.use(bodyParser.json());\r\n\r\napp.post('/login', function(req, res) {\r\n\tif(req.user) {\r\n\t\treturn res.redirect('/home');\r\n\t}\r\n\r\n\tif (req.body.username === 'Anu' && req.body.password === 'Password') {\r\n\t\treq.logIn({name: 'Anu'}, function(err) {\r\n\t\t\treturn res.redirect('/home');\r\n\t\t})\r\n\t} else {\r\n\t\treturn res.send(400);\r\n\t}\r\n})\r\n\r\napp.get('/logout', function(req, res) {\r\n\treq.logout();\r\n})\r\n\r\nvar port = process.env.PORT || '3000';\r\napp.listen(port);\r\n```\r\n\r\nNote: I get this error only when I use it in the express middleware and not when using the io-redis package seperately.\r\n\r\nActually everything works fine except for express logging this unhandled error."},"comment":{"url":"https://api.github.com/repos/luin/ioredis/issues/comments/387680031","html_url":"https://github.com/luin/ioredis/issues/626#issuecomment-387680031","issue_url":"https://api.github.com/repos/luin/ioredis/issues/626","id":387680031,"user":{"login":"anuradhag","id":4667339,"avatar_url":"https://avatars3.githubusercontent.com/u/4667339?v=4","gravatar_id":"","url":"https://api.github.com/users/anuradhag","html_url":"https://github.com/anuradhag","followers_url":"https://api.github.com/users/anuradhag/followers","following_url":"https://api.github.com/users/anuradhag/following{/other_user}","gists_url":"https://api.github.com/users/anuradhag/gists{/gist_id}","starred_url":"https://api.github.com/users/anuradhag/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/anuradhag/subscriptions","organizations_url":"https://api.github.com/users/anuradhag/orgs","repos_url":"https://api.github.com/users/anuradhag/repos","events_url":"https://api.github.com/users/anuradhag/events{/privacy}","received_events_url":"https://api.github.com/users/anuradhag/received_events","type":"User","site_admin":false},"created_at":"2018-05-09T09:27:54Z","updated_at":"2018-05-09T09:27:54Z","author_association":"NONE","body":"Having raised this issue with them too https://github.com/expressjs/express/issues/3646"}}
{"actor":{"display_login":"anuradhag"}}