简体   繁体   中英

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

你需要先安装memcache服务器......

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM