I am trying to connect to couchbase running on Amazon EC2. I can connect it by public URL exposed from amazon or IP address, but everytime i try to connect from the code, it throws a timeout exception.
What i have done is:
-
i set a configuration
Then while opening cluster i put there a configuration name
new Cluster("couchbaseClients/couchbase");
Also, i found somewhere i need to open a set of ports. I did inbound rules for all the ports i found to allow for all clients (any ip address).
What am i doing wrong?
Exception is:
A connection attempt failed because the connected party did not properly respond after a period of time, or established connection failed because connected host has failed to respond PUBLIC-IP-ADDRESS:11210
Port 11210 is opened, im able to telnet. Also, i am able to connect to couchbase`s console.
ADD:
One thing seem strange. This works:
var manager=Cluster.CreateManager("USERNAME", "PASSWORD");
var buckets=manager.ListBuckets();
This not:
var bucket=Cluster.OpenBucket()
Could be a problem is in UserName and Password, but i cant find a way to set a username from config file…
ADD2:
Ok, i tried to set those username and password manually before trying to open a bucket and anyway same exception.