DataStax Academy FAQ

DataStax Academy migrated to a new learning management system (LMS) in July 2020. We are also moving to a new Cassandra Certification process so there are changes to exam bookings, voucher system and issuing of certificates.

Check out the Academy FAQ pages for answers to your questions:


question

sonvaneshirish122_189460 avatar image
sonvaneshirish122_189460 asked ·

Getting NullPointerException when running nodetool status after installing Cassandra on Debian 10

Trying to install Cassandra on debian 10 buster on VM, but getting the following error.

root@shirish:~# nodetool status
error: null
-- StackTrace --
java.lang.NullPointerException
    at org.apache.cassandra.config.DatabaseDescriptor.getDiskFailurePolicy(DatabaseDescriptor.java:1955)
    at org.apache.cassandra.utils.JVMStabilityInspector.inspectThrowable(JVMStabilityInspector.java:82)
    at org.apache.cassandra.io.util.FileUtils.<clinit>(FileUtils.java:80)
    at org.apache.cassandra.utils.FBUtilities.getToolsOutputDirectory(FBUtilities.java:881)
    at org.apache.cassandra.tools.NodeTool.printHistory(NodeTool.java:213)
    at org.apache.cassandra.tools.NodeTool.execute(NodeTool.java:181)
    at org.apache.cassandra.tools.NodeTool.main(NodeTool.java:54)
cassandrainstallation
10 |1000 characters needed characters left characters exceeded

Up to 8 attachments (including images) can be used with a maximum of 1.0 MiB each and 10.0 MiB total.

1 Answer

Erick Ramirez avatar image
Erick Ramirez answered ·

@sonvaneshirish122_189460 The exception you posted indicates that there was an issue accessing the OS user's home directory using Java's IO utilities.

It's likely that you're running an unsupported version of Java and you need to install a TCK-compatible version of OpenJDK 8. Please provide the version of Cassandra and Java you have installed on the system so we have an idea of how you've configured your cluster. Cheers!

2 comments Share
10 |1000 characters needed characters left characters exceeded

Up to 8 attachments (including images) can be used with a maximum of 1.0 MiB each and 10.0 MiB total.

Thank you for your reply @Erick Ramirez


Java version:

root@shirish:~# java -version

openjdk version "11.0.6" 2020-01-14

OpenJDK Runtime Environment (build 11.0.6+10-post-Debian-1deb10u1)

OpenJDK 64-Bit Server VM (build 11.0.6+10-post-Debian-1deb10u1, mixed mode)


Cassandra version:

root@shirish:~# Cassandra -v

3.11.6

Also, I tried to install JDK 8 using sudo apt-get install openjdk-8-jre on Debian 10, however, got this error

root@shirish:~# sudo apt-get install openjdk-8-jre

Reading package lists... Done

Building dependency tree

Reading state information... Done

E: Unable to locate package openjdk-8-jre


0 Likes 0 · ·
Erick Ramirez avatar image Erick Ramirez ♦♦ sonvaneshirish122_189460 ·

You might not have the right sources so try to run an update. Otherwise, you need to look up how to install Java 8. Cheers!

P.S. I converted your post to a comment since it's not an "answer".

0 Likes 0 · ·