2

Installed DataStax 4.8.11 on Ubuntu 14.04 (Sparks/Analytics mode) using the Installer, the install was successful, but the start fails. JAVA is installed and in PATH etc but Cassandra unable to find:

@ubuntu:~/Downloads$ sudo service dse start
Java executable not found (hint: set JAVA_HOME)
@ubuntu:~/Downloads$ echo $JAVA_HOME
/opt/jdk1.8.0_111
@ubuntu:~/Downloads$ java -version
java version "1.8.0_111"
Java(TM) SE Runtime Environment (build 1.8.0_111-b14)
Java HotSpot(TM) 64-Bit Server VM (build 25.111-b14, mixed mode)

Thanks

Sam-T
  • 1,877
  • 6
  • 23
  • 51
  • @Alexander I perhaps dont have multiple java versions (I cant ever be completely sure on Linux) ~$ sudo update-alternatives --config java update-alternatives: error: no alternatives for java Based on the link I tried multiple alternative for PATH etc/environment (original setup), then .bashrc (Both did not work). Then added PATH to .profile - now I cant even login into the machine – Sam-T Nov 21 '16 at 18:33
  • Reconfirming I just have 1 version of Java, and JAVA_HOME is correctly setup. So likely something to do with DataStax install (??) – Sam-T Nov 21 '16 at 23:34

2 Answers2

1

The only way I have been able to make it work is by setting Env in the command itself as follows:

sudo env PATH="$PATH" service dse start

So for all dse commands I need to set PATH - kinda cumbersome.

This has something to do with Environment variables when run with 'sudo' (whatever). (Thanks to Ubuntu forum). I would have expected the Datastax 'Installer' to take care of all this.

The installer does a very poor job, and also does not set DSE or CASSANDRA HOME, does not put anything in PATH. And also the documentation is wrong - per docs the binary files should be in /usr/bin but they actually are in /usr/share/dse/bin (it takes a little bit of doing to actually find this location).

@DataStax you guys can try see what the issue is and try fix. This type of installation (basic default) shouldn't turn out to a research project- especially when I am using the "Installer". (took me all of 2 days).

Community
  • 1
  • 1
Sam-T
  • 1,877
  • 6
  • 23
  • 51
0

I added JAVA_HOME=/usr/lib/java to the appropriate locations in the following files:

  • /etc/default/dse
  • /etc/dse/*.sh

Another thing to be aware of is that after doing /etc/init.d/dse restart the services will take a while to appear.

Also [1] is handy.

[1] what is the reason for the existence of the JAVA_HOME environment variable?

Community
  • 1
  • 1
Sonia Hamilton
  • 4,229
  • 5
  • 35
  • 50