Subhadeep Banerjee
Subhadeep Banerjee

Reputation: 1

Cannot start Cassandra, getting "Invalid yaml. Please remove properties [seeds] from your cassandra.yaml"

# tail /var/log/cassandra/cassandra.log
CompilerOracle: inline org/apache/cassandra/utils/ByteBufferUtil.compare ([BLjava/nio/ByteBuffer;)I
CompilerOracle: inline org/apache/cassandra/utils/ByteBufferUtil.compareUnsigned (Ljava/nio/ByteBuffer;Ljava/nio/ByteBuffer;)I
CompilerOracle: inline org/apache/cassandra/utils/FastByteOperations$UnsafeOperations.compareTo (Ljava/lang/Object;JILjava/lang/Object;JI)I
CompilerOracle: inline org/apache/cassandra/utils/FastByteOperations$UnsafeOperations.compareTo (Ljava/lang/Object;JILjava/nio/ByteBuffer;)I
CompilerOracle: inline org/apache/cassandra/utils/FastByteOperations$UnsafeOperations.compareTo (Ljava/nio/ByteBuffer;Ljava/nio/ByteBuffer;)I
CompilerOracle: inline org/apache/cassandra/utils/vint/VIntCoding.encodeVInt (JI)[B
INFO  [main] 2022-08-22 09:52:55,359 YamlConfigurationLoader.java:93 - Configuration location: file:/etc/cassandra/default.conf/cassandra.yaml
Exception (org.apache.cassandra.exceptions.ConfigurationException) encountered during startup: Invalid yaml. Please remove properties [seeds] from your cassandra.yaml
Invalid yaml. Please remove properties [seeds] from your cassandra.yaml
ERROR [main] 2022-08-22 09:52:55,634 CassandraDaemon.java:803 - Exception encountered during startup: Invalid yaml. Please remove properties [seeds] from your cassandra.yaml
[root@xxxx yum.repos.d]#

Upvotes: 0

Views: 1678

Answers (1)

Erick Ramirez
Erick Ramirez

Reputation: 16343

The error indicates that you have a misconfiguration in the cassandra.yaml.

It looks like you've added the seeds incorrectly. In YAML files, indentation is important because it is how "nesting" is implied.

The correct format for configuring seeds is:

seed_provider:
    - class_name: org.apache.cassandra.locator.SimpleSeedProvider
      parameters:
          - seeds: "ip1,ip2,..."

Fix your configuration then try to restart again. Cheers!

[UPDATE] Welcome to Stack Overflow! A friendly reminder that Stack Overflow is for getting help with coding, algorithm, or programming language problems. For future reference, you should post DB admin/ops questions on DBA Stack Exchange (part of the Stack Overflow network of sites but dedicated to DBAs instead of developers). Cheers!

Upvotes: 1

Related Questions