I cannot connect to a couchbase server in Amazon EC2


#1

I have a cache server installed. When I configured the server I used the hostname.
I left all the default settings. The typical default bucket and no password.

Then I try to connect to it from another computer using the c#client.
CouchbaseClient = new CouchbaseClient(); //hangs for about 10 seconds throws no error
CouchbaseClient.Store(StoreMode.Set, “test”,“test”)); //throws no error;
var test = CouchbaseClient.Get(“test”); //always returns null;

This is what my config looks like.










I also have the following ports open on the host couchbase server:
11211
8091
8092
I’ve used this tool to verify
http://www.yougetsignal.com/tools/open-ports/

I have beat this thing to death and cannot resolve this. If I repeat the same setup but everything running locally then it works.


#2

I think it may be a port issue. I tried opening all ports and it’s working.
Trying to find out all required ports now.


#3

codemilian -

Good to hear you found a resolution. Would you mind posting the answer once you get everything figured out?

Also, I noticed your using the Get(…) method, which returned null if the request cannot be honored; try using the ExecuteGet(…) method which returns a IOperationResult object that gives more information about why the operation failed. Much better for debugging!

Thanks,

Jeff


#4

Thank you for the suggestion Jeff. I will keep that in mind for debugging purposes.
I have also posted the fix to my issue.


#5

It was basically a port blocking issue. For my use I needed to open the direct port.

I downloaded the .NET client source code and found references to the following ports:
SsLPort: 11207
ApiPort: 8092
Management Port: 8091
Direct Port: 11210
https Management Port: 18091
https Api Port: 18092