I am running Hadoop on local mode on my windows 7 machine (32 Bit).
I've installed HIVE/PIG/Hadoop/Java6 all on the C: drive.
I am using Cygwin version: 2.819.
I've mounted C: on the cygwin.
I am able to run hadoop commands from the cygwin terminal for example : fs -ls etc.
I am also able to start grunt and hive shells.
But the real problem is:
Any command I enter on grunt shell (example: fs -ls or records = LOAD..... ) I do not see any output, it kind of hangs. Similarly with the hive prompt if I give the command as show tables ; I do not see any output just cursor keeps on blinking! Any keyboard inputs and gives NOTHING. System appears to be doing NOTHING.
To me everything looks fine but definitely something is going wrong :-)
I am not sure if I am missing something.
Any help will be highly appreciated. I am attaching my classpath and environment variables from .bashrc file:
export JAVA_HOME=/c/Java/jdk1.6.0_34
export HADOOP_HOME=/c/Hadoop
export PIG_HOME=/c/PIG
export HIVE_HOME=/c/Hive
export HADOOP_BIN=$HADOOP_HOME/bin/hadoop
export PATH=$PATH:/c/Java/jdk1.6.0_34/bin
export PATH=$PATH:$HADOOP_HOME/bin
export PATH=$PATH:$HIVE_HOME/bin
export PATH=$PATH:$PIG_HOME/bin
The above links did not help in my case. The following solution - to change the CYGWIN shortcut properties helped.
This seems to be a bug. Other people are reporting the same problem here and here. Someone solved this problem following the tutorial linked here; you can try that and see if it fixes it in your case.
Related
I'm trying to complete configuration of zsh. When I run commands in git-bash, it's OK. However, the error "zsh: command not fount" is reported when I run these commands in zsh itself. Then I check the file ".zshrc" and find the path exported may get wrong.
export PATH=$HOME/bin:/usr/local/bin:$PATH
These files are located in another directory but not in "$HOME". But I don't know how to alter the line.
I tried to install laravel Framework in my mac OSX 10 .And I ended modifying my ~/.bash_profile to add the laravel command. laravel command seems to work normally .But another problem came out . ls ,sudo ...and other shell commands does not work .
-bash: ls: command not found
My bash.profile file contains the two links
export PATH="/Applications/MAMP/bin/php/php5.6/bin"
export PATH="$PATH:$HOME/.composer/vendor/bin"
check in ~/.bash_profile if this PATHs exist
export PATH=/opt/local/bin:/opt/local/sbin:$PATH
your complete line should looks like this
export PATH=/Applications/MAMP/bin/php/php5.6/bin:$HOME/.composer/vendor/bin:/opt/local/bin:/opt/local/sbin:$PATH
reboot needed.
The binaries for the above mentioned utilities for debian distribution are usually in /bin or /usr/bin directory. Of course exporting path won't help if the binaries are not there.
There could be one simple approach to it -
Check for the location of binaries and then export the path in the bash_profile or .bashrc.
Run the bashrc script (. ~/.bashrc) following you may not require a reboot.
I'm trying to use a script in grunt and node to dump a database.
When I run It return me this error:
/bin/sh: mysqldump: command not found
I have already contacted the creator of the script and we have understand that the problem is the configuration of my localhost.
I'm using XAMPP 1.8.2-3 in OSX
How can I use correctly mysqldump
Thanks
Try:
export PATH=$PATH:/Applications/XAMPP/bin
Then run your script.
So you don't have to do this in the future, check your .profile file in your home directory. There should be a line that starts with export PATH, something like (only an example):
export PATH=/opt/local/bin:/opt/local/sbin:$PATH
Just add your XAMPP path to it:
export PATH=/opt/local/bin:/opt/local/sbin:/Applications/XAMPP/bin:$PATH
The different directories are separated by colons only, don't add any whitespace.
I am completely new to Hadoop and I am trying to install Hadoop single node cluster on ubuntu but I am unable to figure out the reason I am unable to.I am following the tutorials in the following link "http://codesfusion.blogspot.in/2013/10/setup-hadoop-2x-220-on-ubuntu.html?m=1"
Everything went smoothly but when I give the command "Hadoop version" I get the following error.
"/usr/local/hadoop/bin/hadoop: line 133: /usr/lib/jvm/jdk//bin/java: No such file or directory"
I also opened the same file and searched the entire file but could not find such a line at all .
my .bashrc
export JAVA_HOME=/usr/lib/jvm/jdk/
export HADOOP_INSTALL=/usr/local/hadoop
export PATH=$PATH:$HADOOP_INSTALL/bin
export PATH=$PATH:$HADOOP_INSTALL/sbin
export HADOOP_MAPRED_HOME=$HADOOP_INSTALL
export HADOOP_COMMON_HOME=$HADOOP_INSTALL
export HADOOP_HDFS_HOME=$HADOOP_INSTALL
export YARN_HOME=$HADOOP_INSTALL
###end of paste
After that I opened hadoop-env.sh and pasted this ,the java home
export JAVA_HOME=/usr/lib/jvm/jdk/
Later I re-logged in and checked the hadoop version I am getting this error
"/usr/local/hadoop/bin/hadoop: line 133: /usr/lib/jvm/jdk//bin/java: No such file or directory"
I also cross verified that particular file but there is no line as such .Anybody kindly help me with this since I am new to this.
I found the solution.
First remove / from the end /usr/lib/jvm/jdk/ in bot bashrc and hadoop-env.sh
navigate to /usr/lib/jvm/jdk/bin
see if it has java folder or not. If its not there then check if u have made the correct soft link.
You must create a soft link for folder that has java in it so check before this command:
$ cd /usr/lib/jvm
$ ln -s java-7-openjdk-amd64 jdk
in above step as u might have seen in the tutorial change as following
$ cd /usr/lib/jvm
$ ln -s java-7-openjdk-amd64/ jdk
the 7 here is dependent on verion of jdk u have so check that and change accordingly.
I have jdk 6 so i changed for java-6-**
hope it works
This is error due to $JAVA_HOME variable. Change this variable path. you will be free from the error.
go to .bashrc using this command
vim ~/.bashrc
Change the JAVA_HOME variable
export JAVA_HOME=/usr/lib/jvm/jdk
export PATH=PATH:$PATH/bin
if you have jdk 8 then replace jdk with java-8-oracle .
export JAVA_HOME=/usr/lib/jvm/java-8-oracle
export PATH=PATH:$PATH/bin
restart you terminal and check the java command first, then hadoop command.
Like everyone else in the world, I'm following this hadoop tutorial. I get to the point where I format HDFS, and I get this:
user#linux01:~$ sudo $HADOOP_INSTALL/bin/hadoop namenode -format
Error: JAVA_HOME is not set.
Well that's funny, I set JAVA_HOME in my /etc/profiles.
user#linux01:~$ tail -n 4 /etc/profile
export JAVA_HOME=/usr/local/jdk1.6.0_32/bin
export JDK_HOME=$JAVA_HOME
export PATH=$PATH:/usr/local/jdk1.6.0_32/bin
export HADOOP_INSTALL=/usr/local/hadoop/hadoop-1.0.3
Did I mess that up somehow?
user#linux01:~$ echo $JAVA_HOME
/usr/local/jdk1.6.0_32/bin
user#linux01:~$ ls $JAVA_HOME
appletviewer extcheck jar javac and so forth...
Seems to work. Maybe it absolutely has to be set in my hadoop-env.sh?
# The java implementation to use. Required.
export JAVA_HOME=$JAVA_HOME
Lazy, yeah, but I still get "JAVA_HOME is not set" with or without this comment. I'm running low on ideas. Anyone see anything I'm missing?
Thank you #Chris Shain and #Chris White for your hints. I was running hadoop as su, and su doesn't automatically know about the environmental variables I set. I logged in as my hadoop user (I had chown'd the hadoop install directory to this user), and was able to format the hdfs.
Secondary problem: When I tried to start Hadoop, NameNode and JobTracker started successfully but DataNode, SecondaryNameNode, and TaskTracker failed to start. I dug in a little bit. NameNode and JobTracker are started via hadoop-daemon.sh, but DataNode, SecondaryNameNode, and TaskTracker are started by hadoop-daemon*s*.sh. The resolution here was to properly set JAVA_HOME in conf/hadoop-env.sh.
First a general note: If you are working on CYGWIN, please be logged in to your system as an Administrator.
I faced this problem of Java_Home not found while executing namenode -format. Below is what i did to fix it
Reinstalled JDK out of program files in a location where there was no space in the folder name. For example: D:/Installations/JDK7
Got into the bin folder of hadoop (version 1.2.1) installation and edited the "hadoop" configuration file. This is the file which has no file extension.
Searched for java_home variable
Just before the first instance of variable $JAVA_HOME I added this line:
export JAVA_HOME=/cygdrive/D/Installations/JDK7/
This is how it looks now:
fi
export JAVA_HOME=/cygdrive/D/Installations/JDK7/
# some Java parameters
if [ "$JAVA_HOME" != "" ]; then
#echo "run java in $JAVA_HOME"
JAVA_HOME=$JAVA_HOME
fi
Note: /cygdrive/ has to preceed your jdk installation path. Colon after the drive letter is not needed and the path should have forward slash.
Additionally, I did set JAVA_HOME in the system env properties. Just to be double sure.
Run the program and it will work now.
Blockquote
Try to use short name to avoid a space in a path.
"C:\Program Files" should have short name C:\Progra~1 (you can verify it using DOS dir command or entering it into address bar in file explorer).
Set your JAVA_HOME this way:
export JAVA_HOME="/cygdrive/c/Progra~1/Java/jdk1.7.0_10"
Answered by user2540312