cassandra 2 complaining about Java 7 when I have Java 7 installed

前端 未结 8 931
不思量自难忘°
不思量自难忘° 2021-01-22 09:26
$ cassandra 
Cassandra 2.0 and later require Java 7 or later.

OK, what\'s going on in that part of the init script?

java_ver_output=`\         


        
相关标签:
8条回答
  • 2021-01-22 09:57

    See this CASSANDRA-11716 issue. The solution posted there worked for me.

    0 讨论(0)
  • 2021-01-22 10:03

    To resolve this problem I changed $JAVA_HOME environment variable to the path I found it from:

    System Preferences -> Java -> java (tab in Java Control Panel) -> View -> Path
    

    I had two version of java and the default one was the old version of java.

    0 讨论(0)
  • 2021-01-22 10:06

    There appears to be a newer issue now that Java 7 update 101 has been released. I installed this version which broke Cassandra:

    yum install java-1.7.0-oracle-1.7.0.101-1jpp.1.el7.x86_64
    

    Installing a previous version (update 99) fixed the issue:

    yum install java-1.7.0-oracle-1.7.0.99-1jpp.1.el7.x86_64
    

    I'm guessing somewhere in the cassandra startup script a Regex is written for 2 characters in the update version, not 3.

    0 讨论(0)
  • 2021-01-22 10:09

    Nothing above worked for me.I was trying to run cassandra with supervisor and was getting java error.So I figured out that I had to just set java path in cassandra.in.sh. I just had to set JAVA_HOME=/usr/local/jdk1.8.0_171 and save it and this worked for me.

    0 讨论(0)
  • 2021-01-22 10:14

    I have faced a similar issue when installing DSE 4.6 on Linux. Issue is resolved when you set JAVA_HOME (as root) to the directory where JRE 1.7.x installed.

    0 讨论(0)
  • 2021-01-22 10:14

    This is caused by a bug in Cassandra: https://issues.apache.org/jira/browse/CASSANDRA-11661

    0 讨论(0)
提交回复
热议问题