You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@cassandra.apache.org by David Taylor <pr...@gmail.com> on 2019/04/03 14:15:07 UTC
New user on Ubuntu 18.04 laptop, nodetest status throws NullPointerException
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?
Re: New user on Ubuntu 18.04 laptop, nodetest status throws NullPointerException
Posted by David Taylor <pr...@gmail.com>.
My users has permissions to read everything in /etc/cassandra.
However, it gave me an idea. When I run sudo nodetool status, it works, I
get the "UN" status.
Not sure if this permissions issue will interfere with my use of Cassandra
or not. Do I have to change the permissions of the /usr/bin/nodetool
executable? It's currently -rwxr-xr-x which looks right to me
On Wed, Apr 3, 2019 at 12:16 PM Oleksandr Shulgin <
oleksandr.shulgin@zalando.de> wrote:
> On Wed, Apr 3, 2019 at 4:23 PM David Taylor <pr...@gmail.com>
> wrote:
>
>>
>> $ nodetest status
>> error: null
>> -- StackTrace --
>> java.lang.NullPointerException
>> at
>> org.apache.cassandra.config.DatabaseDescriptor.getDiskFailurePolicy(DatabaseDescriptor.java:1892)
>>
>
> Could it be that your user doesn't have permissions to read the config
> file in /etc?
>
> --
> Alex
>
>
Re: New user on Ubuntu 18.04 laptop, nodetest status throws NullPointerException
Posted by Oleksandr Shulgin <ol...@zalando.de>.
On Wed, Apr 3, 2019 at 4:23 PM David Taylor <pr...@gmail.com> wrote:
>
> $ nodetest status
> error: null
> -- StackTrace --
> java.lang.NullPointerException
> at
> org.apache.cassandra.config.DatabaseDescriptor.getDiskFailurePolicy(DatabaseDescriptor.java:1892)
>
Could it be that your user doesn't have permissions to read the config file
in /etc?
--
Alex
Re: New user on Ubuntu 18.04 laptop, nodetest status throws NullPointerException
Posted by David Taylor <pr...@gmail.com>.
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 <pa...@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 <pr...@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 <pa...@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 <pr...@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?
>>
>>
>>
>
Re: New user on Ubuntu 18.04 laptop, nodetest status throws
NullPointerException
Posted by Paul Chandler <pa...@redshots.com>.
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 <pr...@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 <paul@redshots.com <ma...@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 <prooffreader@gmail.com <ma...@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 <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?
>>
>
Re: New user on Ubuntu 18.04 laptop, nodetest status throws NullPointerException
Posted by David Taylor <pr...@gmail.com>.
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 <pa...@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 <pr...@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?
>
>
>
Re: New user on Ubuntu 18.04 laptop, nodetest status throws
NullPointerException
Posted by Paul Chandler <pa...@redshots.com>.
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 <pr...@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 <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?
>