Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Error when starting Cassandra server on Windows 7

I've downloaded all the files of Cassandra and put them in C:\cassandra folder. I've checked that JAVA_HOME and CASSANDRA_HOME Environment variables are set correctly (echo %CASSANDRA_HOME% -> C:\cassandra)

I've modified the config file, for example:

commitlog_directory: C:/cassandra/storage/commitlog

I've tried with both back slash and forward slash for the directory separator. I went to cassandra 'BIN' directory and ran cassandra -f.

I get an error:

Starting Cassandra Server

The system cannot find the path specified

This is where I am stuck and don't know how to proceed. I get the same error when running cassandra-cli too. I don't want to use Datastax, as I am experimenting with the 1.2 beta right now.

Thanks

like image 732
Idan Shechter Avatar asked Dec 06 '25 09:12

Idan Shechter


2 Answers

I ran into this same error, caused by cmd.exe not finding a file referenced in the batch script. In my case, the cause was an improperly-set JAVA_HOME variable. I had set the value to c:\Program Files\Java\jre6\bin, but it should be c:\Program Files\Java\jre6 so that it doesn't break this section of cassandra.bat:

:runDaemon
echo Starting Cassandra Server
"%JAVA_HOME%\bin\java" %JAVA_OPTS% %CASSANDRA_PARAMS% -cp %CASSANDRA_CLASSPATH% "%CASSANDRA_MAIN%"
goto finally

Also, I found this guide helpful when setting up Cassandra 1.2.5 on Windows 7. The configuration file it references is now located at conf/cassandra.yaml, but the same steps apply.

like image 106
bcm360 Avatar answered Dec 09 '25 18:12

bcm360


From memory, on Windows you may need to run cassandra.bat -f not cassandra -f (which would be the equivalent Linux bash script) - check them in a text editor to be sure...

like image 40
DNA Avatar answered Dec 09 '25 20:12

DNA



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!