我通过他们的发射器: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):
authenticator: AllowAllAuthenticator
# authenticator: PasswordAuthenticator
authorizer: AllowAllAuthorizer
# authorizer: CassandraAuthorizer我不知所措,连接似乎有效,但cassandra似乎不允许登录或重置连接?
发布于 2015-07-28 14:05:49
您正在尝试连接到节俭端口(9160)。您应该使用本机协议端口(9042)。
https://stackoverflow.com/questions/31677860
复制相似问题