Hadoop安裝錯誤總結

zhuxiaoxi發表於2018-04-28

Master的NodeManager/DateNode未啟動

日誌中未出現任何錯誤

  • 正常現象,如需在Master中啟動可在slave檔案中
    slaves
localhost
slave01
slave02

Master的ResourceManager未啟動

  1. 檢查yarn-site.xml
  2. 檢查mapred-site.xml

Slave的DateNode未啟動

  • 檢查yarn-site.xml
    yarn-site.xml
<property>
    <name>yarn.nodemanager.aux-services</name>
    <value>mapreduce_shuffle</value>
</property> 

Name node is in safe mode

  • 退出Safe Mode
hadoop dfsadmin -safemode leave

參考配置

core-site.xml

<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet type="text/xsl" href="configuration.xsl"?>
<configuration>
<property>
    <name>fs.defaultFS</name>
    <value>hdfs://master:9000</value>
</property>
<property>
    <name>hadoop.tmp.dir</name>
    <value>file:///home/zkpk/hadooptmpdata</value>
</property>
</configuration>

hdfs-site.xml

<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet type="text/xsl" href="configuration.xsl"?>
<configuration>
<property>
    <name>dfs.replication</name>
    <value>1</value>
</property><property>
    <name>dfs.namenode.name.dir</name>
    <value>file:///home/zkpk/hadoopname</value>
</property><property>
    <name>dfs.datanode.data.dir</name>
    <value>file:///home/zkpk/hadoopdata</value>
</property>
</configuration>

mapred-site.xml

<?xml version="1.0"?>
<configuration>
<property>
    <name>mapreduce.framework.name</name>
    <value>yarn</value>
</property>
<property>
    <name>mapreduce.jobhistory.address</name>
    <value>master:10020</value>
</property>
<property>
    <name>mapreduce.jobhistory.address</name>
    <value>master:19888</value>
</property>
</configuration>

yarn-site.xml

<?xml version="1.0"?>
<configuration>
    <property>
        <name>yarn.nodemanager.aux-services</name>
        <value>mapreduce_shuffle</value>
    </property>
    <property>
        <name>yarn.resourcemanager.address</name>
        <value>master:18040</value>
    </property>
    <property>
        <name>yarn.resourcemanager.scheduler.address</name>
        <value>master:18030</value>
    </property>
    <property>
        <name>yarn.resourcemanager.resource-tracker.address</name>
        <value>master:18025</value>
    </property>
    <property>
        <name>yarn.resourcemanager.admin.address</name>
        <value>master:18141</value>
    </property>
    <property>
        <name>yarn.resourcemanager.webapp.address</name>
        <value>master:18088</value>
    </property>
</configuration>

相關文章