Boris Pitel
Boris Pitel

Reputation: 21

Cassandra nodetool throws java exception

I am just started with Cassandra. Installed it to on my Ubuntu laptop. Had some problems with incopatibility between Cassandra version and JVM versions Looks like i fixed them by poking into config files.

So Cassandra itself is running, i can run cqlsh create tabkes, select etc .

But nodetool gives me an error:

error: null

-- StackTrace --

java.lang.NullPointerException
        at org.apache.cassandra.config.DatabaseDescriptor.getDiskFailurePolicy(DatabaseDescriptor.java:1881)
        at org.apache.cassandra.utils.JVMStabilityInspector.inspectThrowable(JVMStabilityInspector.java:82)
        at org.apache.cassandra.io.util.FileUtils.<clinit>(FileUtils.java:79)
        at org.apache.cassandra.utils.FBUtilities.getToolsOutputDirectory(FBUtilities.java:824)
        at org.apache.cassandra.tools.NodeTool.printHistory(NodeTool.java:200)
        at org.apache.cassandra.tools.NodeTool.main(NodeTool.java:168)

My details are:

openjdk version "10.0.2" 2018-07-17; [cqlsh 5.0.1 | Cassandra 3.11.3 | CQL spec 3.4.4 | Native protocol v4]

Can somebody help me,

Upvotes: 0

Views: 1499

Answers (2)

Richard Bradley Smith
Richard Bradley Smith

Reputation: 341

I went to

http://thelastpickle.com/blog/2018/08/16/java11.html

used JAVA_HOME and JAVA8_HOME as described with the latest versions of Java8/11.

Happy to report the ANT build (my first) worked with some minor effort and I now have a usable NODETOOL with Cassandra 4. This, I think, is a much better result than spending lots of time trying to get it to work on older versions.

> INFO  [main] 2019-02-22 19:33:49,045 StorageService.java:1446 -
> JOINING: Finish joining ring INFO  [main] 2019-02-22 19:33:49,735
> StorageService.java:2289 - Node /192.168.1.5 state jump to NORMAL
server@think:/usr/local/c4/cassandra$ bin/nodetool netstats
Mode: NORMAL
Not sending any streams.
Read Repair Statistics:
Attempted: 0
Mismatch (Blocking): 0
Mismatch (Background): 0
Pool Name                    Active   Pending      Completed   Dropped
Large messages                  n/a         0              0         0
Small messages                  n/a         0              0         0
Gossip messages                 n/a         0              0         0

Upvotes: 0

Chris Lohfink
Chris Lohfink

Reputation: 16420

Java 10 is not supported with Cassandra 3.11. For anything beyond Java 8 you need to use C* 4.0+ (unreleased at the moment) or trunk. CASSANDRA-9608 introduced support for Java 9 to 11. Parts may work but if you are running it you can expect issues.

Upvotes: 3

Related Questions