I am attempting to start Cassandra for the first time on a Redhat machine. I have successfully done so on my practice Ubuntu machines, but for some reason, the Redhat install is giving me the following errors:
INFO [main] 2017-06-29 20:11:42,369 YamlConfigurationLoader.java:89 - Configuration location: file:/home/cassandra/apache-cassandra-3.10/conf/cassandra.yaml
Exception (org.apache.cassandra.exceptions.ConfigurationException) encountered during startup: Invalid yaml: file:/home/cassandra/apache-cassandra-3.10/conf/cassandra.yaml
Error: null; Can't construct a java object for tag:yaml.org,2002:org.apache.cassandra.config.Config; exception=Cannot create property=data_file_directories for JavaBean=org.apache.cassandra.config.Config#12405818; No single argument constructor found for class [Ljava.lang.String;; in 'reader', line 10, column 1:
cluster_name: 'Test Cluster'
^
Invalid yaml:
file:/home/cassandra/apache-cassandra-3.10/conf/cassandra.yaml Error:
null; Can't construct a java object for
tag:yaml.org,2002:org.apache.cassandra.config.Config; exception=Cannot
create property=data_file_directories for
JavaBean=org.apache.cassandra.config.Config#12405818; No single
argument constructor found for class [Ljava.lang.String;; in
'reader', line 10, column 1:
cluster_name: 'Test Cluster'
^
ERROR [main] 2017-06-29 20:11:42,742 CassandraDaemon.java:752 -
Exception encountered during startup: Invalid yaml:
file:/home/cassandra/apache-cassandra-3.10/conf/cassandra.yaml Error:
null; Can't construct a java object for
tag:yaml.org,2002:org.apache.cassandra.config.Config; exception=Cannot
create property=data_file_directories for
JavaBean=org.apache.cassandra.config.Config#12405818; No single
argument constructor found for class [Ljava.lang.String;; in
'reader', line 10, column 1:
cluster_name: 'Test Cluster'
The only change I made to yaml is I set the data and log files as follows:
data_file_directories: /var/lib/cassandra/data
commitlog_directory: /var/log/cassandra/commitlog
This is a single node to get it working proof of concept machine. Can I solicite some assistance from you much more experienced users?
Thanks!
The problem was with the yaml file :
data_file_directories: /var/lib/cassandra/data
It needed to be:
data_file_directories:
- /var/lib/cassandra/data
Related
We have updated the java minor version and Cassandra version as given below.
Older Java version "1.8.0_144"
Newer Java version "1.8.0_261"
Older Cassandra version : 2.1.16
Newer Cassandra version : 3.11.2
Now we are getting below exception :
INFO [main] 2020-08-19 10:55:09,364 YamlConfigurationLoader.java:89 - Configuration
location: file:/etc/cassandra/default.conf/cassandra.yaml
Exception (org.apache.cassandra.exceptions.ConfigurationException) encountered during startup: Invalid yaml: file:/etc/cassandra/default.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 1, column 1:
cluster_name: VV Cluster
We did not change "cassandra.yaml". Same yaml is working on other nodes running on older versions.
Sometimes the issue is not with YAML. As suggested in this Datastax post, you can run a tool utlility like cassandra-stress which bypass the parser. This may help in identifying the real reason of failure.
Sometime it happens that YAML exception eats up the main issue and it appears as invalid yaml exception.
We have a 15 node cassandra setup across 3 DC's.
Using cassandra 3.0.9
One of the nodes in one of our DCs has died with the below startup error
CassandraDaemon.java:709 - Exception encountered during startup
java.lang.IllegalArgumentException: Unknown CF 111111-111111111-11111111
What we have tried -
Bootstrap replacing the node -https://docs.datastax.com/en/archived/cassandra/3.0/cassandra/operations/opsReplaceNode.html
This works for a while and then the bootstrap process hangs with the SAME error in the logs -
CassandraDaemon.java:709 - Exception encountered during startup
java.lang.IllegalArgumentException: Unknown CF
Provision a new blank node,
https://docs.datastax.com/en/archived/cassandra/3.0/cassandra/operations/opsAddNodeToCluster.html
and try to join this to the cluster (with the intention of removing the dead node after). It refuses to start, with the same error.
has anyone ever ran across this before?
Installed presto on single machine cluster when starting presto getting this error.
com.facebook.presto.server.PrestoServer Unable to create injector, see the following errors:
1) Configuration property 'cordinator' was not used
at io.airlift.bootstrap.Bootstrap.lambda$initialize$2(Bootstrap.java:234)
1 error
com.google.inject.CreationException: Unable to create injector, see the following errors:
1) Configuration property 'cordinator' was not used
at io.airlift.bootstrap.Bootstrap.lambda$initialize$2(Bootstrap.java:234)
1 error
at com.google.inject.internal.Errors.throwCreationExceptionIfErrorsExist(Errors.java:466)
at com.google.inject.internal.InternalInjectorCreator.initializeStatically(InternalInjectorCreator.java:155)
at com.google.inject.internal.InternalInjectorCreator.build(InternalInjectorCreator.java:107)
at com.google.inject.Guice.createInjector(Guice.java:96)
at io.airlift.bootstrap.Bootstrap.initialize(Bootstrap.java:241)
at com.facebook.presto.server.PrestoServer.run(PrestoServer.java:115)
at com.facebook.presto.server.PrestoServer.main(PrestoServer.java:67)
here is the config properties.
cordinator=true
node-scheduler.include-coordinator=true
http-server.http.port=8080
query.max-memory=5GB
query.max-memory-per-node=1GB
discovery-server.enabled=true
discovery.uri=http://localhost:8080
This should be coordinator, not cordinator.
I am getting following error when I am trying to run cassandra for the first time. any suggestion?
CassandraDaemon.java:752 - Exception encountered during startup: Invalid yaml: file:/D:/apache-cassandra-3.10/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'
^
check the cassandra.yaml file. Even if it seems to have correct format, there must be a space after : for each property.
In my case I modified seeds like below:
seeds:"IP1,IP2"
which caused the same error.
Misleadingly the error indicates the cluster_name.
I put the space after colon
seeds: "IP1,IP2"
and started Cassandra service. The error disappeared and Cassandra was able to start successfully.
I am trying to configure two windows servers in my network as Cassandra cluster.
I did some reading in various sites and changed the below in Cassandra.yalm
after changing the default value of 127.0.0.1 to actual IP the Cassandra service is not starting.
I also added the map to actual IP to localhost in (windows) hosts file.
After doing the above change, the service is coming up when I start the service. it is stopping immediately.
The reason I am changing this IP is to make this a cluster with two node setup,
Please let me know if I miss some thing.
Version: Datastax community version of Cassandra
Server : windows.
Thx
Muthu
Message from Cassandra.txt in logs dir:
ERROR [main] 2014-09-18 11:43:12,155 DatabaseDescriptor.java (line 116) Fatal configuration error
org.apache.cassandra.exceptions.ConfigurationException: Invalid yaml Caused by: Can't construct a java object for tag:yaml.org,2002:org.apache.cassandra.config.Config; exception=Cannot create property=seed_provider for JavaBean=org.apache.cassandra.config.Config#34e5190a; No suitable constructor with 2 arguments found for class org.apache.cassandra.config.SeedProviderDef in 'reader', line 8, column 1: cluster_name: 'Test Cluster'
If you want to create Cassandra cluster you must have at least two nodes and configure /etc/cassandra/cassandra.yaml
cassandra.yaml
cluster_name: 'Some Cluster Name'
listen_address: [Current IP]
rpc_address: [Current IP]
seed_provuder:
- seeds: "[Current IP], [Remote IP]"
Note: seeds must have at least two IPs which must be reachable for each other
Clean and start Cassandra instance
sudo rm -rf /var/lib/cassandra/* /var/log/cassandra/*
Note: Cassandra instance must be killed before cleaning those folders.