socket.io redis ECONNREFUSED
my host has allowed ports 8000 to 8010
var RedisStore = require("socket.io/lib/stores/redis")
, redis = require("socket.io/node_modules/redis")
, pub = redis.createClient(8002)
, sub = redis.createClient(8002)
, client = redis.createClient(8002);
, server = https.createServer(options,app);
, io = require('socket.io').listen(server);
io.set('store',new
RedisStore({redisPub:pub,redisSub:sub,redisClient:client}));
if(cluster.isMaster){for(var i=0;i<numCPUs;i++){cluster.fork();}}
else{
io.sockets.on('connection',function(socket){/*do stuff*/});
server.listen(8002);
}
I'm having real trouble understanding if I can't connect to redis because
of the port or wether the redis supplied with socket.io is turned on...
events.js:72
throw er; // Unhandled 'error' event
^
Error: Redis connection to 127.0.0.1:8002 failed - connect ECONNREFUSED
at RedisClient.on_error
(/home/engine/public_html/node_modules/socket.io/node_modules/redis/index.js:149:24)
at Socket.<anonymous>
(/home/engine/public_html/node_modules/socket.io/node_modules/redis/index.js:83:14)
at Socket.EventEmitter.emit (events.js:95:17)
at net.js:426:14
at process._tickCallback (node.js:415:13)
[root@vps ~]# info - socket.io started
Friday, August 16, 2013
Subscribe to:
Post Comments (Atom)
0 comments:
Post a Comment