首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >连接到Google Cloud Compute上的cassandra

连接到Google Cloud Compute上的cassandra
EN

Stack Overflow用户
提问于 2015-07-28 13:33:14
回答 1查看 892关注 0票数 0

我通过他们的发射器:https://cloud.google.com/launcher/explore?q=cassandra部署了一个Cassandra集群

我可以通过SSH/PuTTY连接到VM精细。

然后,当我试图连接例如DBeaver时,我得到:

com.datastax.driver.core.exceptions.NoHostAvailableExeption: All host(s) tried for query failed(tried: /x.x.x.x:9160) com.datastax.driver.core.ConnectionExption:[/x.x.x.x:9160] Unexpected error during transport initialization. Connection has been closed

或者使用cassandra-driver (nodejs),我得到:

All host(s) tried for query failed. First host tried, x.x.x.x:9160: Error: read ECONNRESET. See innerErrors. InnerErrors: { 'x.x.x.x:9160': { [Error: read ECONNRESET] code: 'ECONNRESET', errno: 'ECONNRESET', syscall: 'read' } } Info: Represents an error when a query cannot be performed because no host is available or could be reached by the driver.

我在google控制台中转发了9160端口,它似乎可以工作,因为当我停止VM上的cassandra服务器时,它会产生一个不同的错误,表明连接被拒绝:

All host(s) tried for query failed. First host tried, x.x.x.x:9160: Error: connect ECONNREFUSED. See innerErrors. InnerErrors: { 'x.x.x.x:9160': { [Error: connect ECONNREFUSED] code: 'ECONNREFUSED', errno: 'ECONNREFUSED', syscall: 'connect' } } Info: Represents an error when a query cannot be performed because no host is available or could be reached by the driver.

现在,我尝试将cassandra.yaml rcp_adress编辑到实际的external地址,而不是0.0.0.0。我还尝试过internal服务器场地址。

我没有更改默认身份验证(但也尝试使用auth):

代码语言:javascript
复制
authenticator: AllowAllAuthenticator
# authenticator: PasswordAuthenticator

authorizer: AllowAllAuthorizer
# authorizer: CassandraAuthorizer

我不知所措,连接似乎有效,但cassandra似乎不允许登录或重置连接?

EN

回答 1

Stack Overflow用户

回答已采纳

发布于 2015-07-28 14:05:49

您正在尝试连接到节俭端口(9160)。您应该使用本机协议端口(9042)。

票数 2
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/31677860

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档