incubator-cassandra-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jonathan Ellis <jbel...@gmail.com>
Subject Re: I got an error message when I ran Cassandra 0.8.0-beta1 on Ubuntu.
Date Wed, 04 May 2011 03:15:05 GMT
https://issues.apache.org/jira/browse/CASSANDRA-2499

On Tue, May 3, 2011 at 9:34 PM, Huang Stanley <wenlien1001@gmail.com> wrote:
> Hi All:
> When I try to run Cassandra 0.8.0-beta1 on Ubuntu, I got an error message.
>
> ./../conf/cassandra-env.sh: 99: [[: not found
>
> Then I check the source as below:
> ---------------------------------------------------------------------------------------------------------------
> java_version=`java -version 2>&1`
> if [[ $java_version != *OpenJDK* ]]
> then
>    JVM_OPTS="$JVM_OPTS -javaagent:$CASSANDRA_HOME/lib/jamm-0.2.1.jar"
> fi
> ---------------------------------------------------------------------------------------------------------------
>
> At the mean while, I ran it with debug mode and got the following message
> ---------------------------------------------------------------------------------------------------------------
> java_version=`java -version 2>&1`
> + java -version
> + java_version=java version "1.6.0_20"
> OpenJDK Runtime Environment (IcedTea6 1.9.7) (6b20-1.9.7-0ubuntu1~10.04.1)
> OpenJDK Server VM (build 19.0-b09, mixed mode)
> if [[ $java_version != *OpenJDK* ]]
> then
>    JVM_OPTS="$JVM_OPTS -javaagent:$CASSANDRA_HOME/lib/jamm-0.2.1.jar"
> fi
> + [[ java version "1.6.0_20" OpenJDK Runtime Environment (IcedTea6 1.9.7)
> (6b20-1.9.7-0ubuntu1~10.04.1) OpenJDK Server VM (build 19.0-b09, mixed mode)
> != *OpenJDK* ]]
> ./cassandra-env.sh: 1: [[: not found
> ---------------------------------------------------------------------------------------------------------------
>
> I think this section of codes might want to check java version but get an
> error.
> Therefore, I recommended to change this code to:
> ---------------------------------------------------------------------------------------------------------------
> [ `java -version 2>&1 | grep -c OpenJDK` -gt 0 ] && isOpenJDK=1 ||
> isOpenJDK=0
> if [ $isOpenJDK -eq 1 ]
> then
>    JVM_OPTS="$JVM_OPTS -javaagent:$CASSANDRA_HOME/lib/jamm-0.2.1.jar"
> fi
> ---------------------------------------------------------------------------------------------------------------
>
> regards,
>
> Stanley Huang
>



-- 
Jonathan Ellis
Project Chair, Apache Cassandra
co-founder of DataStax, the source for professional Cassandra support
http://www.datastax.com

Mime
View raw message