Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

cassandra fails with “Invalid yaml.” in standard configuration #31349

Closed
fuzzy-id opened this issue Nov 7, 2017 · 14 comments
Closed

cassandra fails with “Invalid yaml.” in standard configuration #31349

fuzzy-id opened this issue Nov 7, 2017 · 14 comments

Comments

@fuzzy-id
Copy link
Contributor

fuzzy-id commented Nov 7, 2017

Issue description

Enabling services.cassandra without altering any other options fails with the following log:

Nov 07 08:33:04 cassandra cassandra-start[372]: Exception (org.apache.cassandra.exceptions.ConfigurationException) encountered during startup: Invalid yaml. Please remove properties [multithreaded_compaction, memtable_flush_queue_size, compaction_preheat_key_cache, in_memory_compaction_limit_in_mb, preheat_kernel_page_cache] from your cassandra.yaml
Nov 07 08:33:04 cassandra cassandra-start[372]: org.apache.cassandra.exceptions.ConfigurationException: Invalid yaml. Please remove properties [multithreaded_compaction, memtable_flush_queue_size, compaction_preheat_key_cache, in_memory_compaction_limit_in_mb, preheat_kernel_page_cache] from your cassandra.yaml
Nov 07 08:33:04 cassandra cassandra-start[372]:         at org.apache.cassandra.config.YamlConfigurationLoader$MissingPropertiesChecker.check(YamlConfigurationLoader.java:188)
Nov 07 08:33:04 cassandra cassandra-start[372]:         at org.apache.cassandra.config.YamlConfigurationLoader.loadConfig(YamlConfigurationLoader.java:119)

Steps to reproduce

Define a container:

  containers.cassandra =
    { privateNetwork = true;
      config =
        { config, pkgs, ... }:
        {
          imports =
            [ <nixpkgs/nixos/modules/services/databases/cassandra.nix>
            ];
          services.cassandra.enable = true;
        };
    };

Do a rebuild of the system and start the container via nixos-container start cassandra.

Technical details

  • System: 17.09.2016.a09358f9c0 (Hummingbird)
  • Nix version: nix-env (Nix) 1.11.15
  • Nixpkgs version: 17.09.2016.a09358f9c0
  • Sandboxing enabled: yes
@roberth
Copy link
Member

roberth commented Nov 7, 2017

The cassandra module and test need maintenance. They have been 'removed' more than a year ago for various reasons. See 52f2106#diff-e94680bae33b250a648320fa541d7308

Apparently the default package does not support some of the options in the untested module.

@fuzzy-id
Copy link
Contributor Author

fuzzy-id commented Nov 7, 2017

Ahhh, I did not see that commit. Thanks for the hint.

I was just about to do some maintenance on the module. But, when it is that bad I guess it's almost better to start all over. What's this import-from-derivation thing one should avoid?

@roberth
Copy link
Member

roberth commented Nov 7, 2017

Import from derivation is when in Nix you import something that has to be built first. That is undesirable, because it requires build steps before knowing the entire build plan. On hydra it is particularly bad, because when the derivation that is being imported fails, evaluation fails, and hydra will build it on the master node.

@fuzzy-id
Copy link
Contributor Author

fuzzy-id commented Nov 7, 2017

Alright, I will cut the old strings then, update cassandra to the latest stable version and get a minimal configuration running. We can further add options as we need them.

Is it ok, when I put myself into the list of package maintainers? We got a now project starting with Cassandra here, so I will have to deal with this package for some time anyways. :)

Does this sound alright?

@NeQuissimus
Copy link
Member

Sounds good, @fuzzy-id . I'd love to see a working Cassandra module myself...

@roberth
Copy link
Member

roberth commented Nov 7, 2017

Sounds alright to me. Let's also ask @nckx @cransom . Maybe later in the process we can ping contributors/possible users rycee pSub bjornfor bcarrell flazz obadz joachifm domenkozar

@nckx
Copy link
Member

nckx commented Nov 7, 2017

Sounds like a plan. You both are obviously more familiar with the current state of Cassandra on Nix than I am, so I'll defer to your & other contributors' good judgement. Thanks for working on this!

@cransom
Copy link
Contributor

cransom commented Nov 7, 2017

The initial module was not pretty but it had worked enough for the initial audience. I haven't worked near Cassandra or this module in a very long time but I'd be glad to review a rewrite.

@fuzzy-id
Copy link
Contributor Author

We have cassandra running in two deployments here based on #31410. Is someone else willing to review?

What is the further procedure to get this thing merged?

@JohnAZoidberg
Copy link
Member

JohnAZoidberg commented Mar 31, 2019

The PR is merged, this can be closed. (Also the error doesn't occur anymore with the current module.)

@indrajeet4192
Copy link

I am facing same issue. i am using cassandra on my local machine. it was working fine but when i log in into cqlsh check keyspaces and restarted cassandra, getting below error details

CompilerOracle: inline org/apache/cassandra/utils/vint/VIntCoding.encodeVInt (JI)[B
INFO [main] 2020-02-28 04:37:09,680 YamlConfigurationLoader.java:89 - Configuration location: file:/D:/Work/Cassandra/apache-cassandra-3.11.4/conf/cassandra.yaml
Exception (org.apache.cassandra.exceptions.ConfigurationException) encountered during startup: Invalid yaml: file:/D:/Work/Cassandra/apache-cassandra-3.11.4/conf/cassandra.yaml
Error: null; Can't construct a java object for tag:yaml.org,2002:org.apache.cassandra.config.Config; exception=java.lang.reflect.InvocationTargetException; in 'reader', line 10, column 1:
cluster_name: 'Test Cluster'
^
Invalid yaml: file:/D:/Work/Cassandra/apache-cassandra-3.11.4/conf/cassandra.yaml
Error: null; Can't construct a java object for tag:yaml.org,2002:org.apache.cassandra.config.Config; exception=java.lang.reflect.InvocationTargetException; in 'reader', line 10, column 1:
cluster_name: 'Test Cluster'
^
ERROR [main] 2020-02-28 04:37:09,765 CassandraDaemon.java:749 - Exception encountered during startup: Invalid yaml: file:/D:/Work/Cassandra/apache-cassandra-3.11.4/conf/cassandra.yaml
Error: null; Can't construct a java object for tag:yaml.org,2002:org.apache.cassandra.config.Config; exception=java.lang.reflect.InvocationTargetException; in 'reader', line 10, column 1:
cluster_name: 'Test Cluster'

@indrajeet4192
Copy link

Fixed above issue by replacing all libs of cassandra folder. I hope it would works for you as well

@JohnAZoidberg
Copy link
Member

JohnAZoidberg commented Feb 28, 2020

Fixed above issue by replacing all libs of cassandra folder. I hope it would works for you as well

What do you mean? Are you using NixOS, @indrajeet4192?

@indrajeet4192
Copy link

NO i am practicing cassandra in Windows 10 . In that I have added some drivers in the libs folder. so i was getting above issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

7 participants