Hadoop操作错误记录

参考错误列表

http://www.geedoo.info/category/hadoop%E8%BF%90%E7%BB%B4

1.在手动执行bin/hdfs secondarynamenode -checkpoint force手动执行checkpoint检查时出现错误

14/12/20 15:17:43 INFO common.Storage: Cannot lock storage /usr/local/hadoop/dfs/checkpoint. The directory is already locked

14/12/20 15:17:43 FATAL namenode.SecondaryNameNode: Failed to start secondary namenode

                                  java.io.IOException: Cannot lock storage /usr/local/hadoop/dfs/checkpoint. The directory is already locked

这是因为Secondarynamenode进程正在使用,不能在运行子进程了,需kill -9 pid,在执行



2.配置zookeeper时,

java.net.NoRouteToHostException: 没有到主机的路由                              --不仅这个有错误,其他主机间的操作,都提示这个

十有八九是某台主机的防火墙限制,最好的办法就是关闭防火墙,实际中不能这么直接,需添加端口信任

注意:需要在  root   用户下检查 防火墙状态,我在普通用户下检查,什么都没显示,还以为是已经关闭了

1) 重启后永久性生效:

开启:chkconfig iptables on

关闭:chkconfig iptables off

2) 即时生效,重启后失效:

开启:service iptables start

关闭:service iptables stop


3.启动HDFS时报如下错误

have: ssh: Could not resolve hostname have: Name or service not known
loaded: ssh: Could not resolve hostname loaded: Name or service not known
VM: ssh: Could not resolve hostname VM: Name or service not known
library: ssh: Could not resolve hostname library: Name or service not known
which: ssh: Could not resolve hostname which: Name or service not known
You: ssh: Could not resolve hostname You: Name or service not known
stack: ssh: Could not resolve hostname stack: Name or service not known
might: ssh: Could not resolve hostname might: Name or service not known
have: ssh: Could not resolve hostname have: Name or service not known
guard.: ssh: Could not resolve hostname guard.: Name or service not known
Java: ssh: Could not resolve hostname Java: Name or service not known
disabled: ssh: Could not resolve hostname disabled: Name or service not known
The: ssh: Could not resolve hostname The: Name or service not known
will: ssh: Could not resolve hostname will: 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
the: ssh: Could not resolve hostname the: Name or service not known
fix: ssh: Could not resolve hostname fix: Name or service not known
stack: ssh: Could not resolve hostname stack: Name or service not known
Server: ssh: Could not resolve hostname Server: Name or service not known
guard: ssh: Could not resolve hostname guard: Name or service not known
to: ssh: Could not resolve hostname to: Name or service not known
64-Bit: ssh: Could not resolve hostname 64-Bit: Name or service not known
you: ssh: Could not resolve hostname you: Name or service not known
highly: ssh: Could not resolve hostname highly: Name or service not known


系统一直提示不能解析主机,这不扯淡吗,这都是些什么主机名称,没得办法,问度娘最后找到这一条解决了我的问题
解决方案:
输出native环境变量
export HADOOP_COMMON_LIB_NATIVE_DIR=/app/cloud/hadoop/hadoop-2.4.0/lib/native

发布了14 篇原创文章 · 获赞 3 · 访问量 3万+
發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章