title: Redis connection to 127.0.0.1:6379 failed - connect ECONNREFUSED In laravel
body: <p>when I run node serve.js, getting following error</p>
  
  <pre><code>   throw er; // Unhandled 'error' event
     ^
  
   Error: Redis connection to 127.0.0.1:6379 failed - connect ENFILE 127.0.0.1:6379 - Local (undefined:undefined)
  at Object.exports._errnoException (util.js:1018:11)
  at exports._exceptionWithHostPort (util.js:1041:20)
  at connect (net.js:880:16)
  at net.js:969:9
  at _combinedTickCallback (internal/process/next_tick.js:73:7)
  at process._tickCallback (internal/process/next_tick.js:104:9)
  </code></pre>
  
  <p>Server.js file</p>
  
  <pre><code>  var app = require('express')();
    var server = require('http').Server(app);
    var io = require('socket.io')(server);
    var redis = require('redis');
  
    server.listen(8890);
    io.on('connection', function (socket) {
  
     console.log("client connected");
     var redisClient = redis.createClient();
     redisClient.subscribe('message');
  
     redisClient.on("message", function(channel, data) {
     console.log("mew message add in queue "+ data['message'] + " channel");
     socket.emit(channel, data);
   });
  
    socket.on('disconnect', function() {
    redisClient.quit();
   });
  
   });
  </code></pre>
  
  <p>How can I fix above error.I have install node,npm,predis and socet.io</p>