Hadoop 2.2.0 : "name or service not known" Warning Hadoop 2.2.0 : "name or service not known" Warning hadoop hadoop

Hadoop 2.2.0 : "name or service not known" Warning


One of the reason could be that default native library in Hadoop is built for 32-bit.

Add these lines to your .bashrc or .bash_profile:

export HADOOP_COMMON_LIB_NATIVE_DIR=$HADOOP_INSTALL/lib/nativeexport HADOOP_OPTS="-Djava.library.path=$HADOOP_INSTALL/lib"

This worked for me on Ubuntu 12.04.

$HADOOP_INSTALL is the location where you install Hadoop (generally it is /usr/local/hadoop).

or even there may be HADOOP_HOME instead of HADOOP_INSTALL.


This is same questions as given in this link. It was just asked in other way round

After following this link still there is chance of getting following Warning

WARN util.NativeCodeLoader: Unable to load native-hadoop library for your platform... using builtin-java classes where applicable

to resolve this warning follow this link


I think that the only problem here is the same as in this question, so the solution is also the same:


Stop JVM from printing the stack guard warning to stdout/stderr, because this is what breaks the HDFS starting script.


Do it by replacing in your etc/hadoop/hadoop-env.sh line:

export HADOOP_OPTS="$HADOOP_OPTS -Djava.net.preferIPv4Stack=true"

with:

export HADOOP_OPTS="$HADOOP_OPTS -XX:-PrintWarnings -Djava.net.preferIPv4Stack=true"


(This solution has been found on Sumit Chawla's blog)