why "bash: cqlsh: command not found" - cassandra

I am running Cassandra 2.2.14 on a virtual machine (CentOS). The issue is that I cannot run the command "cqlsh" to create tables and keyspaces.
when I was tipping at the terminal:
cqlsh localhost ks-schema-local.cql
bash shell :
bash: cqlsh: command not found
cf) java version:
openjdk version "1.8.0_201"
OpenJDK Runtime Environment (build 1.8.0_201-b09)
OpenJDK 64-Bit Server VM (build 25.201-b09, mixed mode)
How can I solve this issue?

is cassandra installation directory is in your classpath?, add cassandra bin directory to your classpath, or execute from bin location.

First install Cassandra to your computer, then go to bin directory and type:
./cqlsh
It should work if Cassandra is running in the default port (9160).

Related

Kafka on RHEL gives me "Classpath Is Empty"

I'm trying to install Kafka 2.6.0 on a Red Hat VM. When I try to start Zookeeper, I get:
"Classpath is empty. Please build the project first..."
I have the following Java Version, which is Java 8 as far as I understand:
openjdk version "1.8.0_171"
OpenJDK Runtime Environment (build 1.8.0_171-b10)
OpenJDK 64-Bit Server VM (build 25.171-b10, mixed mode)
Is there something I need to do to set a "Classpath" environment variable?
I updated .bashrc for my users and the Classpath error went away.
Source: https://computingforgeeks.com/how-to-set-java_home-on-centos-fedora-rhel

How do I fix JavaFX runtime components are missing?

I have the following installed on Ubuntu 18.04.1 LTS:
openjdk version "10.0.2" 2018-07-17
OpenJDK Runtime Environment (build 10.0.2+13-Ubuntu-1ubuntu0.18.04.1)
OpenJDK 64-Bit Server VM (build 10.0.2+13-Ubuntu-1ubuntu0.18.04.1, mixed mode)
javafx.runtime.version=8.0.161
javafx.runtime.build=b00
However I try to run the sample java application that uses javafx I get the following error:
$ java -jar Untitled.jar
Error: JavaFX runtime components are missing, and are required to run this application
I have tried to run it in Eclipse, Intelli, and in the terminal with the same error.
I have set the classpath
:~$ echo $CLASSPATH
/usr/share/java/openjfx/jre/lib/ext/jfxrt.jar:.
I have copied all of the javafx files to the current directory.
I have tried everything I can find on the internet.
Does anyone know how to fix this?
On Ubuntu 18.04 with openjdk-11-jre and openjfx installed you could use:
% java --module-path /usr/share/openjfx/lib --add-modules ALL-MODULE-PATH \
-jar Untitled.jar
There is more information on how to run JavaFX programs at the openjfx.io site.

bash: bin/hadoop: No such file or directory(hadoop 2.7.3 on ubuntu 16.04)

I tried installing hadoop 2.7.3 on ubuntu 16.04 desktop.
I installed java and checked it's version as:
hadoop#ubuntu:~$ java -version
openjdk version "1.8.0_91"
OpenJDK Runtime Environment (build 1.8.0_91-8u91-b14-3ubuntu1~16.04.1-b14)
OpenJDK Server VM (build 25.91-b14, mixed mode)
I set JAVA_HOME in bashrc as:
#HADOOP VARIABLES START
export JAVA_HOME=/usr/lib/jvm/java-1.8.0-openjdk-i386
export HADOOP_HOME=/home/hadoop/hadoop
export PATH=$PATH:$HADOOP_HOME/bin:$HADOOP_HOME/sbin
and executed:
$ source ~/.bashrc
then i edited the hadoop-env.sh as:
# The java implementation to use.
export JAVA_HOME="/usr/lib/jvm/java-1.8.0-openjdk-i386"
My java file location is:
then when i tried the command bin/hadoop it shows following error:
hadoop#ubuntu:~$ bin/hadoop
bash: bin/hadoop: No such file or directory
I don't know what to do.
These:
export HADOOP_HOME=/home/hadoop/hadoop
^^^^
hadoop#ubuntu:~$ bin/hadoop
^
You're in the ~ dir (home) directory, so effectively your command is
/home/hadoop/bin/hadoop
when it should be
/home/hadoop/hadoop/bin/hadoop
aka
$ hadoop/bin/hadoop

Cassandra Not Starting Up

[root#PPWFMD509 bin]# ./cassandra -f
Unrecognized VM option 'StringTableSize=1000003'
Could not create the Java virtual machine.
running on jdk1.6_11 version.
If it is Cassandra 2 then it needs JDK 1.7.

Got "neo4j: command not found" error when installing Neo4j on Linux machine

I tried to install Neo4j1.9.2 on an Ubuntu machine. I downloaded neo4j-community-1.9.2-unix.tar.gz from Neo4j.org and unzipped it. The neo4j file is in the bin directory.
In bin directory, I typed command "neo4j start", got error "neo4j: command not found". I also tried command "sudo neo4j install", after I provided the password, I got same error "neo4j: command not found".
Java has been installed on this machine:
java version "1.6.0_27"
OpenJDK Runtime Environment (IcedTea6 1.12.5) (6b27-1.12.5-0ubuntu0.12.04.1)
OpenJDK 64-Bit Server VM (build 20.0-b12, mixed mode)
You probably don't have . in your PATH, so you need to do ./neo4j start.
If you install neo4j on your system using a package manager (mine is on gentoo using the portage overlay) the command is under /etc/init.d/neo4j. I found these useful in gentoo.
rc-service neo4j start
rc-update add neo4j default
The shell is on the path for all users, but the service is not on the path. This is the case for most services in most linux distributions, unless you have a DIY install.
You can start the neo4j server with:
service neo4j-service start
But, if you are able to access localhost:7474, then the server has already been started. You can check the status with:
service neo4j-service status

Resources