远程 python 客户端无法连接到 couchbase 服务器

remote python client failing to reach couchbase server

我在 linode 上有一个 couchbase 6.0 服务器 运行ning,我正在使用 python SDK 将数据插入我的 couchbase 存储桶。当 运行 直接在 Linode 服务器上时,我的数据被插入。 但是,当我 运行 来自远程机器的代码时,我收到网络错误:

CouchbaseNetworkError, CouchbaseTransientError): <RC=0x2C[The remote host refused the connection.

我在 linode 上打开了端口 8091、8092、8093、8094。

from couchbase.cluster import Cluster
from couchbase.cluster import PasswordAuthenticator

# linode ip: 1.2.3.4
cluster = Cluster('couchbase://1.2.3.4:8094')
cluster.authenticate(PasswordAuthenticator('admin', 'password'))
bucket = cluster.open_bucket('test_bucket')
bucket.upsert('1',{"foo":"bar"})

我的代码在 运行 时在服务器上执行 couchbase://localhost,但当 运行 来自远程机器时它失败了。是否缺少任何端口或配置?

Client-to-node:在任何 clients/app-servers/SDKs 和他们需要访问的每个集群的所有节点之间。

未加密*:8091-8096、11210、11211

加密:18091-18096†††,11207

使用端口 11210 和 11211 对我有用。 source