Cassandra-windows 10

Viewed 755

I have ınstalled apache-cassandra-3-11-11 and DATASTAX-DDC.But they are not working on Windows 10.

error message

Its giving an error in cmd like in the picture.I tried to write cassandra.bat -f command on powershell it didnt except again.(they are at admin mode)

When I try to open Cassandra CQL Shell it opens but closes by itself in a few seconds. When I try to open cassandra.bat file inside the datastax folder same thing happens.

(by the way I added CASSANDRA_HOME directory at environment settings)

Can somebody help me please...What should I do? Where is the problem?

2 Answers

You don't start Cassandra using the cassandra.bat script. Just use cassandra:

C:\> cd C:\Program Files\apache-cassandra-3.11.11\bin
C:\Program Files\apache-cassandra-3.11.11\bin> cassandra

Powershell permissions

You will need to grant Powershell permissions to the Windows account running the Cassandra script.

You can grant permissions to all Windows accounts on your machine with:

C:\> powershell Set-ExecutionPolicy Unrestricted

WARNING: You need to run the command prompt as an administrator for the command above to work.

As an alternative, you can grant unrestricted access just for your current user with:

C:\> powershell Set-ExecutionPolicy -Scope CurrentUser Unrestricted

Heap size

If your laptop/desktop only has 8GB of RAM, you will get this error on startup:

Error occurred during initialization of VM
Could not reserve enough space for object heap

By default, Cassandra will attempt to start with 2GB of memory allocated to the heap on 8GB machines. But if there isn't enough free memory, Java will fail to reserve it for the JVM heap.

You will need to start Cassandra with a more conservative allocation of 1GB for max heap size and 400MB for NewGen by uncommenting the following lines in the "Heap Settings" section of conf/jvm.options:

-Xms1G
-Xmx1G
-Xmn400M

Windows support

I also wanted to let you know that there is very limited Windows support in Cassandra 3.11 and there are several known issues that will not be fixed due to limitations in the operating system.

Furthermore, Windows support has been completely dropped in Cassandra 4.0 due to lack of maintainers and testing (CASSANDRA-16171).

As a workaround, we recommend the following:

If you just want to build apps with Cassandra as a backend, Astra DB has a free tier that lets you launch a Cassandra cluster in a few clicks with no credit card required. Cheers!

Guys I deleted Docker from everywhere (hidden files too) and installed again. And did the same thing to datastax. Problem now solved.

Related