cassandra-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Jonathan Ellis (JIRA)" <j...@apache.org>
Subject [jira] [Updated] (CASSANDRA-2992) Cassandra doesn't start on Red Hat Linux due to hardcoded JAVA_HOME
Date Mon, 08 Aug 2011 13:12:27 GMT

     [ https://issues.apache.org/jira/browse/CASSANDRA-2992?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]

Jonathan Ellis updated CASSANDRA-2992:
--------------------------------------

          Component/s: Packaging
             Priority: Minor  (was: Major)
    Affects Version/s:     (was: 0.8.3)
                       0.8.4
        Fix Version/s:     (was: 0.8.3)
                       0.8.4

Note that CASSANDRA-2785 was reverted for the second 0.8.3 vote, so I'm updating both affects
and fix-for versions to 0.8.4.

> Cassandra doesn't start on Red Hat Linux due to hardcoded JAVA_HOME
> -------------------------------------------------------------------
>
>                 Key: CASSANDRA-2992
>                 URL: https://issues.apache.org/jira/browse/CASSANDRA-2992
>             Project: Cassandra
>          Issue Type: Bug
>          Components: Packaging
>    Affects Versions: 0.8.4
>         Environment: CentOS release 5.6
>            Reporter: Taras Puchko
>            Assignee: paul cannon
>            Priority: Minor
>             Fix For: 0.8.4
>
>         Attachments: 0001-don-t-hardcode-JAVA_HOME-in-redhat-initscript.patch.txt
>
>
> On CentOS /etc/init.d/cassandra has
> bq. export JAVA_HOME=/usr/lib/jvm/java-1.6.0-openjdk-1.6.0.0/
> While there is no such a directory on our server it was ok for 0.8.2, because /usr/sbin/cassandra
checked the executable
> {quote}
> if [ -x $JAVA_HOME/bin/java ]; then
>     JAVA=$JAVA_HOME/bin/java
> else
>     JAVA=`which java`
> fi
> {quote}
> But 0.8.3 builds replaced the above code with one that doesn't check if JAVA_HOME is
set correctly.
> {quote}
> if [ -n "$JAVA_HOME" ]; then
>     JAVA="$JAVA_HOME/bin/java"
> else
>     JAVA=java
> fi
> {quote}
> That's why cassandra doesn't start anymore.
> The correct fix would be to remove "export JAVA_HOME" from /etc/init.d/cassandra or set
it only to correct path and only if it hasn't already been set.
> It would also be nice to revert to "[ -x $JAVA_HOME/bin/java ]" in /usr/sbin/cassandra

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

Mime
View raw message