配置完hadoop,输入start-dfs.sh,无法启动
root@ubuntu:/usr#start-dfs.shStartingnamenodeson[192.168.8.11]Theauthenticityofhost'1...
root@ubuntu:/usr# start-dfs.shStarting namenodes on [192.168.8.11]The authenticity of host '192.168.8.11 (192.168.8.11)' can't be established.ECDSA key fingerprint is SHA256:V3S9H6vam9+tMPYxeBVjijCFVYnXKa6flw/VSKrib7c.Are you sure you want to continue connecting (yes/no)? yes192.168.8.11: Warning: Permanently added '192.168.8.11' (ECDSA) to the list of known hosts.root@192.168.8.11's password: 192.168.8.11: Permission denied, please try again.
展开
2个回答
展开全部
step1:
查看hdfs-site.xml,找到存namenode元数据和datanode元数据的路径:
<property>
<name>dfs.namenode.name.dir</name>
<value>file:///home/casliyang/hadoop2/hadoop-2.2.0/metadata/name</value>
</property>
<property>
<name>dfs.datanode.data.dir</name>
<value>file:///home/casliyang/hadoop2/hadoop-2.2.0/metadata/data</value>
</property>
step2:
打开namenode路径下的current/VERSION文件:
casliyang@singlehadoop:~/hadoop2/hadoop-2.2.0/metadata/name/current$ cat VERSION
#Thu May 15 14:46:39 CST 2014
namespaceID=1252551786
clusterID=CID-2cc69ada-3730-4c79-8384-c725fa85859a
cTime=0
storageType=NAME_NODE
blockpoolID=BP-2020521428-192.168.0.166-1397704506565
layoutVersion=-47
打开datanode路径下的current/VERSION文件:
casliyang@singlehadoop:~/hadoop2/hadoop-2.2.0/metadata/data/current$ cat VERSION
#Thu Apr 17 11:15:57 CST 2014
storageID=DS-432251277-192.168.0.166-50010-1397704557407
clusterID=CID-3e649eb6-cdb3-4a0c-aad8-5948c66bf282
cTime=0
storageType=DATA_NODE
layoutVersion=-47
我们可以看到,name节点元数据的clusterID和data节点元数据的clusterID不一致了,并且和报错信息完全对应上!
接下来将data节点的clusterID修改成和name节点的clusterID一致,重启集群即可。
查看hdfs-site.xml,找到存namenode元数据和datanode元数据的路径:
<property>
<name>dfs.namenode.name.dir</name>
<value>file:///home/casliyang/hadoop2/hadoop-2.2.0/metadata/name</value>
</property>
<property>
<name>dfs.datanode.data.dir</name>
<value>file:///home/casliyang/hadoop2/hadoop-2.2.0/metadata/data</value>
</property>
step2:
打开namenode路径下的current/VERSION文件:
casliyang@singlehadoop:~/hadoop2/hadoop-2.2.0/metadata/name/current$ cat VERSION
#Thu May 15 14:46:39 CST 2014
namespaceID=1252551786
clusterID=CID-2cc69ada-3730-4c79-8384-c725fa85859a
cTime=0
storageType=NAME_NODE
blockpoolID=BP-2020521428-192.168.0.166-1397704506565
layoutVersion=-47
打开datanode路径下的current/VERSION文件:
casliyang@singlehadoop:~/hadoop2/hadoop-2.2.0/metadata/data/current$ cat VERSION
#Thu Apr 17 11:15:57 CST 2014
storageID=DS-432251277-192.168.0.166-50010-1397704557407
clusterID=CID-3e649eb6-cdb3-4a0c-aad8-5948c66bf282
cTime=0
storageType=DATA_NODE
layoutVersion=-47
我们可以看到,name节点元数据的clusterID和data节点元数据的clusterID不一致了,并且和报错信息完全对应上!
接下来将data节点的clusterID修改成和name节点的clusterID一致,重启集群即可。
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询
广告 您可能关注的内容 |