Insert Into Remote Couchbase Server By Python
I use this code to insert data into Couchbase from couchbase import Couchbase c = Couchbase.connect(host='remote-server.com', bucket='default') c.set('first_key', 'first-_value')
Solution 1:
To connect to couchbase you should ensure that your server is configured with dns name remote-server.com
, not IP
, not localhost
. And couchbase server also should be able to get ip via this dns name.
I.e. if you host your server in AWS EC2, couchbase usally get internal IP address like 10.X.X.X and even if you try to access it from internet via public ip with clien library, your request will be timed out. But you will be able to access REST API, and admin console via public dns.
Also you should check all ports (not only 8091) needed by couchbase. See this doc for all ports needed to be opened.
Post a Comment for "Insert Into Remote Couchbase Server By Python"