Timeout when using remote couchbase a AWS ec2

For development purposes, I want to connect a local machine to couchbase installed on remote ec2. I have succeeded in creating a connection, but I get a timeout when I try to access the data.

I searched for the problem and found here that the problem is probably due to couchbase returning an internal IP address that cannot be used outside of AWS.

However, I did not find any solution for this. Any ideas?

Thank.

This is my output:

In [19]: c = couchbase.Couchbase().connect(host='107.20.181.77',bucket='amit')

In [20]: c
Out[20]: <couchbase.connection.Connection bucket=amit, nodes=['10.185.248.101:8091'] at 0x2f20870>

In [21]: c.set("12345",{'a':100})
---------------------------------------------------------------------------
TimeoutError                              Traceback (most recent call last)
<ipython-input-21-4df1cb7c8c9a> in <module>()
----> 1 c.set("12345",{'a':100})

/usr/local/lib/python2.7/dist-packages/couchbase/connection.pyc in set(self, key, value, cas, ttl, format, persist_to, replicate_to)
    318         """
    319         return _Base.set(self, key, value, cas, ttl, format,
--> 320                          replicate_to, persist_to)
    321 
    322     def add(self, key, value, ttl=0, format=None, persist_to=0, replicate_to=0):

TimeoutError: <Key=u'12345', RC=0x17[Operation timed out], Operational Error, Results=1, C Source=(src/multiresult.c,286)>
+4
source share
3 answers

. IP- - , . , , IP- . IP- . , DNS , - IP-, , IP- . AWS, Azure : http://blog.couchbase.com/step-step-production-deployment-couchbase-windows-azure-virtual-machines , .

+3

, - , , , IP-, ip, , AWS

: 1) node

2)

3) add it back using its public DNS name (the public IP address will not work, as you can see from: https://issues.couchbase.com/browse/MB-8985 )

4) rebalance it again

repeat above for all nodes, I hope that you do not have too many nodes in your cluster ...

0
source

Source: https://habr.com/ru/post/1535993/


All Articles