elbart / node-memcache

node.js memcached client
285 stars 64 forks source link

connection timeout #34

Open sapkal-manish opened 11 years ago

sapkal-manish commented 11 years ago

I have created on ElastiCache on amazon. Now I am trying to connect it using node-memcache. I have written following code on my code hosted on local PC.

var memcache = require('memcache');

var mClient = new memcache.Client('11211', host); //again i assiged it mClient.host = host; //endpoint provided by amazone ElastiCache mClient.port = 11211;

mClient.on('connect', function () { console.log("mClient on connect"); });

mClient.on('close', function () { console.log("mClient on close"); });

mClient.on('timeout', function () { console.log("mClient on timeout"); // no arguments - socket timed out });

mClient.on('error', function (e) { console.log("mClient on error : " + e); });

// connect to the memcache server after subscribing to some or all of these events mClient.connect()

But it give me Error "TIMEOUT"

So, I could not understand what is the problem made by me?

Can you guide me?

Thanks

sricc commented 11 years ago

Ensure that your security groups are setup accordingly, if not then you will get that error.