0

我有一个 Cassandra 实例在英特尔 NUC 上的 Docker 容器中运行。在我的 Mac 上,我可以通过 ssh 连接到它并很好地连接到 cqlsh。但是,当我尝试使用 DBeaver Enterprise 进行连接时,我得到:

com.datastax.driver.core.exceptions.NoHostAvailableException:
All host(s) tried for query failed (tried: myhostname/xx.xx.xx.xx:9042
(com.datastax.driver.core.exceptions.TransportException:
[myhostname/xx.xx.xx.xx] Cannot connect))

无论是否启用 SSL,都会发生这种情况。我还成功配置了启用 SSH 隧道,但我也尝试过禁用此功能。

在我的 NUC 上,我似乎有三个以太网接口;通常的enp0s25和也docker0br-65e6f96b0e4f。我已经尝试了与这两个接口相关的 IP 地址,它们似乎做得更多,因为它们暂停了几秒钟,但最终抛出了相同的异常。

版本:

  • 卡桑德拉 - 2.2.8
  • CQLSH - 5.0.1
  • DBeaver 企业版 - 3.7.8

查看调试日志,我看到以下消息(使用公钥身份验证启用 SSH 隧道):

2016-11-10 15:45:45.616 - Connect with 'cql://xx.xx.xx.xx:9042/mwih_ks' (cql-1582dfdf6b1-3209dg9f13234351a)
2016-11-10 15:45:45.622 - Instantiate SSH tunnel
2016-11-10 15:45:45.623 - Connect to tunnel host
2016-11-10 15:45:45.623 - SSH INFO: Connecting to xx.xx.xx.xx port 22
2016-11-10 15:45:45.632 - SSH INFO: Connection established
...
2016-11-10 15:45:45.759 - SSH INFO: Host 'xx.xx.xx.xx' is known and matches the RSA host key
2016-11-10 15:45:45.760 - SSH INFO: SSH_MSG_NEWKEYS sent
2016-11-10 15:45:45.760 - SSH INFO: SSH_MSG_NEWKEYS received
2016-11-10 15:45:45.761 - SSH INFO: SSH_MSG_SERVICE_REQUEST sent
2016-11-10 15:45:45.761 - SSH INFO: SSH_MSG_SERVICE_ACCEPT received
2016-11-10 15:45:45.763 - SSH INFO: Authentications that can continue: publickey
2016-11-10 15:45:45.763 - SSH INFO: Next authentication method: publickey
2016-11-10 15:45:45.806 - SSH INFO: Authentication succeeded (publickey).
2016-11-10 15:45:45.814 - Connection failed (cql-1582dfdf6b1-3209dg9f13234351a)
2016-11-10 15:53:18.364 - org.jkiss.dbeaver.model.exec.DBCException: All host(s) tried for query failed (tried: /xx.xx.xx.xx:9042 (com.datastax.driver.core.exceptions.TransportException: [/xx.xx.xx.xx] Cannot connect))
org.jkiss.dbeaver.model.exec.DBCException: All host(s) tried for query failed (tried: /192.168.2.2:9042 (com.datastax.driver.core.exceptions.TransportException: [/xx.xx.xx.xx] Cannot connect))
    at com.jkiss.dbeaver.ent.cassandra.model.CasExecutionContext.connect(CasExecutionContext.java:56)
    at com.jkiss.dbeaver.ent.cassandra.model.CasDataSource.<init>(CasDataSource.java:103)
    at com.jkiss.dbeaver.ent.cassandra.CasDataSourceProvider.openDataSource(CasDataSourceProvider.java:65)
    at org.jkiss.dbeaver.registry.DataSourceDescriptor.connect(DataSourceDescriptor.java:644)
    at org.jkiss.dbeaver.runtime.jobs.ConnectJob.run(ConnectJob.java:74)
    at org.jkiss.dbeaver.ui.dialogs.connection.ConnectionWizard$ConnectionTester.run(ConnectionWizard.java:223)
    at org.jkiss.dbeaver.model.runtime.AbstractJob.run(AbstractJob.java:103)
    at org.eclipse.core.internal.jobs.Worker.run(Worker.java:55)
Caused by: com.datastax.driver.core.exceptions.NoHostAvailableException: All host(s) tried for query failed (tried: /xx.xx.xx.xx:9042 (com.datastax.driver.core.exceptions.TransportException: [/xx.xx.xx.xx] Cannot connect))
    at com.datastax.driver.core.ControlConnection.reconnectInternal(ControlConnection.java:231)
    at com.datastax.driver.core.ControlConnection.connect(ControlConnection.java:77)
    at com.datastax.driver.core.Cluster$Manager.init(Cluster.java:1382)
    at com.datastax.driver.core.Cluster.init(Cluster.java:162)
    at com.datastax.driver.core.Cluster.connectAsync(Cluster.java:333)
    at com.datastax.driver.core.Cluster.connect(Cluster.java:283)
    at com.jkiss.dbeaver.ent.cassandra.model.CasExecutionContext.reconnect(CasExecutionContext.java:112)
    at com.jkiss.dbeaver.ent.cassandra.model.CasExecutionContext.connect(CasExecutionContext.java:52)
    ... 7 more
4

0 回答 0