Hadoop installation: namenode cannot be started

戏子无情 提交于 2019-12-04 16:52:53

This problem arise when mistaken I specified wrong path for namenode and datanode in hdfs-site.xml and tmp dir path in core-site.xml, Path should be well formatted, for example-

<property>
    <name>dfs.namenode.edits.dir</name>
    <value>file:///home/hadoop/hadoop-content/hdfs/namenode</value>
</property>

<property>
    <name>dfs.datanode.data.dir</name>
    <value>file:///home/hadoop/hadoop-content/hdfs/datanode</value>
</property>

and for temp dir in core-site.xml it is like -

<configuration>
<property>
    <name>fs.defaultFS</name>
    <value>hdfs://localhost:9000</value>
</property>
<property>
    <name>hadoop.tmp.dir</name>
    <value>/home/hadoop/hadoop-content/tmp</value>
</property>

sometimes we make mistake in specifying - file:///

In /etc/hosts:

1. Add this line:

your-ip-address    your-host-name

example: 192.168.1.8 master

In /etc/hosts:

2. Delete the line with 127.0.1.1 (This will cause loopback)

3. In your core-site, change localhost to your-ip or your-hostname

Now, restart the cluster.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!