Using Membase Memcached Server on Amazon EC2 instance
Hi, I'm new to Memcached in general and looking for some help getting started. So far I have:
- started a new Amazon EC2 instance running Windows Server 2008
- open ports 8080, 11211 and 11212 (all HTTP) on the instance
- installed the Membase Memcached Server on that instance
- verified that the server is up and running (test server works and all)
- secured the server with a username and password
I then started a new test app locally using Enyim client V2.0b, but I can't seem to instantiate a new MembaseClient because 'none of the pool urls are working'.
Could you tell me what's wrong with my App.config here?
Many thanks,
Hi Perry,
The instance is not accessible from any of those ports, and we have set the security group such that all those ports are open. We've also tried hitting it from another instance within the same security group so they should be able to communicate with each other on those ports and that didn't work either.
The test server works locally, and everything works locally too.
And yes, the "none of the pool urls are working" error is coming from the Enyim client.
Cheers,
Thanks for testing that out. Can you check and see if the windows firewall is installed and active? If it is, please try disabling it (at least temporarily) to see if that resolves this. Then we can go back an open up specific ports/processes.
Thanks!
Perry
Thanks Perry, that did the trick! :-D
Hi Perry,
Sorry to trouble you again, we were able to get Enyim library's memcache client working but not the NorthScale client. We've tried fiddling around with the configuration but it doesn't look like a problem with the configuration as we aren't able to instantiate the NorthScale client if the bucket name, credentials or url is wrong.
For the same Get and Set calls, the MemCache client works perfectly, but the NorthScale client always returns false on Set calls and returns the default value on Get calls..
Do you know what we're possibly doing wrong here?
Thanks,
Can you private message me your exact configuration? Also, can you paste or send me the output of http://:8080/diag where is the IP/hostname of your NorthScale memcached server?
Thanks!
Oh, and it's no trouble at all, this is what I'm here for!
Thanks for that, yes the configuration looks good from what I can tell.
Are you trying to set objects that have been serialized? Can you try a quick test with just a very basic key and value using the northscale client? Also, Enyim just released a new version of his client to fix a few bugs, could you download that and retry?
Thanks!
Yan, I think I've found the problem here.
When you use the NorthScale client, it is trying to get the server IP list dynamically by using the interface provided through this port: http://:8080/pools/default
As I'm sure you are aware, Amazon instances have two IP addresses, one internal and one external. The problem here is that the above interface is returning the internal IP addresses and then your client is trying to access them (which fails, because they are internal to EC2). Does this make sense?
I'm going to look into this on our side for a possible solution, but the workaround for you will be to run your client code within AWS so that it has access to these IP addresses.
Hope that helps, let me know if you need anything else.
Perry
Hi Perry,
I've been working on this with TheBurningMonk - we've got NorthScale working with internal IPs as you suggested, however, after bundling the instance and launching a new instance using the image, the Northscale server doesn't work on the new instance. That is I can't load the web console, even from within the instance. The NorthScaleServer service is running.
Reinstalling Northscale resolves the issue, but obviously we want to be able to scale dynamically without intervention. Is there some configuration that needs to be carried out for the Northscale service to work on a newly launched instance, which will obviously have a newly allocated IP, different from the one on the original instance?
Hey Jon, not sure how I missed this post but I apologize.
You won't be able to bundle and relaunch and already installed instance directly because it will be trying to start up on the IP address of the old system. Your best bet is to delete the config.dat file before launching the NorthScale service on the new instance (or better yet, remove the config.dat before bundling the instance). It will be recreated when the service restarts and you should be good to go...though you'll have to manually join it back to the cluster (which you could do through a REST call to our API via a simple 'curl' command inside of a script within the instance).
Perry
Hi there, a few things to test. Can you make sure that you can telnet from your local machine (where the app is running) to the instance on ports 8008, 11211 and 11212? If not, you'll need to edit your security group settings to allow that traffic.
Also, change the userName and password fields to "default" and retest.
Lastly, is that "none of the pool urls are working" error coming from the Enyim client?
Thanks, let me know how it goes.
Perry
Forum support is great for free but sometimes you need a guaranteed response time and dedicated resources for your questions or issues.
Consider purchasing enterprise-level support from Membase: http://www.membase.com/products-and-services/overview
Call or email "sales -at- membase -dot- com" today!