WARN [main] 2018-12-18 07:02:06,862 StartupChecks.java:332 - Directory bin/../data/data doesn't exist
ERROR [main] 2018-12-18 07:02:06,862 CassandraDaemon.java:708 - Has no permission to create directory bin/../data/data
If you install on Ubuntu using the repositories you will not see this, however if you install using the tar binaries you will see these errors.
Reading the cassandra.yaml configuration file, there is a section on the data directory.
# Directories where Cassandra should store data on disk. Cassandra
# will spread data evenly across them, subject to the granularity of
# the configured compaction strategy.
# If not set, the default directory is $CASSANDRA_HOME/data/data.
# - /var/lib/cassandra/data
If you are starting Cassandra from the untar-ed directory, it expects the data directory under there.
There are other directories like:
commitlog data hints saved_caches
It expects under the data directory and also check ownership and group permissions. It is recommend that the cassandra daemon run as a separate user from root, creating a cassandra user and group is best practice, the cassandra user account does not need a shell.
$ nodetool status
Failed to connect to '127.0.0.1:7199': Connection refused (Connection refused)
This error relates to the Cassandra daemon not starting up.
Incorrect entries in the cassandra configuration file: cassandra.yml
Clean up old dataset.
$ sudo rm -rf /var/lib/cassandra/data/system/*
Ensure entries in cassandra.yml are configured correctly.
$ sudo vi /etc/cassandra/conf/cassandra.yaml
Pay particular attention to the seed addresses and listen_address, if the installation is on a localhost, single node, keep seed as localhost and the listen_address as localhost.
Check this link for configuration options: http://cassandra.apache.org/doc/4.0/configuration/cassandra_config_file.html
Error: org.apache.cassandra.exceptions.ConfigurationException: Saved cluster name Test Cluster != configured name
An attempt to change the cluster name in the cassandra.yml file and then starting the cassandra daemon will result in this error, revert the changes back.
Go into cqlsh and run the following.
cqlsh> UPDATE system.local SET cluster_name = 'Training Cluster' where key='local';
$ nodetool flush
Then change the cassandra.yaml file to reflect the cluster name.