Reputation: 1275
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 every time I try to connect from the code, it throws a timeout exception.
What I have done is: I set a configuration
<couchbaseClients>
<couchbase useSsl="false">
<servers>
<add uri="http://PUBLIC-IP-ADDRESS:8091/pools"></add>
</servers>
<buckets>
<add name="default" useSsl="false" password="">
<connectionPool name="custom" maxSize="10" minSize="5"></connectionPool>
</add>
</buckets>
</couchbase>
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, I'm able to telnet. Also, I am able to connect to couchbase`s console.
Upvotes: 3
Views: 286
Reputation: 1275
Ok, the resolution was quite simple. During installation of Couchbase i was wrongly specifying Server Hostname - a local one
Upvotes: 3