node-memcache icon indicating copy to clipboard operation
node-memcache copied to clipboard

connection timeout

Open sapkal-manish opened this issue 12 years ago • 1 comments

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

sapkal-manish avatar May 22 '13 07:05 sapkal-manish

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

sricc avatar Jun 20 '13 14:06 sricc