gpt4 book ai didi

linux - 虚拟盒子上的cassandra 3.4无法启动

转载 作者:太空宇宙 更新时间:2023-11-04 12:50:07 25 4
gpt4 key购买 nike

我正在使用 mac osx。我通过 virtualbox 创建了 3 个虚拟框。我已经在每个虚拟盒子上安装了 centos7 最小版本。然后我在每个盒子上安装了 cassandra。安装后,它由 cqlsh 和 nodetool status 命令启动。但在那之后,当我试图相互链接并编辑 cassandra.yaml 文件时,它开始显示

('Unable to connect to any servers', {'127.0.0.1': error(111, "Tried connecting to [('127.0.0.1', 9042)]. Last error: Connection refused")})

我已经按如下方式编辑了 cassandra.yaml 文件:

cluster_name: 'Home Cluster'  
num_tokens: 256
partitioner: org.apache.cassandra.dht.Murmur3Partitioner
- seeds: "192.168.56.102,192.168.56.103"
storage_port: 7000
listen_address: 192.168.56.102
rpc_address: 192.168.56.102
rpc_port: 9160
endpoint_snitch: SimpleSnitch

我的/etc/hosts 文件包含:

192.168.56.102 node01
192.168.56.103 node02
192.168.56.104 node03

请告诉我我做错了什么?我的 cassandra 集群不工作。

解决方案:我从 AKKI 那里得到了解决方案。问题是 enpoint_snitch。我制作了 endpoint_snitch=GossipingPropertyFileSnitch 并修复了它。我现在的输出如下:

[root@dbnode2 ~]# nodetool status
Datacenter: dc1
===============
Status=Up/Down
|/ State=Normal/Leaving/Joining/Moving
-- Address Load Tokens Owns (effective) Host ID Rack
UN 192.168.56.101 107.38 KB 256 62.5% 0526a2e1-e6ce-4bb4-abeb-b9e33f72510a rack1
UN 192.168.56.102 106.85 KB 256 73.0% 0b7b76c2-27e8-490f-8274-571d00e60c20 rack1
UN 192.168.56.103 83.1 KB 256 64.5% 6c8d80ec-adbb-4be1-b255-f7a0b63e95c2 rack1

最佳答案

我遇到过类似的问题,我尝试了以下解决方案:

在 Cassandra.yaml 文件中检查你是否有,

start_rpc = true

将我的端点告密者更改为

endpoint_snitch: GossipingFilePropertySnitch

在我的 CentOS 上打开了 Cassandra 使用的所有端口

Cassandra inter-node ports
Port number Description
7000 Cassandra inter-node cluster communication.
7001 Cassandra SSL inter-node cluster communication.
7199 Cassandra JMX monitoring port.


Cassandra client port
Port number Description
9042 Cassandra client port.
9160 Cassandra client port (Thrift).

CentOs 7打开端口的命令(根据自己的操作系统查找):

>sudo firewall-cmd --zone=public --add-port=9042/tcp --permanent
>sudo firewall-cmd –reload

然后重启你的系统

此外,您似乎在启动 cassandra 后更改了 Cassandra.Yaml 文件。确保在启动 Cassandra 之前在所有节点上编辑 Cassandra.yaml 文件还要记得先启动种子节点。

关于linux - 虚拟盒子上的cassandra 3.4无法启动,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/37517597/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com