Manuel Di Iorio
Manuel Di Iorio

Reputation: 3761

ECONNREFUSED error with memcache

Trying to play with memcache, Node raises ECONNREFUSED error connecting with the client, I have already tried changing with another ports with the same result and I have also restarted the computer, firewall and antivirus deactived. What could be the problem ?

memcache = require("memcache");
client = new memcache.Client(11211, '127.0.0.1');

client.on('connect', function() { 
    console.log("memcache connectd"); //this will not be called
});

client.on('close', function() {
    console.log("memcache closed"); //this is called!
});

client.on('timeout', function() {
    console.log("memcache timeout");
});

client.on('error', function(e) {
    if (e) console.log(e);
});

client.connect();

*Same problem with ALL! memcached, mysql, couchdb, everything raises this error! D:

.

The console output:

$ node app.js
{ [Error: connect ECONNREFUSED]
    code: 'ECONNREFUSED',
    errno: 'ECONNREFUSED',
    syscall: 'connect' }
memcache closed

Upvotes: 2

Views: 3096

Answers (1)

CFrei
CFrei

Reputation: 3627

you need to install the memcache server first...

Upvotes: 4

Related Questions