question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

sbt test in new project fails with error: Invalid yaml. Please remove properties [cdc_raw_directory] from your cassandra.yaml

See original GitHub issue

Version

1.3.3 (regression)

Reproduction

$ sbt -Dsbt.version=0.13.15 new https://github.com/lagom/lagom-scala.g8 --name=hello-scala-sbt`
# ...
Template applied in ./hello-scala-sbt

$ cd hello-scala-sbt/
/Users/tmoore/Projects/tmp/hello-scala-sbt
$ sbt test
# ...
Exception (org.apache.cassandra.exceptions.ConfigurationException) encountered during startup: Invalid yaml. Please remove properties [cdc_raw_directory] from your cassandra.yaml
2017-05-05 17:11:07,143 ERROR org.apache.cassandra.service.CassandraDaemon - Exception encountered during startup
org.apache.cassandra.exceptions.ConfigurationException: Invalid yaml. Please remove properties [cdc_raw_directory] from your cassandra.yaml
	at org.apache.cassandra.config.YamlConfigurationLoader$MissingPropertiesChecker.check(YamlConfigurationLoader.java:188) ~[cassandra-all-3.0.9.jar:3.0.9]
	at org.apache.cassandra.config.YamlConfigurationLoader.loadConfig(YamlConfigurationLoader.java:119) ~[cassandra-all-3.0.9.jar:3.0.9]
	at org.apache.cassandra.config.YamlConfigurationLoader.loadConfig(YamlConfigurationLoader.java:95) ~[cassandra-all-3.0.9.jar:3.0.9]
	at org.apache.cassandra.config.DatabaseDescriptor.loadConfig(DatabaseDescriptor.java:135) ~[cassandra-all-3.0.9.jar:3.0.9]
	at org.apache.cassandra.config.DatabaseDescriptor.<clinit>(DatabaseDescriptor.java:119) ~[cassandra-all-3.0.9.jar:3.0.9]
	at org.apache.cassandra.service.CassandraDaemon.activate(CassandraDaemon.java:543) ~[cassandra-all-3.0.9.jar:3.0.9]
	at akka.persistence.cassandra.testkit.CassandraLauncher$.startEmbedded(CassandraLauncher.scala:141) [akka-persistence-cassandra_2.11-0.26.jar:na]
	at akka.persistence.cassandra.testkit.CassandraLauncher$.main(CassandraLauncher.scala:63) [akka-persistence-cassandra_2.11-0.26.jar:na]
	at akka.persistence.cassandra.testkit.CassandraLauncher.main(CassandraLauncher.scala) [akka-persistence-cassandra_2.11-0.26.jar:na]
org.apache.cassandra.exceptions.ConfigurationException: Invalid yaml. Please remove properties [cdc_raw_directory] from your cassandra.yaml
	at org.apache.cassandra.config.YamlConfigurationLoader$MissingPropertiesChecker.check(YamlConfigurationLoader.java:188)
	at org.apache.cassandra.config.YamlConfigurationLoader.loadConfig(YamlConfigurationLoader.java:119)
	at org.apache.cassandra.config.YamlConfigurationLoader.loadConfig(YamlConfigurationLoader.java:95)
	at org.apache.cassandra.config.DatabaseDescriptor.loadConfig(DatabaseDescriptor.java:135)
	at org.apache.cassandra.config.DatabaseDescriptor.<clinit>(DatabaseDescriptor.java:119)
	at org.apache.cassandra.service.CassandraDaemon.activate(CassandraDaemon.java:543)
	at akka.persistence.cassandra.testkit.CassandraLauncher$.startEmbedded(CassandraLauncher.scala:141)
	at akka.persistence.cassandra.testkit.CassandraLauncher$.main(CassandraLauncher.scala:63)
	at akka.persistence.cassandra.testkit.CassandraLauncher.main(CassandraLauncher.scala)
Exception in thread "main" java.lang.RuntimeException: Exception encountered during startup
	at org.apache.cassandra.service.CassandraDaemon.exitOrFail(CassandraDaemon.java:705)
	at org.apache.cassandra.service.CassandraDaemon.activate(CassandraDaemon.java:598)
	at akka.persistence.cassandra.testkit.CassandraLauncher$.startEmbedded(CassandraLauncher.scala:141)
	at akka.persistence.cassandra.testkit.CassandraLauncher$.main(CassandraLauncher.scala:63)
	at akka.persistence.cassandra.testkit.CassandraLauncher.main(CassandraLauncher.scala)
Caused by: org.apache.cassandra.exceptions.ConfigurationException: Invalid yaml. Please remove properties [cdc_raw_directory] from your cassandra.yaml
	at org.apache.cassandra.config.YamlConfigurationLoader$MissingPropertiesChecker.check(YamlConfigurationLoader.java:188)
	at org.apache.cassandra.config.YamlConfigurationLoader.loadConfig(YamlConfigurationLoader.java:119)
	at org.apache.cassandra.config.YamlConfigurationLoader.loadConfig(YamlConfigurationLoader.java:95)
	at org.apache.cassandra.config.DatabaseDescriptor.loadConfig(DatabaseDescriptor.java:135)
	at org.apache.cassandra.config.DatabaseDescriptor.<clinit>(DatabaseDescriptor.java:119)
	at org.apache.cassandra.service.CassandraDaemon.activate(CassandraDaemon.java:543)
	... 3 more

Relates to #690 and akka/akka-persistence-cassandra#189

May be influenced by classpath ordering.

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Comments:7 (5 by maintainers)

github_iconTop GitHub Comments

2reactions
mcamoucommented, May 16, 2017

Since the fix will only be available in 1.3.4+, I found a workaround for 1.3.3. Copy test-embedded-cassandra.yaml from com.lightbend.lagom:lagom-persistence-cassandra-core into src/main/resources for every service implementation. The issue is that there are 2 copies of that file: one from com.lightbend.lagom:lagom-persistence-cassandra-core and the second from com.typesafe.akka:akka.persistence.cassandra. The problem arises when the JVM picks up the second one instead of the first one.

0reactions
ignasi35commented, May 16, 2017

Hi @lejoow, we’ve worked a solution that should get this sorted out, yes.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Cannot start Cassandra, getting "Invalid yaml. Please remove ...
The error indicates that you have a misconfiguration in the cassandra.yaml . It looks like you've added the seeds incorrectly. In YAML files ......
Read more >
CassandraUnit error due to cassandra.yaml - Google Groups
I run CassandraUnit but it always raise under error message. I want to use Cassandra 2.0.8. I also try the Cassandra 2.0.5 and...
Read more >
The cassandra.yaml configuration file | Apache Cassandra 3.0
(Default: Test Cluster) The name of the cluster. This setting prevents nodes in one logical cluster from joining another. All nodes in a...
Read more >
Cassandra Server - Lagom Framework
Please note that the Cassandra YAML file used by Lagom has a few variables that are filled by some Lagom managed properties, namely:...
Read more >
cassandra.yaml file configuration
This is mainly used to prevent machines in one logical cluster from joining another. Default Value: 'Test Cluster'. num_tokens. This defines the number...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found