I am trying to connect to my redis server that password protected but for some reason I keep getting the error:
events.js:141 throw er; // Unhandled 'error' event ^ ReplyError: Ready check failed: NOAUTH Authentication required. at parseError (/home/ubuntu/TekIT/ITapp/node_modules/redis-parser/lib/parser.js:193:12) at parseType (/home/ubuntu/TekIT/ITapp/node_modules/redis-parser/lib/parser.js:303:14)
I know the password is correct because i tried it in the redis-cli and it works fine. Here is the code below:
var redis = require('redis');
var client = redis.createClient(redisPort, redisHostname, { auth_pass: 'password1' });
var redisSubscriber = redis.createClient(redisPort, redisHostname, { auth_pass: 'password1' });
// Create and use a Socket.IO Redis store
var RedisStore = require('socket.io-redis');
io.set('store', new RedisStore({
redisPub: client,
redisSub: redisSubscriber,
redisClient: client
}));
Does anyone know why I am getting this error?
via Shawn Varughese
No comments:
Post a Comment