Reputation: 2052
I am trying to install hadoop 1.1.2
on window machine with cygwin
.
From on-line videos and tutorials, I have set up all most everything.
Now problem is when i try to create folder with commands
cd /usr/local/hadoop-1.1.2/bin --> this works proper and set proper path then
./hadoop dfs -mkdir input --> when this execute i get error
in error i get issue related to JAVA_HOME
path is not set proper also show me text like /Java/jre7/bin/bin/java
which looks wrong path.
but i have set JAVA_HOME
path properly its here,
I have set same path with /bin
in path
variable.
I don't know where i have made mistake.
EDIT
full Error
./hadoop: line 320: C:/Java/jre7/bin/bin/java: No such file or directory
./hadoop: line 390: C:/Java/jre7/bin/bin/java: No such file or directory
./hadoop: line 390: exec: C:/Java/jre7/bin/bin/java: cannot execute: No such file or directory
Upvotes: 1
Views: 3651
Reputation: 8598
Upvotes: 2
Reputation: 2052
problems with its solution
1. JAVA PATH ISSUE
first is JAVA_PATH
issue
Note: Have to use JDK
not JRE
.
For Hadoop try to use folder name without space
In Environment variable
JAVA_HOME = C:\Java\jdk1.7.0_25
In path
variable add below code with othres with ;
sepration
%JAVA_HOME%\bin
In hadoop-env.sh
file (you can find this file from C:\cygwin\usr\local\hadoop-1.1.2\conf
if you are using windows machine).
Note that, remove #
from starting of line and USE \\
twice in file
export JAVA_HOME=C:\\Java\\jdk1.7.0_25
if everything OK with JAVA_PATH you can check from CYGWIN
consol
try below code to get javaPath
which hadoop
will use
echo $JAVA_HOME
here you will get java version path
also can set JAVAPATH
from runtime,try below code on CYGWIN
treminal
export JAVA_HOME=C:/JAVA/Jdk1.7.0_25
2. USER ISSUE
first of all Note that when you start with hadoop
installation use same USER
for MASTER
and SALVE
.
If you have different user then have to generate one extra file with name config
(without extension)
if your MASTER's
machine name is jubin-pc
and username is jubinp
and SLAVES
machine name is trainees11
and username is trainees
(have to do vice-verse for both)
config file(for MASTER) Location C:\cygwin\home\jubinp\.ssh\
Host trainees11
User trainees
config file(for SLAVE) Location C:\cygwin\home\trainees\.ssh\
Host jubin-pc
User jubinp
Upvotes: 4
Reputation: 900
Quit Cygwin.
Your path to the bin folder of JAVA contains is in another folder named bin ? I don't think so.
Install a JDK (not a JRE) properly in a Path with no blanks. For example : C:\jdk1.7.0_21
In Windows :
Add an environnement variable JAVA_HOME to C:\jdk1.7.0_21
Then, add the JAVA_HOME/bin
to your PATH.
Edit hadoop/conf/hadoop-env.sh : Uncomment the JAVA_HOME Export. For my example :
export JAVA_HOME=/cygdrive/c/jdk1.7.0_21/
Upvotes: 0