hadoop偽分布式配置問題集錦

來源:互聯網
上載者:User

問題1:could only be replicated to 0 nodes, instead of 1

2013-06-24 11:39:32,383 ERROR org.apache.hadoop.security.UserGroupInformation: PriviledgedActionException as:zqgame cause:java.io.IOException: File /data/zqhadoop/data/mapred/system/jobtracker.info could only be replicated to 0 nodes, instead of 12013-06-24 11:39:32,384 INFO org.apache.hadoop.ipc.Server: IPC Server handler 1 on 9000, call addBlock(/data/zqhadoop/data/mapred/system/jobtracker.info, DFSClient_NONMAPREDUCE_-344066732_1, null) from 192.168.216.133:59866: error: java.io.IOException: File /data/zqhadoop/data/mapred/system/jobtracker.info could only be replicated to 0 nodes, instead of 1java.io.IOException: File /data/zqhadoop/data/mapred/system/jobtracker.info could only be replicated to 0 nodes, instead of 1        at org.apache.hadoop.hdfs.server.namenode.FSNamesystem.getAdditionalBlock(FSNamesystem.java:1920)        at org.apache.hadoop.hdfs.server.namenode.NameNode.addBlock(NameNode.java:783)        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)        at java.lang.reflect.Method.invoke(Method.java:601)        at org.apache.hadoop.ipc.RPC$Server.call(RPC.java:587)        at org.apache.hadoop.ipc.Server$Handler$1.run(Server.java:1432)        at org.apache.hadoop.ipc.Server$Handler$1.run(Server.java:1428)        at java.security.AccessController.doPrivileged(Native Method)        at javax.security.auth.Subject.doAs(Subject.java:415)        at org.apache.hadoop.security.UserGroupInformation.doAs(UserGroupInformation.java:1190)        at org.apache.hadoop.ipc.Server$Handler.run(Server.java:1426)

這裡hadoop去尋找可用的節點,但是結果找不到。

問題處在/etc/hosts和$HADOOP_HOME/conf/mapred-site.xml和core-site.xml。

解決方案:

1、修改$HADOOP_HOME/conf/mapred-site.xml和core-site.xml,把host修改為IP地址

core-site.xml

zqgame@master:~/hadoop-1.2.0/bin$ more ../conf/core-site.xml <?xml version="1.0"?><?xml-stylesheet type="text/xsl" href="configuration.xsl"?><!-- Put site-specific property overrides in this file. --><configuration>        <property>         <name>fs.default.name</name>         <value>hdfs://192.168.216.133:9000</value>     </property>        <property>                <name>hadoop.tmp.dir</name>                <value>/data/zqhadoop/data</value>        </property></configuration>

mapred-site.xml

zqgame@master:~/hadoop-1.2.0/bin$ more ../conf/mapred-site.xml <?xml version="1.0"?><?xml-stylesheet type="text/xsl" href="configuration.xsl"?><!-- Put site-specific property overrides in this file. --><configuration>        <property>         <name>mapred.job.tracker</name>         <value>192.168.216.133:9001</value>     </property></configuration>

2、修改/etc/hosts配置,添加本機IP綁定

zqgame@master:~/hadoop-1.2.0/bin$ more /etc/hosts127.0.0.1       localhost127.0.1.1       master192.168.216.133 localhost.localdomain localhost

3、關閉防火牆

轉賬請註明:http://blog.csdn.net/weijonathan/article/details/9162619

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.