I'm afraid I get the same error when navigating to /usr/bin and running ./nodetool help
I'm definitely running Java 8 and Cassandra 3.11.4. I'm wondering if I did something when installing Oracle Java 11 to run Hadoop that is interfering, but that's all under another username. There is nothing java-related in my .bashrc or .bash_profile. (Maybe there should be?) On Wed, Apr 3, 2019 at 12:38 PM Paul Chandler <p...@redshots.com> wrote: > On further reading it does look like there may be a problem with your Java > setup, as others are reporting this with Java 9 and above. > > You could try the 3rd answer here and see if this helps: > https://stackoverflow.com/questions/48193965/cassandra-nodetool-java-lang-nullpointerexception > > > > On 3 Apr 2019, at 16:55, David Taylor <prooffrea...@gmail.com> wrote: > > Hi Paul thanks for responding. > > I created a ~/.cassandra directory and chmodded it to 777 > > in /var/log/cassandra/system.log the only non-INFO items are: > WARN [main] 2019-04-03 11:47:54,172 StartupChecks.java:136 - jemalloc > shared library could not be preloaded to speed up memory allocations > WARN [main] 2019-04-03 11:47:54,172 StartupChecks.java:169 - JMX is not > enabled to receive remote connections. Please see cassandra-env.sh for more > info. > > Indeed, I meant nodetool, not nodetest. > > Running nodetool status (or nodetool --help) results in the same stack > trace as before. > > On Wed, Apr 3, 2019 at 11:34 AM Paul Chandler <p...@redshots.com> wrote: > >> David, >> >> When you start cassandra all the logs go to system.log normally in the >> /var/log/cassandra directory, so you should look there once it has started, >> to check everything is ok. >> >> I assume you mean you ran nodetool status rather than nodetest. >> >> The nodetool command stores a history of commands in the directory >> ~/.cassandra, and from the stack trace you supply it looks like it is >> failing to create that directory. So I would check the file system >> permissions there. >> >> Thanks >> >> Paul Chandler >> >> >> On 3 Apr 2019, at 15:15, David Taylor <prooffrea...@gmail.com> wrote: >> >> I am running a System87 Oryx Pro laptop with Ubuntu 18.04 >> >> I had only Oracle Java 11 installed for Hadoop, so I also installed >> OpenJDK8 with: >> $ sudo apt-get install openjdk-8-jre >> and switched to it with >> $ sudo update-java-alternatives --set >> path/shown/with/"update-java-alternatives --list" >> >> $ java-version >> openjdk version "1.8.0_191" >> OpenJDK Runtime Environment (build >> 1.8.0_191-8u191-b12-2ubuntu0.18.04.1-b12) >> OpenJDK 64-Bit Server VM (build 25.191-b12, mixed mode) >> >> I installed Cassandra according to the directions on >> http://cassandra.apache.org/doc/latest/getting_started/installing.html, >> using the "Install from debian packages" instructions. >> >> Now when I run >> $ sudo service cassandra start >> There are no errors, no feedback to stdout. I assume that's expected >> behavior? >> >> However, this fails: >> $ nodetest status >> error: null >> -- StackTrace -- >> java.lang.NullPointerException >> at >> org.apache.cassandra.config.DatabaseDescriptor.getDiskFailurePolicy(DatabaseDescriptor.java:1892) >> 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:860) >> at org.apache.cassandra.tools.NodeTool.printHistory(NodeTool.java:200) >> at org.apache.cassandra.tools.NodeTool.main(NodeTool.java:168) >> >> Can anyone help me fix this? >> >> >> >