我正在尝试连接到通过Nodejitsu设置的IrisCouch上的托管Redis。
我 认为 是server.js的相关部分:
var redisUrl = require('url').parse(config.REDIS_CONNECTION_URI); var client = require('redis').createClient(redisUrl.port, redisUrl.hostname);
我还没有在server.js中与客户端进行 任何 交互,这就是为什么我认为它抛出“不允许的操作”很奇怪,因为基本上我唯一要做的操作就是连接。我没有redis.conf文件,并且我相信我不需要该文件,因为我自己没有托管redis实例。
日志:
Express server listening on port 3000 /Users/soroushhakami/dev/projects/projectx/node_modules/redis/index.js:504 throw callback_err; ^ Error: Ready check failed: ERR operation not permitted at RedisClient.on_info_cmd (/Users/soroushhakami/dev/projects/projectx/node_modules/redis/index.js:317:35) at Command.RedisClient.ready_check.send_anyway [as callback] (/Users/soroushhakami/dev/projects/projectx/node_modules/redis/index.js:365:14) at RedisClient.return_error (/Users/soroushhakami/dev/projects/projectx/node_modules/redis/index.js:500:25) at ReplyParser.RedisClient.init_parser (/Users/soroushhakami/dev/projects/projectx/node_modules/redis/index.js:260:14) at ReplyParser.EventEmitter.emit (events.js:96:17) at ReplyParser.send_error (/Users/soroushhakami/dev/projects/projectx/node_modules/redis/lib/parser/javascript.js:293:10) at ReplyParser.execute (/Users/soroushhakami/dev/projects/projectx/node_modules/redis/lib/parser/javascript.js:176:22) at RedisClient.on_data (/Users/soroushhakami/dev/projects/projectx/node_modules/redis/index.js:476:27) at Socket.<anonymous> (/Users/soroushhakami/dev/projects/projectx/node_modules/redis/index.js:79:14) at Socket.EventEmitter.emit (events.js:96:17)
关于可能是什么问题的任何想法?
client.auth()创建客户端后,您需要直接致电:
client.auth()
var client = require('redis').createClient(redisUrl.port, redisUrl.hostname); client.auth(PASSWORD);
令人困惑的是,当你不叫.auth()上client ,但没有别的要么 ,你会得到一个失败的准备检查错误。
.auth()
client