Currently I have deployed a node application to azure app service. My current app service plan has two core processor. And I have set nodeProcessCountPerApplication: 2 in iisnode.yml file. Now I have implemented socket.io functionality for real time update to the UI. With single process it works fine. When I use nodeProcessCountPerApplication: 2 problem starts. I am getting the following error-
{"code":1,"message":"Session ID unknown"}
I tried to solve this using socket.io-redis. Here is the code for using redis-
var io = require('socket.io')(server);
var redis = require('socket.io-redis');
io.adapter(redis({ host: 'localhost', port: 6379 }));
But getting the following error after the changes-
Error: Redis connection to localhost:6379 failed - connect EACCES 127.0.0.1:6379
at Object.exports._errnoException (util.js:1008:11)
at exports._exceptionWithHostPort (util.js:1031:20)
at TCPConnectWrap.afterConnect [as oncomplete] (net.js:1080:14)
What am I missing. Appreciate your time.