Issue with the release of Cassandra

Follow the instructions to install the latest apache-cassandra build. When I first start (./cassandra -f), I get the following:

Exception in thread "main" java.lang.NoClassDefFoundError: org/apache/cassandra/thrift/CassandraDaemon Caused by: java.lang.ClassNotFoundException: org.apache.cassandra.thrift.CassandraDaemon at java.net.URLClassLoader$1.run(URLClassLoader.java:217) at java.security.AccessController.doPrivileged(Native Method) at java.net.URLClassLoader.findClass(URLClassLoader.java:205) at java.lang.ClassLoader.loadClass(ClassLoader.java:321) at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:294) at java.lang.ClassLoader.loadClass(ClassLoader.java:266) at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:334) Could not find the main class: org.apache.cassandra.thrift.CassandraDaemon. Program will exit. 

I exported the JAVA_HOME path, etc. What am I doing wrong? I should note that I am on a Ubuntu Lucid machine.

+4
source share
4 answers

If you are using Ubuntu (Lucid), use the tutorial here: http://dustyreagan.com/installing-cassandra-on-ubuntu-linux/ , which is based on the debian package. The line from Git does not work.

+1
source

The first thing you need to do is set the path CASSANDRA_HOME to the root directory of Cassandra. Try running cassandra cassandra -f and everything will work smoothly. (Cassandra actually checks the CASSANDRA_HOME environment variable to find the lib folder to run the deamon).

+4
source

This answer can help you if you do not need a technical build from the source code, and if you are just starting with a new installation of Cassandra, and not updating the existing one.

I had the same problem when building from source code. To get around this, I used the development construct from the "Latest Builds (Hudson)" link http://cassandra.apache.org/download/ here.

The next problem that you will encounter is that no clusters will be installed during the new installation. To get around this problem, you can use the latest version 0.6.3. This solution did not work for me because I wanted to use Pycassa, which needs 0.7.

So I needed to take the following steps:

Launch the JMX console. Personally, I do not have a server running Cassandra, so I needed to use ssh tunnels, for example:

  jconsole -J-DsocksProxyHost = localhost -J-DsocksProxyPort = 1080

Then used this funky URL to connect:

  service: jmx: rmi: /// jndi / rmi: //my.hostname.com: 8080 / jmxrmi 

Then on the left side

  • expand org.apache.cassandra.service
  • expand Storage Service expand Operations
  • select loadSchemaFromYAML
  • In the upper right corner, click the loadSchemaFromYAML button to call it.

You can use the same steps to add new keyspaces during development as soon as you figure out how you want your circuit to look. But the above steps only work if you have no data. Thus, you must delete all your data using rm / var / lib / cassandra / * after removing the server. (Of course, you can take other steps that are harder to transfer data without destroying them.)

I understand that you did not ask about creating key spaces, but in the trunked version of cassandra, if you are just starting out, that will be the next problem. I just spent the day deciding this and hope this helps.

+1
source

Can you provide more details? Are you using ubuntu Open JDK 6? In addition, you do not need to build from source code. Just get the binary from the following URL: http://mirror.nexcess.net/apache/cassandra/1.1.2/apache-cassandra-1.1.2-bin.tar.gz

-1
source

Source: https://habr.com/ru/post/1316304/


All Articles