connection timeout
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
Ensure that your security groups are setup accordingly, if not then you will get that error.