Hadoop binaries are built for 32 bit runtime. If you run the hadoop binaries on a 64 bit machine, you might notice this warning on running any hadoop command.
For help on how to install Hadoop Cluster, checkout my article on hadoop.
[Java HotSpot(TM) 64-Bit Server VM warning: You have loaded library /home/hadoopuser/hadoop/lib/native/libhadoop.so.1.0.0 which might have disabled stack guard. The VM will try to fix the stack guard now.
It’s highly recommended that you fix the library with ‘execstack -c <libfile>’, or link it with ‘-z noexecstack’.
0.0.0.0]
The warning could further manifest into following messages:
[Java HotSpot(TM) 64-Bit Server VM warning: You have loaded library /home/hadoopuser/hadoop/lib/native/libhadoop.so.1.0.0 which might have disabled stack guard. The VM will try to fix the stack guard now. It's highly recommended that you fix the library with 'execstack -c ', or link it with '-z noexecstack'. 0.0.0.0] sed: -e expression #1, char 6: unknown option to `s' 64-Bit: ssh: Could not resolve hostname 64-bit: Name or service not known warning:: ssh: Could not resolve hostname warning:: Name or service not known HotSpot(TM): ssh: Could not resolve hostname hotspot(tm): Name or service not known VM: ssh: Could not resolve hostname vm: Name or service not known You: ssh: Could not resolve hostname you: Name or service not known Java: ssh: Could not resolve hostname java: Name or service not known have: ssh: Could not resolve hostname have: Name or service not known Server: ssh: Could not resolve hostname server: Name or service not known loaded: ssh: Could not resolve hostname loaded: Name or service not known which: ssh: Could not resolve hostname which: Name or service not known library: ssh: Could not resolve hostname library: Name or service not known might: ssh: Could not resolve hostname might: Name or service not known disabled: ssh: Could not resolve hostname disabled: Name or service not known have: ssh: Could not resolve hostname have: Name or service not known stack: ssh: Could not resolve hostname stack: Name or service not known guard.: ssh: Could not resolve hostname guard.: Name or service not known will: ssh: Could not resolve hostname will: Name or service not known The: ssh: Could not resolve hostname the: Name or service not known VM: ssh: Could not resolve hostname vm: Name or service not known try: ssh: Could not resolve hostname try: Name or service not known to: ssh: Could not resolve hostname to: Name or service not known -c: Unknown cipher type 'cd' fix: ssh: Could not resolve hostname fix: Name or service not known stack: ssh: Could not resolve hostname stack: Name or service not known guard: ssh: Could not resolve hostname guard: Name or service not known the: ssh: Could not resolve hostname the: Name or service not known now.: ssh: Could not resolve hostname now.: Name or service not known It's: ssh: Could not resolve hostname it's: Name or service not known recommended: ssh: Could not resolve hostname recommended: Name or service not known highly: ssh: Could not resolve hostname highly: Name or service not known that: ssh: Could not resolve hostname that: Name or service not known you: ssh: Could not resolve hostname you: Name or service not known the: ssh: Could not resolve hostname the: Name or service not known fix: ssh: Could not resolve hostname fix: Name or service not known with: ssh: Could not resolve hostname with: Name or service not known library: ssh: Could not resolve hostname library: Name or service not known 'execstack: ssh: Could not resolve hostname 'execstack: Name or service not known ',: ssh: Could not resolve hostname ',: Name or service not known or: ssh: Could not resolve hostname or: Name or service not known it: ssh: Could not resolve hostname it: Name or service not known link: ssh: Could not resolve hostname link: Name or service not known with: ssh: Could not resolve hostname with: Name or service not known '-z: ssh: Could not resolve hostname '-z: Name or service not known noexecstack'.: ssh: Could not resolve hostname noexecstack'.: Name or service not known
To fix this annoying warning, update your hadoop-env.sh file under etc/hadoop, and replace following line
# Extra Java runtime options. Empty by default. export HADOOP_OPTS="$HADOOP_OPTS -Djava.net.preferIPv4Stack=true"
with the following line, by adding -XX:-PrintWarnings
# Extra Java runtime options. Empty by default. export HADOOP_OPTS="$HADOOP_OPTS -XX:-PrintWarnings -Djava.net.preferIPv4Stack=true"
Related Articles
Reblogged this on Dinesh Ram Kali..
LikeLike
Thanks Dinesh…
LikeLike
The solution using -XX:-PrintWarnings does not work completely for me (Ubuntu 64Bit server, Hadoop 2.2.0 32Bit binaries). I’m still getting the warning on starting the resource manager and the nodemanager.
LikeLike
@padmalcom.. can you please give some more information on what command are you running? I could not reproduce any error by running start-dfs.sh/stop-dfs.sh, or start-yarn.sh/stop-yarn.sh commands. I am running these commands on Ubuntu 14.04 as pointed in my another blog entry. https://chawlasumit.wordpress.com/2014/06/15/installing-hadoop-on-ubuntu-14-04/‘
Moreover, are you running these commands on master node, or slave nodes?
LikeLike
hello sir, this option has removed that warning. But it doesn’t displaying namenode & datanode in jps
LikeLike
Hi Divya
Glad that article solved your problem. How are you running the namenode and datanode? Have you found anything under logs?
Logs are generally located under /home/hadoopuser/hadoop/logs
LikeLike
This works for me. Thank you!
LikeLiked by 1 person
Glad that article solved your problem.
LikeLike
[…] https://chawlasumit.wordpress.com/2014/06/17/hadoop-java-hotspottm-execstack-warning/ […]
LikeLike
i tried the command, bt since the machines are from my lab i donot have sudo permissions to edit the env.sh file. please let me know wat is to be done
LikeLike
Hi Pavithra,
Just try if doing an export on command line works for you. Try executing the following directly on command line:
export HADOOP_OPTS=”$HADOOP_OPTS -XX:-PrintWarnings -Djava.net.preferIPv4Stack=true”
However, you would have to do it everytime you start your terminal session.
LikeLiked by 1 person
OpenJDK 64-Bit Server VM warning: You have loaded library /home/monojit/Downloads/Aptana_Studio_3/plugins/org.eclipse.equinox.launcher.gtk.linux.x86_1.1.200.v20140116-2212/eclipse_1508.so which might have disabled stack guard. The VM will try to fix the stack guard now.
It’s highly recommended that you fix the library with ‘execstack -c ‘, or link it with ‘-z noexecstack’.
Gtk-Message: Failed to load module “overlay-scrollbar”
Gtk-Message: Failed to load module “unity-gtk-module”
I got This error Pls Help me
LikeLike
Hi Monojit,
Can you please give me some more context on what command are you trying to run? What is your os version here, and did this error appear after making the change suggested in this article?
Thanks
Sumit
LikeLike
14/12/16 14:17:53 WARN util.NativeCodeLoader: Unable to load native-hadoop library for your platform… using builtin-java classes where applicable
Starting namenodes on [localhost]
localhost: namenode running as process 17238. Stop it first.
localhost: starting datanode, logging to /usr/local/hadoop/logs/hadoop-root-datanode-root.out
Starting secondary namenodes [0.0.0.0]
0.0.0.0: secondarynamenode running as process 17870. Stop it first.
14/12/16 14:19:11 WARN util.NativeCodeLoader: Unable to load native-hadoop library for your platform… using builtin-java classes where applicable
LikeLike
HI sir for the following command i am getting the error as shown below please can u help me
hadoop dfs -mkdir -p /hadoop-2.6.0/input
DEPRECATED: Use of this script to execute hdfs command is deprecated.
Instead use the hdfs command for it.
14/12/29 20:25:22 WARN util.NativeCodeLoader: Unable to load native-hadoop library for your platform… using builtin-java classes where applicable
LikeLike
@Santhosh, what platform are you running your cluster on?
LikeLike
hello, this solution have helped me get rid of those warnings but my hadoop cluster is still not configured properly.. on web interface of my master’s node manager, i can see only 1 node active when i hav 3 computers in my cluster.. can you please help me with this error.?
LikeLiked by 1 person
@Ankita.. sorry for a late reply. Did you check the hadoop-nodemanager-* and hadoop-datanode-* logs on the two nodes. One common reason is ClusterId mismatch. Check the logs and post here. I have documented my experience of installing a multi-node cluster in this article here.
https://chawlasumit.wordpress.com/2015/03/09/install-a-multi-node-hadoop-cluster-on-ubuntu-14-04/
LikeLike
[…] Hadoop Java HotSpot execstack warning […]
LikeLike
[…] Hadoop Java HotSpot execstack warning […]
LikeLike
The fix for this solution is don’t show warnings at all ? Are you sure that other useful warnings won’t be hidden?
LikeLike
@Jose.. yes it would suppress all runtime java warnings.
LikeLike
Sir, I’am trying to run sample mapreduce examples by command ./yarn jar $YARN_EXAMPLES/hadoop-mapreduce-examples-2.2.0.jar pi 16 1000 but getting the same error. I also updated hadoop-env.sh file as described by you, but still not getting anything.
LikeLike
can you add what error are you getting exactly. The above messages are just annoying exception and should not block running any command.
LikeLike
hello ,
I am running HiPi and getting error and that is,
bisag@ubuntu:~$ hadoop fs -ls sampleimages_average
Picked up JAVA_TOOL_OPTIONS: -javaagent:/usr/share/java/jayatanaag.jar
15/09/16 07:48:04 WARN util.NativeCodeLoader: Unable to load native-hadoop library for your platform… using builtin-java classes where applicable
ls: `sampleimages_average’: No such file or directory
bisag@ubuntu:~$
please help to solve it .
Thanks in advance
LikeLike
It looks like you are using a wrong path for ls command. Execute a ls of base directory using following command, and the do a ls directory by directory to find the exact path of your file. You absolute paths.
hdfs dfs -ls /
LikeLike
Hi,
After using this, the warning problem got solved. But when I try to run the examples jar file, I get the following error.
Not a valid JAR: /usr/local/hadoop-2.2.0/share/hadoop/hadoop-mapreduce-examples-2.2.0.jar
Is it because of some 32bit/ 64bit issue?
LikeLike
Does this file exists on the system?
LikeLike
Yes, the file exists…The same works if I remove the -X:Print Warnings from the hadoop-env.sh
LikeLike
[…] https://chawlasumit.wordpress.com/2014/06/17/hadoop-java-hotspottm-execstack-warning/ […]
LikeLike
i have get the same error but i can hundle by your tutorial adding export HADOOP_OPTS=”$HADOOP_OPTS -XX:-PrintWarnings -Djava.net.preferIPv4Stack=true” and now when i try to start the node or stop the node it says
slave1:unrecogized VM option ‘printwarnings’
slave1:Error:could not creat the java virtual machine.
slave1:error:afatal exception has occured.program will exit.
iam runing 32 bit debain actually and latest verstion of hadoop
LikeLike
Unfortunately this doesnt work ,
I have raised this up in stackoverflow
http://stackoverflow.com/questions/36787804/jps-gives-empty-output-none-of-the-hadoop-daemons-start-with-start-all-sh-hado
hduser@ubuntu:~$ cat /usr/local/hadoop/logs/hadoop-hduser-namenode-ubuntu.out
OpenJDK Client VM warning: You have loaded library /usr/local/hadoop/lib/native/libhadoop.so.1.0.0 which might have disabled stack guard. The VM will try to fix the stack guard now.
It’s highly recommended that you fix the library with ‘execstack -c ‘, or link it with ‘-z noexecstack’. *****(Tha above mentioned Blog Post only Hides this particular Warning Message)***
(kbytes, -m) unlimited
open files (-n) 1024
pipe size (512 bytes, -p) 8
POSIX message queues (bytes, -q) 819200
real-time priority (-r) 0
stack size (kbytes, -s) 8192
cpu time (seconds, -t) unlimited
max user processes (-u) 14869
virtual memory (kbytes, -v) unlimited
file locks (-x) unlimited
hduser@ubuntu:~$
Any suggestions will be appreciated , urgent,akshay4497mane at gmail
LikeLike
Hi,
-XX:-PrintWarnings works for name node and data node. however i get same warnings while i try to start resource manager. I am trying to start up hadoop in CentOS VM.
LikeLike
Excelente mas eu era imaginando se você poderia escrever um
pouco mais sobre este tópico ? Eu seria muito grato
se você poderia elaborar um pouco mais .
Apreciá-lo ! https://www.facebook.com/gnulinuxbrazil/
LikeLike