Home > Software engineering >  Cassandra Server starting issue on windows 10 machine
Cassandra Server starting issue on windows 10 machine

Time:10-07

I am trying to run Cassandra Server on my Windows 10 machine. In this machinge:

Java: java version "1.8.0_202" Python: Python 2.7.16

Cassandra: apache-cassandra-3.11.11

Facing this problem

enter image description here enter image description here enter image description here

CodePudding user response:

Ok, I was able to get this to work.

I downloaded Apache Cassandra 3.11.11 on my Windows 10 machine, with a recent patch of Java 8. I untar'd it into a directory under my user (c:\Users\aploetz\local\). In trying to run it, I was greeted with one of the same errors I saw in your edit history:

WARNING! Powershell script execution unavailable.
   Please use 'powershell Set-ExecutionPolicy Unrestricted'
   on this user-account to run cassandra with fully featured
   functionality on this platform.

So, I found my local Windows Powershell in the Start menu, and was sure to select "Run as Administrator." With that window opened, I ran this command:

> set-executionpolicy -executionpolicy unrestricted

Not the most secure thing to do, but unfortunately Cassandra just won't run on Windows without that. From there, running cassandra from the bin directory worked.

TBH, this complexity is part of what drove Windows support to be dropped from the Apache Cassandra project. The easiest way to run Cassandra on Windows is via Docker or some other other containerization platform.

> docker pull cassandra:3.11
> docker run --name my-cassandra -d -p 9042:9042 cassandra:3.11

CodePudding user response:

To add to Aaron's response, 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!

  • Related