How can i fix the error when starting cqlsh - cassandra

it's my first time using Cassandra and when I try to run "CQLSH" command I get error like this.
C:\Users\RanggaSaputra>cqlsh
File "C:\apache-cassandra-3.11.14\bin\cqlsh.py", line 146
except ImportError, e:
^^^^^^^^^^^^^^
my device is windows 11
I've tried following the advice from YouTube trying to change the start_rpc and enable_user variables to true.

What version of python do you use? I believe you'll want version 2.7 for Cassandra 3.11 as specified here:
https://cassandra.apache.org/doc/3.11/cassandra/getting_started/installing.html
Not having the proper version is likely the issue.

Related

Sonarqube rule| Using command line arguments is security-sensitive for Python Application

I want to use the command line arguments for one of my application, But Sonarqube is showing the code issue and recommending to sanitize it. Can anyone suggest how to resolve this ?
Sonarqube is showing issue in this line -
execute_from_command_line(sys.argv)
I already tried putting sys.argv in some variable and then using it function calls. But it didn't helped.
I am using following versions:
Python : 3.9.10
Sonar-Scanner : 4.6.2.2472
For safety purposes, always check that only expected or allowed commands are coming from
sys.argv .
If anyother command is passed, do not execute those commands.
Even if you add the above validation, sonarqube might throw error.
In the sonar rule doc, it is mentioned that this rule will be deprecated in future.

My IMAC 27" points to python2.7 how to update

I have installed the latest version of python3 and it shows in my application folder, but when I use the command line and ask for the version it is the factory version of 2.7. How do I change this for someone who is really basic with command line and other. I have read other posts and what to put in the command line exactly but get syntax errors. I heard about brew. Why is it so hard to do something so simple. Can I just change the command line to point to the new python3 automatically without using another 3rd party thing. Hope you can help and sorry for frustration.

bash: /home/linuxbrew/.linuxbrew/bin/mongo: Permission denied [MongoDB 4.4 set up on AWS cloud 9 IDE]

I'm trying to install Mongodb version 4.4 on a AWS IDE (using a Mac and Ubuntu set up). I receive the following error message:
bash: /home/linuxbrew/.linuxbrew/bin/mongo: Permission denied
It seems it's a permission issue, however I have no idea to to rectify this. Any ideas or steps to take to resolve this?
it seems there is already a discussion about this error on the MongoDB forum.
Here is the link
They closed it as Won't fix.
The final answer was provided by Mathew Robinson as:
Closing this as Won't Fix, it seems that Linuxbrew is a very small
subset of homebrew users and we support from source builds as well as
Linux packages for all distributions we support.
In the case of Linuxbrew it would just be a way to run our from source
builds that we already document how to do.
I have the same problem
the problem is that you use homebrew and the files are in a restricted area which means Linux can't modify it.
I solved it by:
full this guide to Install MongoDB Community Edition :
https://docs.mongodb.com/manual/tutorial/install-mongodb-on-ubuntu/
then, instead of using mongod use mongosh which allows you to add data to the table.
I tried mongod and it never works and I don't know why.
it give aborting after fassert() failure\n\n"} so mongosh work fine.

Issue while starting Cassandra 3.11.2 due to space in installation path

We recently upgraded from Cassandra version 3.11 to 3.11.2 and we are facing an issue in starting Cassandra. We have a space in our path where we install Cassandra like :
C:\Program Files\XYZ Software\cassandra
which gives me the following error
Error: Could not find or load main class Files\XYZ
Any pointers at resolving this ?
Seems like there is a bug in cassandra`s cassandra-env.ps1 script.
Open cassandra-env.ps1 present under cassandra_home/conf and check line number 380 where it is setting up JVM_OPTS.
This trick worked for me when I replace line here
From:
$env:JVM_OPTS = "$env:JVM_OPTS -XX:CompileCommandFile=$env:CASSANDRA_CONF\hotspot_compiler"
To:
$env:JVM_OPTS = "$env:JVM_OPTS -XX:CompileCommandFile=""$env:CASSANDRA_CONF\hotspot_compiler"""
At other places this case was well handled.
Below is the issue created to get this fix in the future releases.
https://issues.apache.org/jira/browse/CASSANDRA-14418

Not able to execute groovy script from command ".GroovyRuntimeException: Conflicting module versions."

I have run groovy script for a while from command line. Recently I have started to work with spock/groovy in the eclipse. I have run couple of test using Groovy Console when console was loaded from eclipse. Any way after these activities I have tried to execute groovy from command line and it failed with the following error:
Caused by: groovy.lang.GroovyRuntimeException: Conflicting module versions. Module [groovy-xml is loaded in version 2.4.3 and you are trying to load version 2.4.1
I was using gvm tool to reinstall groovy and set is a primary version but still have the problem. Something was changed from eclipse where my groovy installation gets affected and can not be fixed by by reinstalling.
I have some search done but did not find solution. most solution were mentioning this problem but they were trying to fix this withing eclipse, where in my case I am trying to fix it outside of eclipse. Also will be nice if I be able to prevent this from happening in the future. If somebody have similar experience please share.
Thanks,
Alexander

Resources