第一次使用 cassandra,我尝试根据其他相关帖子配置 yaml 文件,但到目前为止还没有成功。知道如何在本地主机上这样做吗?
The specified host(s) could not be reached.
All host(s) tried for query failed (tried: localhost/0:0:0:0:0:0:0:1:9042 (com.datastax.driver.core.TransportException: [localhost/0:0:0:0:0:0:0:1:9042] Cannot connect), localhost/127.0.0.1:9042 (com.datastax.driver.core.TransportException: [localhost/127.0.0.1:9042] Cannot connect))
[localhost/0:0:0:0:0:0:0:1:9042] Cannot connect
[localhost/127.0.0.1:9042] Cannot connect
反转您已经执行的流程。要在
cassandra
上运行 localhost
,到目前为止您不需要更改任何内容。您无需更改cassandra.yaml
。默认情况下它将在本地主机上运行。仔细阅读文档。
了解更多关于
cassandra.yaml
的信息:https://docs.datastax.com/en/cassandra/2.1/cassandra/configuration/configCassandra_yaml_r.html
也许您可以停止 Cassandra 服务器并重新启动。
bin/cassandra -f -R
此外,此链接有助于理解 https://docs.datastax.com/en/cassandra/2.1/cassandra/configuration/configCassandra_yaml_r.html
cassandra.yaml 配置参数。
您还可以确保端口设置正确native_transport(9042),native_transport_port_ssl(9142),Storage_port(7000),roc_port(9160)和JMX端口(7199)。
最后,
seeds - "127.0.0.1"
假设您正在进行单节点 cassandra 设置。
可能是您的
DataStax Cassandra Community Server
Windows 服务已停止。因此,启动它并重新连接。我希望你成功。
当您尝试启动此服务时,如果它再次停止,则必须删除日志文件夹(安装了
DataStax
的位置)并重新启动此服务。