hadoop2安装笔记可以参看:http://www.geedoo.info/hadoop2-development-environment-to-build-test.html 这里主要记录下hadoop安装和测试过程遇到的问题记录: 1.问题一 安装配置完成后执行start-dfs.sh出现如下异常: sed: -e expression #1, char 6: unkn
hadoop2安装笔记可以参看:http://www.geedoo.info/hadoop2-development-environment-to-build-test.html
这里主要记录下hadoop安装和测试过程遇到的问题记录:
1.问题一
安装配置完成后执行start-dfs.sh出现如下异常:
sed: -e expression #1, char 6: unknown option to `s'have: ssh: could not resolve hostname have: name or service not knownloaded: ssh: could not resolve hostname loaded: name or service not knownvm: ssh: could not resolve hostname vm: name or service not knownlibrary: ssh: could not resolve hostname library: name or service not knownwhich: ssh: could not resolve hostname which: name or service not knownyou: ssh: could not resolve hostname you: name or service not knownstack: ssh: could not resolve hostname stack: name or service not knownmight: ssh: could not resolve hostname might: name or service not knownhave: ssh: could not resolve hostname have: name or service not knownguard.: ssh: could not resolve hostname guard.: name or service not knownjava: ssh: could not resolve hostname java: name or service not knowndisabled: ssh: could not resolve hostname disabled: name or service not knownthe: ssh: could not resolve hostname the: name or service not knownwill: ssh: could not resolve hostname will: name or service not knownvm: ssh: could not resolve hostname vm: name or service not knowntry: ssh: could not resolve hostname try: name or service not knownthe: ssh: could not resolve hostname the: name or service not knownfix: ssh: could not resolve hostname fix: name or service not knownstack: ssh: could not resolve hostname stack: name or service not knownserver: ssh: could not resolve hostname server: name or service not knownguard: ssh: could not resolve hostname guard: name or service not knownto: ssh: could not resolve hostname to: name or service not known64-bit: ssh: could not resolve hostname 64-bit: name or service not knownyou: ssh: could not resolve hostname you: name or service not knownhighly: ssh: could not resolve hostname highly: name or service not known-c: unknown cipher type 'cd'fix: ssh: could not resolve hostname fix: name or service not knownrecommended: ssh: could not resolve hostname recommended: name or service not knownthat: ssh: could not resolve hostname that: name or service not knownnow.: ssh: could not resolve hostname now.: name or service not knownlibrary: ssh: could not resolve hostname library: name or service not knownthe: ssh: could not resolve hostname the: name or service not knownlink: ssh: could not resolve hostname link: name or service not knownwith: ssh: could not resolve hostname with: name or service not knownor: ssh: could not resolve hostname or: name or service not knownnoexecstack'.: ssh: could not resolve hostname noexecstack'.: name or service not knownwith: ssh: could not resolve hostname with: name or service not knownthe authenticity of host '0.0.0.0 (0.0.0.0)' can't be established.rsa key fingerprint is fa:8e:e6:aa:3f:f9:f0:0b:48:6e:40:ca:c2:f1:02:21.are you sure you want to continue connecting (yes/no)? it: ssh: connect to host it port 22: connection refusedhotspot(tm): ssh: could not resolve hostname hotspot(tm): name or service not knownwarning:: ssh: could not resolve hostname warning:: name or service not known
出现上述问题,之后谷歌了很久,大部分说是配置hosts的问题,检查之后没发现问题。
问题的原因是没有设置hadoop的native本地库。
解决方案:
输出native环境变量
export hadoop_common_lib_native_dir=/app/cloud/hadoop/hadoop-2.4.0/lib/native
参考
http://stackoverflow.com/questions/19943766/hadoop-unable-to-load-native-hadoop-library-for-your-platform-error-on-centos
http://stackoverflow.com/questions/19775808/messed-up-sed-syntactics-in-hadoop-startup-script-after-reinstalling-jvm
http://stackoverflow.com/questions/20011252/hadoop-2-2-0-64-bit-installing-but-cannot-start
原文地址:hadoop2.x安装启动错误, 感谢原作者分享。