Return-Path: X-Original-To: apmail-cassandra-commits-archive@www.apache.org Delivered-To: apmail-cassandra-commits-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 3577461CF for ; Sat, 6 Aug 2011 22:53:50 +0000 (UTC) Received: (qmail 3411 invoked by uid 500); 6 Aug 2011 22:53:50 -0000 Delivered-To: apmail-cassandra-commits-archive@cassandra.apache.org Received: (qmail 3358 invoked by uid 500); 6 Aug 2011 22:53:49 -0000 Mailing-List: contact commits-help@cassandra.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@cassandra.apache.org Delivered-To: mailing list commits@cassandra.apache.org Received: (qmail 3306 invoked by uid 99); 6 Aug 2011 22:53:49 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Sat, 06 Aug 2011 22:53:49 +0000 X-ASF-Spam-Status: No, hits=-2000.7 required=5.0 tests=ALL_TRUSTED,RP_MATCHES_RCVD X-Spam-Check-By: apache.org Received: from [140.211.11.116] (HELO hel.zones.apache.org) (140.211.11.116) by apache.org (qpsmtpd/0.29) with ESMTP; Sat, 06 Aug 2011 22:53:47 +0000 Received: from hel.zones.apache.org (hel.zones.apache.org [140.211.11.116]) by hel.zones.apache.org (Postfix) with ESMTP id 3936AAFEB0 for ; Sat, 6 Aug 2011 22:53:27 +0000 (UTC) Date: Sat, 6 Aug 2011 22:53:27 +0000 (UTC) From: "paul cannon (JIRA)" To: commits@cassandra.apache.org Message-ID: <1313987316.14235.1312671207231.JavaMail.tomcat@hel.zones.apache.org> In-Reply-To: <2130663663.7999.1312468047941.JavaMail.tomcat@hel.zones.apache.org> Subject: [jira] [Updated] (CASSANDRA-2992) Cassandra doesn't start on Red Hat Linux due to hardcoded JAVA_HOME MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 [ https://issues.apache.org/jira/browse/CASSANDRA-2992?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] paul cannon updated CASSANDRA-2992: ----------------------------------- Attachment: 0001-don-t-hardcode-JAVA_HOME-in-redhat-initscript.patch.txt 0001: add search for appropriate JAVA_HOME in redhat initscript, now that cassandra-env.sh expects the right $JAVA to be preconfigured (see #2785). > 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 > Affects Versions: 0.8.3 > Environment: CentOS release 5.6 > Reporter: Taras Puchko > Assignee: paul cannon > 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