Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

321
Views
Can't start Cassandra

I'm trying to run cqlsh to connect to cassandra and received the following error messages.

a) error from cqlsh running:

Connection error: ('Unable to connect to any servers', {'127.0.0.1:9042': error(61, "Tried connecting to [('127.0.0.1', 9042)]. Last error: Connection refused")})

b) error message after running cassandra:

Exception (java.lang.ExceptionInInitializerError) encountered during startup: null
java.lang.ExceptionInInitializerError
    at org.apache.cassandra.db.SystemKeyspace.checkHealth(SystemKeyspace.java:709)
    at org.apache.cassandra.service.StartupChecks$9.execute(StartupChecks.java:351)
    at org.apache.cassandra.service.StartupChecks.verify(StartupChecks.java:109)
    at org.apache.cassandra.service.CassandraDaemon.setup(CassandraDaemon.java:188)
    at org.apache.cassandra.service.CassandraDaemon.activate(CassandraDaemon.java:607)
    at org.apache.cassandra.service.CassandraDaemon.main(CassandraDaemon.java:717)
Caused by: java.lang.IllegalArgumentException: Bad configuration; unable to start server: At least one DataFileDirectory must be specified
    at org.apache.cassandra.config.DatabaseDescriptor.createAllDirectories(DatabaseDescriptor.java:846)
    at org.apache.cassandra.db.Keyspace.<clinit>(Keyspace.java:66)
    ... 6 more
ERROR 00:27:05 Exception encountered during startup
java.lang.ExceptionInInitializerError: null
    at org.apache.cassandra.db.SystemKeyspace.checkHealth(SystemKeyspace.java:709) ~[apache-cassandra-2.2.17.jar:2.2.17]
    at org.apache.cassandra.service.StartupChecks$9.execute(StartupChecks.java:351) ~[apache-cassandra-2.2.17.jar:2.2.17]
    at org.apache.cassandra.service.StartupChecks.verify(StartupChecks.java:109) ~[apache-cassandra-2.2.17.jar:2.2.17]
    at org.apache.cassandra.service.CassandraDaemon.setup(CassandraDaemon.java:188) [apache-cassandra-2.2.17.jar:2.2.17]
    at org.apache.cassandra.service.CassandraDaemon.activate(CassandraDaemon.java:607) [apache-cassandra-2.2.17.jar:2.2.17]
    at org.apache.cassandra.service.CassandraDaemon.main(CassandraDaemon.java:717) [apache-cassandra-2.2.17.jar:2.2.17]
Caused by: java.lang.IllegalArgumentException: Bad configuration; unable to start server: At least one DataFileDirectory must be specified
    at org.apache.cassandra.config.DatabaseDescriptor.createAllDirectories(DatabaseDescriptor.java:846) ~[apache-cassandra-2.2.17.jar:2.2.17]
    at org.apache.cassandra.db.Keyspace.<clinit>(Keyspace.java:66) ~[apache-cassandra-2.2.17.jar:2.2.17]
    ... 6 common frames omitted

c) brew status shows that there's an error running cassandra instance:

Name          Status  User   Plist
cassandra@2.2 error    /Users/john/Library/LaunchAgents/homebrew.mxcl.cassandra@2.2.plist
rabbitmq      stopped        
redis         started  /Users/john/Library/LaunchAgents/homebrew.mxcl.redis.plist
tomcat@7      stopped

Can anyone please help on this issue?

over 4 years ago · Santiago Trujillo
1 answers
Answer question

0

This error is thrown from here - it means that you don't have configuration option data_file_directories that specifies where Cassandra need to store the data, and it looks like that $CASSANDRA_HOME is not set.

Open the cassandra.yaml file, uncomment data_file_directories configuration option and next line, and point to the directory where Cassandra can write the data instead of default /var/lib/cassandra/data. Most probably you'll need also specify other parameters, such as, commitlog_directory, hints_directory, and saved_caches_directory.

over 4 years ago · Santiago Trujillo Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!