hadoop常见问题集

问题一:

eclipse无法连接hadoop报错:

"Map/Reduce location status updater". org/codehaus/jackson/map/JsonMappingException

经查证发现是由于hadoop的eclipse 插件里面缺少了包,解决办法如下:

a、修改hadoop-eclipse-plugin-1.2.1.jar,增加如下jar包:

b、修改hadoop-eclipse-plugin-1.2.1.jar\META-INF\MANIFEST.MF文件,增加内容:

c、修改后的hadoop-eclipse-plugin-1.2.1.jar,拷贝到eclipse/plugins目录下,重启eclipse

 

问题二:

在window下使用Eclipse进行hadoop的程序编写,然后Run on hadoop 后,出现如下错误:

org.apache.hadoop.security.AccessControlException: org.apache.hadoop.security.AccessControlException: Permission denied: user=Administrator, access=WRITE, inode="root":root:supergroup:rwxr-xr-x


解决办法:

a、修改hdfs-site.xml文件,增加如下内容:

<property>
<name>dfs.permissions</name>
<value>false</value>
<description>
If "true", enable permission checking in HDFS.
If "false", permission checking is turned off,
but all other behavior is unchanged.
Switching from one parameter value to the other does not change the mode,
owner or group of files or directories.
</description>
</property>

b、重启hadoop          

chadoop退出安全模式 hadoop dfsadmin –safemode leave

 

问题三:

我在Win7上用eclipse在远程的hadoop上调试程序,结果总是报Failed to set permissions of path错误,具体堆栈信息如下:

12/04/24 15:32:44 WARN util.NativeCodeLoader: Unable to load native-hadoop library for your platform... using builtin-java classes where applicable
12/04/24 15:32:44 ERROR security.UserGroupInformation: PriviledgedActionException as:Administrator cause:java.io.IOException: Failed to set permissions of path: \tmp\hadoop-Administrator\mapred\staging\Administrator-519341271\.staging to 0700
Exception in thread "main" java.io.IOException: Failed to set permissions of path: \tmp\hadoop-Administrator\mapred\staging\Administrator-519341271\.staging to 0700
    at org.apache.hadoop.fs.FileUtil.checkReturnValue(FileUtil.java:682)
    at org.apache.hadoop.fs.FileUtil.setPermission(FileUtil.java:655)
    at org.apache.hadoop.fs.RawLocalFileSystem.setPermission(RawLocalFileSystem.java:509)
    at org.apache.hadoop.fs.RawLocalFileSystem.mkdirs(RawLocalFileSystem.java:344)
    at org.apache.hadoop.fs.FilterFileSystem.mkdirs(FilterFileSystem.java:189)
    at org.apache.hadoop.mapreduce.JobSubmissionFiles.getStagingDir(JobSubmissionFiles.java:116)
    at org.apache.hadoop.mapred.JobClient$2.run(JobClient.java:856)
    at org.apache.hadoop.mapred.JobClient$2.run(JobClient.java:850)
    at java.security.AccessController.doPrivileged(Native Method)
    at javax.security.auth.Subject.doAs(Subject.java:396)
    at org.apache.hadoop.security.UserGroupInformation.doAs(UserGroupInformation.java:1093)
    at org.apache.hadoop.mapred.JobClient.submitJobInternal(JobClient.java:850)
    at org.apache.hadoop.mapreduce.Job.submit(Job.java:500)
    at org.apache.hadoop.mapreduce.Job.waitForCompletion(Job.java:530)
    at com.hadoop.learn.test.WordCountTest.main(WordCountTest.java:85)

解决办法:

a、修改hadoop-1.2.1/src/core/org/apache/hadoop/fs/FileUtil.java里面checkReturnValue方法,注释掉方法内容即可:

b、编译重新打包hadoop-core-1.2.1.jar,替换原来hadoop-1.2.1根目录jar文件

 

问题四:

hadoop集群启动dataNode报错:No route to host


解决办法:关闭机器防火墙,具体操作如下:

(1)重启后永久性生效:

开启:chkconfigiptables on

关闭:chkconfigiptables off

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

开启:serviceiptables start

关闭:serviceiptables stop

问题五:

hadopp执行文件操作报错,Bad connect ack with firstBadLink as*:50010


问题产生同上问题四,都是防护墙没有关闭导致的,解决办法也是一样。


问题六:

hadoop集群启动dataNode报错,Invalid directory indfs.data.dir:Incorrect permission for /home/hadoop/hdfs/data,expected:rwxr-xr-x, while actual : rwxrwxr-x


解决办法:

修改hdfs-site.xml文件中配置的dfs.data.dir目录(hdfs数据文件存储路径)权限:

chmod go-w /home/hadoop/hdfs/data


评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值