配置cassandra.yaml以创建集群后,Datastax服务未启动

问题描述:

我在DSE 5.0中的Cassandra中配置集群时遇到问题。在更改/etc/dse/cassandra/cassandra.yaml后,服务dse(sudo service dse start)无法启动。我是初学者,所以我不知道该怎么做。配置cassandra.yaml以创建集群后,Datastax服务未启动

节点1:

cluster_name: 'MyCluster' 
num_tokens: 256 
seed_provider: 
    - class_name: org.apache.cassandra.locator.SimpleSeedProvider 
     parameters: 
      - seeds: "10.1.4.48,10.1.4.49" 

listen_address: 10.1.4.48 
broadcast_address: 10.1.4.48 
rpc_address: 0.0.0.0 
broadcast_rpc_address: 10.1.1.48 

节点2:

cluster_name: 'MyCluster' 
num_tokens: 256 
seed_provider: 
    - class_name: org.apache.cassandra.locator.SimpleSeedProvider 
     parameters: 
      - seeds: "10.1.4.48,10.1.4.49" 

listen_address: 10.1.4.49 
broadcast_address: 10.1.4.49 
rpc_address: 0.0.0.0 
broadcast_rpc_address: 10.1.1.49 

这是我在每一个我想提出同样的集群中的两个节点发生了变化。也许我需要更换另一个文件?

+0

看在SYSTEM.LOG,看看是什么错误。 –

+0

@AlecCollier \t 在system.log中的错误是:org.apache.cassandra.exceptions.ConfigurationException:无效yaml:file:/etc/dse/cassandra/cassandra.yaml at ...原因:org.yaml .snakeyaml.parser.ParserException:解析块映射时;预计,但发现BlockMappingStart;在'读取器'行495中,列$ broadcast_address:10.1.4.48 \t \t 。最让我困扰的是我现在改变了cassandra.yaml,但system.log没有更新。它与昨天一样 –

+1

检查'output.log' – phact

yaml文件格式可能非常繁琐。我通常从安装(同一版本)抓取香草cassandra.yaml一个,然后运行diff

您可能会看到一些意想不到的差异。最常见的一种是:<value>之间缺少空间,因此例如

listen_address:192.168.56.20

,而不是

listen_address: 192.168.56.20