1、启动报Could not resolve hostname library错误
15/11/02 15:13:37 WARN util.NativeCodeLoader: Unable to load native-hadoop library for your platform... using builtin-java classes where applicable
Starting namenodes on [Java HotSpot(TM) Client VM warning: You have loaded library /root/hadoop-2.5.2/hadoop-2.5.2/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'.
server server2]
sed:-e 表达式 #1,字符 6:“s”的未知选项
VM: ssh: Could not resolve hostname VM: Temporary failure in name resolution
have: ssh: Could not resolve hostname have: Temporary failure in name resolution
You: ssh: Could not resolve hostname You: Temporary failure in name resolution
HotSpot(TM): ssh: Could not resolve hostname HotSpot(TM): Temporary failure in name resolution
library: ssh: Could not resolve hostname library: Temporary failure in name resolution
Java: ssh: Could not resolve hostname Java: Temporary failure in name resolution
which: ssh: Could not resolve hostname which: Temporary failure in name resolution
might: ssh: Could not resolve hostname might: Temporary failure in name resolution
Client: ssh: Could not resolve hostname Client: Temporary failure in name resolution
warning:: ssh: Could not resolve hostname warning:: Temporary failure in name resolution
have: ssh: Could not resolve hostname have: Temporary failure in name resolution
stack: ssh: Could not resolve hostname stack: Temporary failure in name resolution
The: ssh: Could not resolve hostname The: Temporary failure in name resolution
guard.: ssh: Could not resolve hostname guard.: Temporary failure in name resolution
disabled: ssh: Could not resolve hostname disabled: Temporary failure in name resolution
try: ssh: Could not resolve hostname try: Temporary failure in name resolution
will: ssh: Could not resolve hostname will: Temporary failure in name resolution
the: ssh: Could not resolve hostname the: Temporary failure in name resolution
VM: ssh: Could not resolve hostname VM: Temporary failure in name resolution
stack: ssh: Could not resolve hostname stack: Temporary failure in name resolution
fix: ssh: Could not resolve hostname fix: Temporary failure in name resolution
loaded: ssh: Could not resolve hostname loaded: Temporary failure in name resolution
to: ssh: Could not resolve hostname to: Temporary failure in name resolution
now.: ssh: Could not resolve hostname now.: Temporary failure in name resolution
guard: ssh: Could not resolve hostname guard: Temporary failure in name resolution
highly: ssh: Could not resolve hostname highly: Temporary failure in name resolution
recommended: ssh: Could not resolve hostname recommended: Temporary failure in name resolution
It's: ssh: Could not resolve hostname It's: Temporary failure in name resolution
that: ssh: Could not resolve hostname that: Temporary failure in name resolution
you: ssh: Could not resolve hostname you: Temporary failure in name resolution
fix: ssh: Could not resolve hostname fix: Temporary failure in name resolution
the: ssh: Could not resolve hostname the: Temporary failure in name resolution
with: ssh: Could not resolve hostname with: Temporary failure in name resolution
-c: Unknown cipher type 'cd'
library: ssh: Could not resolve hostname library: Temporary failure in name resolution
'execstack: ssh: Could not resolve hostname 'execstack: Temporary failure in name resolution
',: ssh: Could not resolve hostname ',: Temporary failure in name resolution
link: ssh: Could not resolve hostname link: Temporary failure in name resolution
or: ssh: Could not resolve hostname or: Temporary failure in name resolution
noexecstack'.: ssh: Could not resolve hostname noexecstack'.: Temporary failure in name resolution
'-z: ssh: Could not resolve hostname '-z: Temporary failure in name resolution
with: ssh: Could not resolve hostname with: Temporary failure in name resolution
it: ssh: Could not resolve hostname it: Temporary failure in name resolution
原因是使用了下载hadoop时,默认编译的32位的库
临时解决办法:
修改etc下面的hadoop-env.sh
在末尾加上如下两行
export HADOOP_COMMON_LIB_NATIVE_DIR=${HADOOP_PREFIX}/lib/native
export HADOOP_OPTS="$HADOOP_OPTS -Djava.net.preferIPv4Stack=true -Djava.library.path=$HADOOP_PREFIX/lib"
但仍然有以下warning
15/11/02 15:26:09 WARN util.NativeCodeLoader: Unable to load native-hadoop library for your platform... using builtin-java classes where applicable
至此hadoop可以正常启动起来。