Issues with newest version (cassandra 1.15) - cassandra

I tried installing newest cassandra version using the tarball binary available at -
http://www.apache.org/dyn/closer.cgi?path=/cassandra/1.1.5/apache-cassandra-1.1.5-bin.tar.gz
I followed the instructions provided from the the getting started page.
But when i run cassandra by ./cassandra -f , i get the following error#
amt#amtlt2:~/Downloads/apache-cassandra-1.1.5/bin$ ./cassandra -f
xss = -ea -javaagent:./../lib/jamm-0.2.5.jar -XX:
+UseThreadPriorities-XX:ThreadPriorityPolicy=42 -Xms4G
Xmx4G -Xmn800M -XX:+HeapDumpOnOutOfMemoryError -Xss180k
P.S. i am installing on a server.
well i don,t have a problem with java because i am running the latest version and this version works in my other PC where cassandra is configured.
amt#amtlt2:~/Downloads/apache-cassandra-1.1.5/bin$ java -version
java version "1.6.0_24"
OpenJDK Runtime Environment (IcedTea6 1.11.4) (6b24-1.11.4-1ubuntu0.12.04.1)
OpenJDK 64-Bit Server VM (build 20.0-b12, mixed mode)
and i also feel its got nothing to do with heap size because its set to very high value
# The example HEAP_NEWSIZE assumes a modern 8-core+ machine for decent pause
# times. If in doubt, and if you do not particularly want to tweak, go with
# 100 MB per physical CPU core.
MAX_HEAP_SIZE="4G"
HEAP_NEWSIZE="800M"
the interesting thing is, if i follow same instructions and download the (unsupported) cassandra 1.12 release version. It works like a gem with same configuration as i did above.
Any help really appreciated.Point out in case i am doing something wrong here.

You don't actually have an error being logged. -XX:+HeapDumpOnOutOfMemoryError is actually a command-line option to the java command telling it to do a heap dump if it OOMs.

Related

ERROR DseModule.java:114 - Class not found: org/apache/lucene/uninverting/FieldCache. Exiting

My cassandra was working and suddenly I get the error
with 6.8 and I am using java 8
ERROR [main] 2022-03-19 21:27:23,812 DseModule.java:114 - Class not found: org/apache/lucene/uninverting/FieldCache. Exiting...
My java version
java -version java version "1.8.0_181" Java(TM) SE Runtime Environment (build 1.8.0_181-b13) Java HotSpot(TM) 64-Bit Server VM (build 25.181-b13, mixed mode)
I am running the command,
bin/dse cassandra
to start cassandra
I have tried removing cassandra and reinstalling. I even tried deleting the /var/lib/cassandra folder
The error on its own doesn't give us an indication of the problem. We need quite a bit more information including:
log files
cassandra.yaml and dse.yaml
OS platform and version
My suggestion is that you should log a ticket with DataStax Support so one of our engineers can assist you. Cheers!

Error installing Cassandra on Mac with Java 13

I am using macOS Mojave My Java version is 13.0
I am a beginner in Cassandra please help me to fix this I read lot of post regarding this error but all are old not working with the current version
webz$ java -version
java version "13.0.1" 2019-10-15
Java(TM) SE Runtime Environment (build 13.0.1+9)
Java HotSpot(TM) 64-Bit Server VM (build 13.0.1+9, mixed mode, sharing)
cassendra error :-
Webzs-MacBook-Pro:~ webz$ cassandra
Webzs-MacBook-Pro:~ webz$ [0.001s][warning][gc] -Xloggc is deprecated. Will use -Xlog:gc:/usr/local/cassandra/bin/../logs/gc.log instead.
Unrecognized VM option 'UseParNewGC'
Error: Could not create the Java Virtual Machine.
Error: A fatal exception has occurred. Program will exit.
In the jvm.options file of Cassandra, check if this is enabled.
-XX:+UseParNewGC
If yes, then you can comment that and replace with this
-XX:+UseG1GC
This is because support for UseParNewGC has been disabled in Java 10.
https://bugs.openjdk.java.net/browse/JDK-8151084
You may run into other issues also because of your java version as released versions of Cassandra support only Java 8. The support for higher versions will be in Cassandra 4.0 but that isn't released yet.
As it states in the Installation prerequisites, Cassandra 3.x (or earlier versions) only work with Java 8.
Cassandra 4.0.2 added full support for Java 11 only recently (CASSANDRA-16894). This means that C* 4.x will work with either Java 8 or Java 11.
Cassandra will not work with Java 13. For what it's worth, we are working on supporting Java 17 LTS in the next major release of Cassandra (CASSANDRA-16895). Cheers!

Cassandra does not start on Java 10

I have a brand new Windows 10 Home installation, with a brand-new installation of JDK 10.0.1 (which is what Oracle recommended when I went to the JDK download site.) I just now downloaded Cassandra 3.11.2, un-tar'd it, and put the bin directory on my classpath.
When I attempt to start Cassandra using the cassandra -f command, I get this error:
PS C:\javatools> cassandra -f
*---------------------------------------------------------------------*
*---------------------------------------------------------------------*
WARNING! Automatic page file configuration detected.
It is recommended that you disable swap when running Cassandra
for performance and stability reasons.
*---------------------------------------------------------------------*
*---------------------------------------------------------------------*
Failed 64-bit check. Re-running to get version from 32-bit
*---------------------------------------------------------------------*
*---------------------------------------------------------------------*
Cassandra 3.0 and later require Java 8u40 or later.
Java 10 is clearly "Java 8 rel 40 or later". I verified that I was, in fact, running the version of Java I thought I was:
PS C:\javatools> java -version
java version "10.0.1" 2018-04-17
Java(TM) SE Runtime Environment 18.3 (build 10.0.1+10)
Java HotSpot(TM) 64-Bit Server VM 18.3 (build 10.0.1+10, mixed mode)
How can I get Cassandra to recognize that I do, in fact, have "Java 8u40 or later"?
Cassandra does not support any Java release newer than Java 8.
References are as follows:
declined bug report against Java 9: CASSANDRA-9608
declined bug report against Java 10: CASSANDRA-14446
Furthermore, even though the documentation does indicate it's a "work in progress", it does indicate the following on the Getting Started page:
Prerequisites
The latest version of Java 8, either the Oracle Java Standard Edition
8 or OpenJDK 8. To verify that you have the correct version of java
installed, type java -version.
While it doesn't explicitly say "Java 9 and newer are not supported", this is apparently supposed to be inferred from this indicator.
Finally, the misleading error message appears to be a wontfix item.
I've managed to run cassandra 3.11.3 on java-11-openjdk-amd64 on localhost (ubuntu 18.04).
(Strangely, java -version shows openjdk version "10.0.1" 2018-04-17)
I tweaked a lot in jvm.options, because many gc options are not supported anymore, and ThreadPriorityPolicy could not be set to 42. (last thing is most annoying: it was really good compaction threads were low priority).
Also, to run nodetool I have to specify jvm 1.8 by JAVA_HOME.

Wrong JVM version for Jira

The problem appears on Linux CentOS 7 server. The service jira will start | stop but when I try to run config.sh I get an error, check-java.sh gives the same error .
The error reads like this:
No JRE_HOME or JAVA_HOME environment variable is set - attempting to just run java command
********** Wrong JVM version! You are running with .. but JIRA requires at least 1.8 to run. **********
openjdk version "1.8.0_151"
OpenJDK Runtime Environment (build 1.8.0_151-b12)
OpenJDK 64-Bit Server VM (build 25.151-b12, mixed mode)
When Running alternatives --config java I get the following:
There is 1 program that provides 'java'.
Selection Command
-----------------------------------------------
*+ 1 java-1.8.0-openjdk.x86_64 (/usr/lib/jvm/java-1.8.0-openjdk-1.8.0.151-1.b12.el7_4.x86_64/jre/bin/java)
Enter to keep the current selection[+], or type selection number:
The solutions tried were:
Modified /etc/environment JAVA_HOME to suit the location of java from jira's default setenv.sh location JAVA_HOME="/opt/atlassian/jira/jre/"; export JAVA_HOME. This solution makes service jira start | stop stop working.
Modified /etc/environment blindly to use every folder from /usr/lib/jvm
java
java-1.8.0
java-1.8.0-openjdk
java-1.8.0-openjdk-1.8.0.151-1.b12.el7_4.x86_64
java-openjdk
jre
jre-1.8.0
jre-1.8.0-openjdk
jre-1.8.0-openjdk-1.8.0.151-1.b12.el7_4.x86_64
jre-openjdk
Tried to update Java but Package 1:java-1.8.0-openjdk-devel-1.8.0.151-1.b12.el7_4.x86_64 already installed and latest version
Nothing to do.
The answer to the problem is comes like this.
Use the path JAVA_HOME="/opt/atlassian/jira/jre/" in /etc/environment
Command source /etc/environment to update the PATH
Do your business.
If to edit 'check-java.sh' file as follows:
java_version=14
echo $java_version
if [ $java_version -ne 8 ] && [ $java_version -ne 11 ] && [ $java_version -ne 14 ]
then
Jira v.8.4.1 is available for computations for Apple macOS Mojave 10.14.6 as in the local early access experiment for Java 14-ea.
After each update event of Jira version OR update event of Java JVM version (in case of update by substituting the whole either software folder) 'check-java.sh' file is better to be updated in those cases as well (also for automation scripts).
This approach with hard coding of the JVM version value for Jira script allows to run Jira version (at least 8.4.1) via newer JVM versions in experimental mode and along with other software as well at single JVM not only limited by and supported by 1.8 or 11 JVM versions without need to install and to maintain two several JVM versions (in case of folder installations) in experimental mode, if other software can use newer JVM, so more Jira data backups are better to apply in small data scoped setting in such mode of usage.

Error: Could not find or load main class org.apache.cassandra.service.CassandraDaemon

I want to try Cassandra. When trying to run Cassandra, writes an error:
Error: Could not find or load main class org.apache.cassandra.service.CassandraDaemon
What's the problem?
Java -version
Java version "1.7.0_67"
Java (TM) SE Runtime Environment (build 1.7.0_67-b01)
Java HotSpot (TM) 64-Bit Server VM (build 24.65-b04, mixed mode)
python --version
Python 2.7.8
You'll get that error when you've downloaded a source distribution of Cassandra but haven't built it or when the CassandraDaemon.class file isn't in your classpath.
For the first problem:
You'll need the JDK 1.7 (which you already have) and ant to build C*.
Navigate to wherever you've extracted cassandra (I'll use ~/cassandra for this explanation) , Run ant and enjoy the awesome.
For the second, if your classpath is setup incorrectly something has gone wrong in the build process or the classpath has been modified. I'd verify that the classpath is what is expected by displaying it in the startup script (the cassandra executable) by adding echo $CLASSPATH near the bottom of the script (in my case it was line 212 for C* 2.1.0).
P.S. On windows you'll need to set CASSANDRA_HOME before being able to run C*.

Resources