Return-Path: X-Original-To: apmail-hadoop-hdfs-user-archive@minotaur.apache.org Delivered-To: apmail-hadoop-hdfs-user-archive@minotaur.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 79BF017502 for ; Wed, 29 Oct 2014 23:09:23 +0000 (UTC) Received: (qmail 49791 invoked by uid 500); 29 Oct 2014 23:09:19 -0000 Delivered-To: apmail-hadoop-hdfs-user-archive@hadoop.apache.org Received: (qmail 49650 invoked by uid 500); 29 Oct 2014 23:09:19 -0000 Mailing-List: contact user-help@hadoop.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: user@hadoop.apache.org Delivered-To: mailing list user@hadoop.apache.org Received: (qmail 49639 invoked by uid 99); 29 Oct 2014 23:09:18 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 29 Oct 2014 23:09:18 +0000 X-ASF-Spam-Status: No, hits=1.5 required=5.0 tests=HTML_MESSAGE,RCVD_IN_DNSWL_LOW,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: domain of bmogal@pivotal.io designates 209.85.212.180 as permitted sender) Received: from [209.85.212.180] (HELO mail-wi0-f180.google.com) (209.85.212.180) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 29 Oct 2014 23:08:51 +0000 Received: by mail-wi0-f180.google.com with SMTP id hi2so5933549wib.13 for ; Wed, 29 Oct 2014 16:08:06 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:in-reply-to:references:date :message-id:subject:from:to:content-type; bh=H0Sr00mZ7fi0Q8gGNXypVyyC8R43AFrSpcHtkCqAvPA=; b=f6Awb5Vq2ePwjNOh+2oiEhQNiFpAznw2B9WpadPlk+ABzvHsSiaLe4LF3HQCtDiSVj cAtuxk6kIs0565/VqYLJdfIE3PwfICttrMvXqTatpqrHpl2+hh7UN/fDOWA8S7m9J8i+ YYvTo13bwjMIFxn8w0BNN5DzgzxplvLV7eJc8Y24OmYpyczjFyeljCmD/muOGw1VnQMr UFvC4Cv4eEnPD+nmqwSr9MRBmyUsOpMJUPTBdoLqWMwL4UnGSF/Kx/+UIqA79cJueIaS Ws2l6MeyHnezyIYFlT6DO1v8ltxw/weqoBSjyJi67K5ocFhezJm8aplwlTwn+roh7CJ5 yFTQ== X-Gm-Message-State: ALoCoQl4wCXtWQSWUUGPne0g0R+s4kHOT6WtR9IrUc7Ae+eSfuug7AoR69nVuZ58Ex8j9elJ+ruS MIME-Version: 1.0 X-Received: by 10.180.221.129 with SMTP id qe1mr16125652wic.21.1414624086240; Wed, 29 Oct 2014 16:08:06 -0700 (PDT) Received: by 10.195.18.74 with HTTP; Wed, 29 Oct 2014 16:08:06 -0700 (PDT) In-Reply-To: References: Date: Wed, 29 Oct 2014 16:08:06 -0700 Message-ID: Subject: Re: problems with Hadoop instalation From: Bhooshan Mogal To: user@hadoop.apache.org Content-Type: multipart/alternative; boundary=001a1133c8fa26d099050697d6b3 X-Virus-Checked: Checked by ClamAV on apache.org --001a1133c8fa26d099050697d6b3 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable HI David, JAVA_HOME should point to the java installation directory. Typically, this directory will contain a subdirectory called 'bin'. Hadoop tries to find the java command in $JAVA_HOME/bin/java. It is likely that /usr/bin/java is a symlink to some other file. If you do an ls -l /usr/bin/java, you should be able to see where that symlink points to. If the symlink points to a path that is of the form /bin/java, then should be the value of JAVA_HOME. HTH, Bhooshan On Wed, Oct 29, 2014 at 3:59 PM, David Novogrodsky < david.novogrodsky@gmail.com> wrote: > All, > > I am new to Hadoop so any help would be appreciated. > > I have a question for the mailing list regarding Hadoop. I have installe= d > the most recent stable version (2.4.1) on a virtual machine running CentO= S > 7. I have tried to run this command > %>Hadoop -fs ls but without success. > > =E2=80=8BThe question is, what does Hadoop consider a valid JAVA_HOME dir= ectory? > And where should the JAVA_HOME directory variable be defined? I installe= d > Java using the package manager yum. I installed the most recent version, > detailed below.=E2=80=8B > > > =E2=80=8BT=E2=80=8B > his is in my .bashrc file > # The java implementation to use. > export JAVA_HOME=3D/usr/lib/jvm/jre-1.7.0-openjdk.x86_64 > > > [david@localhost ~]$ hadoop fs -ls > /usr/local/hadoop/bin/hadoop: line 133: > /usr/lib/jvm/jre-1.7.0-openjdk.x86_64/bin/java: No such file or directory > > > then I tried this value for JAVA_HOME > =E2=80=8B in my .bashrc file. > /usr/bin/Java. > =E2=80=8B > [david@localhost ~]$ which java > /usr/bin/java > [david@localhost ~]$ java -version > java version "1.7.0_71" > OpenJDK Runtime Environment (rhel-2.5.3.1.el7_0-x86_64 u71-b14) > OpenJDK 64-Bit Server VM (build 24.65-b04, mixed mode) > > here is the result: > [david@localhost ~]$hadoop fs -ls > /usr/local/hadoop/bin/hadoop: line 133: /usr/bin/java/bin/java: Not a > directory > /usr/local/hadoop/bin/hadoop: line 133: exec: /usr/bin/java/bin/java: > cannot execute: Not a directory > > David Novogrodsky > > > --001a1133c8fa26d099050697d6b3 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable
HI David,

JAVA_HOME should point to the= java installation directory. Typically, this directory will contain a subd= irectory called 'bin'. Hadoop tries to find the java command in $JA= VA_HOME/bin/java.

It is likely that /usr/bin/java = is a symlink to some other file. If you do an ls -l /usr/bin/java, you shou= ld be able to see where that symlink points to. If the symlink points to a = path that is of the form <base_dir>/bin/java, then <base_dir> s= hould be the value of JAVA_HOME.

HTH,
Bh= ooshan

On Wed, Oct 29, 2014 at 3:59 PM, David Novogrodsky <<= a href=3D"mailto:david.novogrodsky@gmail.com" target=3D"_blank">david.novog= rodsky@gmail.com> wrote:
All,<= /div>

I am new to Hadoop so any= help would be appreciated.

I have a question for the mailing list regarding Hadoop.=C2=A0 I have in= stalled the most recent stable version (2.4.1) on a virtual machine running= CentOS 7.=C2=A0 I have tried to run this command=C2=A0
%>Hadoop -fs ls but without suc= cess.

=E2=80=8BThe question is, what does Hadoop consider a valid JAVA_HO= ME directory?=C2=A0 And where should the JAVA_HOME directory variable be de= fined?=C2=A0 I installed Java using the package manager yum.=C2=A0 I instal= led the most recent version, detailed below.=E2=80=8B


=E2=80=8BT=E2=80=8B
his is in my .= bashrc file
# The java implementation to use.
export JAVA_HOME=3D/usr= /lib/jvm/jre-1.7.0-openjdk.x86_64


[david@localhost ~]$ hadoop fs= -ls
/usr/local/hadoop/bin/hadoop: line 133: /usr/lib/jvm/jre-1.7.0-open= jdk.x86_64/bin/java: No such file or directory


then I tried this= value for JAVA_HOME
=E2=80=8B in my .bashrc file.
/usr/bin/Java. =C2=A0
=E2=80=8B
[david@localhost ~]$ which java
/usr/bin/java
[david@localhost ~= ]$ java -version
java version "1.7.0_71"
OpenJDK Runtime En= vironment (rhel-2.5.3.1.el7_0-x86_64 u71-b14)
OpenJDK 64-Bit Server VM (= build 24.65-b04, mixed mode)

here is the result:
[david@localhost= ~]$hadoop fs -ls
/usr/local/hadoop/bin/hadoop: line 133: /usr/bin/java/= bin/java: Not a directory
/usr/local/hadoop/bin/hadoop: line 133: exec: = /usr/bin/java/bin/java: cannot execute: Not a directory

David Novogrodsky



--001a1133c8fa26d099050697d6b3--