Spearfisher
Spearfisher

Reputation: 8783

Running Cassandra on Mac OS X

I am trying to run Cassandra on my mac. I installed it following the steps detailed here: http://www.datastax.com/docs/1.0/getting_started/install_singlenode_root

but when I run:

bin/nodetool ring –h localhost

I get the following error message:

Class JavaLaunchHelper is implemented in both 
/Library/Java/JavaVirtualMachines/jdk1.8.0_25.jdk/Contents/Home/bin/java and 
/Library/Java/JavaVirtualMachines/jdk1.8.0_25.jdk/Contents/Home/jre/lib/libinstrument.dylib. One of the two will be used. Which one is undefined.

How can I make cassandra work?

Many thanks

Upvotes: 1

Views: 2672

Answers (3)

unds
unds

Reputation: 179

This is problem with jdk version, so you have to do the following

  1. unset JAVA_HOME from your terminal.
  2. edit nodetool and assign JAVA variable with jdk version less than jdk7.

    JAVA = /Library/Java/JavaVirtualMachines/jdk1.6.0_xx.jdk/Contents/Home/bin/java
    
  3. then run nodetool, you should be able to go without any issue.

Upvotes: 0

catpaws
catpaws

Reputation: 2283

You are using ancient docs. On a recent version of Cassandra, run the command like this:

bin/nodetool -h localhost ring (see http://www.datastax.com/documentation/cassandra/2.1/cassandra/tools/toolsRing.html)

If you installed vnodes (the default), use nodetool status for an easier-to-read output.

Please use these docs or the docs that match your installation, I doubt you installed Cassandra 1.0. Please check the installation instructions that match the version you downloaded.

CORRECTION: the nodetool ring command worked for me using options in any position on 2.0.10:

bin/nodetool -h localhost ring

bin/nodetool ring -h localhost

and using --h instead of -h

Upvotes: 1

Chiron
Chiron

Reputation: 20245

It is a known bug in the JDK but it is not going to stop you from running Cassandra.
What you can do is to set JAVA_HOME variable explicitly.

It will not solve the bug, but it might remedy the error.

Upvotes: 1

Related Questions