-
Notifications
You must be signed in to change notification settings - Fork 31
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Can't connect to Couchbase instance running in Docker on Mac OS #91
Comments
@sadolit did you do it as described here? https://docs.couchbase.com/server/current/install/getting-started-docker.html#section_jvt_zvj_42b It is important that the ports are correctly exposed. Also your connection string is likely wrong, it should be |
@daschl Yes, all ports are open and I can access this cluster from the web UI, Java, and Python clients. |
@sadolit can you please enable more logging so we can debug? Something like |
@daschl Sure! I changed the connection string to
Here is a sample Python script that runs fine: from couchbase.cluster import Cluster, ClusterOptions
from couchbase_core.cluster import PasswordAuthenticator
cluster = Cluster("couchbase://localhost", ClusterOptions( PasswordAuthenticator("Administrator", "password")))
g = cluster.bucket("test").get("test", quiet=True)
print(g)' Output: ValueResult<rc=0x12D[LCB_ERR_DOCUMENT_NOT_FOUND (301)], key='test', value=None, cas=0x0, flags=0x0, tracing_context=0, tracing_output={'s': 'kv:Unknown', 'c': 'a52c1bb6b0f46723/52b017f7be00fdbc', 'i': 2322031628865647233, 'b': 'test', 'l': '127.0.0.1:62521', 'r': 'localhost:11210', 't': 2500000}> Here is also
|
@sadolit which python SDK version are you using? this looks like an "sdk 2" api and potentially a very different libcouchbase version |
@daschl $ pip3 show couchbase
Name: couchbase
Version: 3.0.6
Summary: Python Client for Couchbase
Home-page: https://github.com/couchbase/couchbase-python-client
Author: Couchbase, Inc.
Author-email: [email protected]
License: Apache License 2.0
Location: /usr/local/lib/python3.9/site-packages
Requires: attrs, six, mypy-extensions, wrapt, pyrsistent
Required-by:
$ brew info libcouchbase
libcouchbase: stable 3.0.6 (bottled), HEAD |
Hi, I've setup a single-node Couchbase 5.0.1 cluster in Docker on Mac OS X. Cluster is setup in Docker so
http://127.0.0.1:8091/pools/default
gives me the following hostname172.25.0.2:8091
. This hostname is not accessible from Mac OS, which is why as I suspectcouchbase-rs
can't connect to it.Here is a sample program:
Here is the log:
At the same time, both Java and Python clients can connect to the cluster without any troubles.
The text was updated successfully, but these errors were encountered: