Not able to work with Cassandra
While trying to work with cassandra , the above error is getting displayed. Power Shell - Unrestricted Mode , Environmental Variable - Checked , Path has been Provided correctly
Not able to work with Cassandra
While trying to work with cassandra , the above error is getting displayed. Power Shell - Unrestricted Mode , Environmental Variable - Checked , Path has been Provided correctly
On
Even though Windows was a supported platform for Apache Cassandra versions between 2.2 and 4.0, as is your case, you'll have a more easily configurable, performant, and stabler experience with Apache Cassandra in Linux.
If you want to use Cassandra beyond testing purposes, consider the following update notes introduced in 4.0:
- Due to the lack of maintenance and testing, Windows support is removed from this version onward. The developers who use Windows 10 still can run Apache Cassandra locally using WSL2 (Windows Subsystem for Linux version 2), Docker for Windows, or virtualization platform like Hyper-V and VirtualBox.
With that said, it seems that the specified path to the cassandra.ps1 is incorrect.
I can't tell what's the actual location in your environment, but it's probably in C:\apache-cassandra-3.0.29\bin\cassandra.ps1 instead of C:\apache-cassandra-3.0.29\bin\bin\cassandra.ps1 which is the path the init script is looking for.
If that's the case, try setting the ENV variable CASSANDRA_HOME to C:\apache-cassandra-3.0.29, and that should resolve your issue based on cassandra.bat:
powershell /file "%CASSANDRA_HOME%\bin\cassandra.ps1" %*
Alternatively you can try starting Cassandra from C:\apache-cassandra-3.0.29\ because if you don't specify CASSANDRA_HOME, your working directory will be assigned to it:
if NOT DEFINED CASSANDRA_HOME set CASSANDRA_HOME=%CD%
I hope this helps. I never used Cassandra on Windows, although I tried to when I was learning it, to no avail. I do not recommend it, even if you get through the complications or getting it to work :)
On
Running Cassandra on premise is coming with many challenge, since everyone moving to cloud based managed service, you can check out AstraDB (https://astra.datastax.com/) (managed Cassandra service on cloud) with many apis support as well.
Windows is not a supported OS for installing Cassandra®. Try leveraging Windows Subsystem for Linux (WSL) or use Docker on your Windows machine. Even better, if it is an accepted deployment type, you could leverage a fully managed service such as but not limited to DataStax Astra DB, a fully managed serverless DBaaS, powered by C*, Azure Managed Instances, Amazon Keyspaces, etc.,