我是在阿里云上配置的,云上的配置只看了13-6.7.8
之后就从前面开始一点点往后做了
使用的包都是前面的课程提到的
hadoop-2.6.0-cdh5.15.1.tar.gz
jdk-8u91-linux-x64.tar.gz
执行 hdfs namenode -format 时,提示
21/02/17 21:16:50 INFO namenode.FSImage: Allocated new BlockPoolId: BP-332358726-172.17.239.134-1613567810743
21/02/17 21:16:50 WARN namenode.NameNode: Encountered exception during format:
java.io.IOException: Cannot create directory /home/hadoop/app/tmp/dfs/name/current
at org.apache.hadoop.hdfs.server.common.StorageStorageDirectory.clearDirectory(Storage.java:358)atorg.apache.hadoop.hdfs.server.namenode.NNStorage.format(NNStorage.java:573)atorg.apache.hadoop.hdfs.server.namenode.NNStorage.format(NNStorage.java:594)atorg.apache.hadoop.hdfs.server.namenode.FSImage.format(FSImage.java:174)atorg.apache.hadoop.hdfs.server.namenode.NameNode.format(NameNode.java:1047)atorg.apache.hadoop.hdfs.server.namenode.NameNode.createNameNode(NameNode.java:1488)atorg.apache.hadoop.hdfs.server.namenode.NameNode.main(NameNode.java:1615)21/02/1721:16:50ERRORnamenode.NameNode:Failedtostartnamenode.java.io.IOException:Cannotcreatedirectory/home/hadoop/app/tmp/dfs/name/currentatorg.apache.hadoop.hdfs.server.common.StorageStorageDirectory.clearDirectory(Storage.java:358)
at org.apache.hadoop.hdfs.server.namenode.NNStorage.format(NNStorage.java:573)
at org.apache.hadoop.hdfs.server.namenode.NNStorage.format(NNStorage.java:594)
at org.apache.hadoop.hdfs.server.namenode.FSImage.format(FSImage.java:174)
at org.apache.hadoop.hdfs.server.namenode.NameNode.format(NameNode.java:1047)
at org.apache.hadoop.hdfs.server.namenode.NameNode.createNameNode(NameNode.java:1488)
at org.apache.hadoop.hdfs.server.namenode.NameNode.main(NameNode.java:1615)
21/02/17 21:16:50 ERROR namenode.NameNode: Failed to start namenode.
java.io.IOException: Cannot create directory /home/hadoop/app/tmp/dfs/name/current
at org.apache.hadoop.hdfs.server.common.StorageStorageDirectory.clearDirectory(Storage.java:358)atorg.apache.hadoop.hdfs.server.namenode.NNStorage.format(NNStorage.java:573)atorg.apache.hadoop.hdfs.server.namenode.NNStorage.format(NNStorage.java:594)atorg.apache.hadoop.hdfs.server.namenode.FSImage.format(FSImage.java:174)atorg.apache.hadoop.hdfs.server.namenode.NameNode.format(NameNode.java:1047)atorg.apache.hadoop.hdfs.server.namenode.NameNode.createNameNode(NameNode.java:1488)atorg.apache.hadoop.hdfs.server.namenode.NameNode.main(NameNode.java:1615)21/02/1721:16:50ERRORnamenode.NameNode:Failedtostartnamenode.java.io.IOException:Cannotcreatedirectory/home/hadoop/app/tmp/dfs/name/currentatorg.apache.hadoop.hdfs.server.common.StorageStorageDirectory.clearDirectory(Storage.java:358)
at org.apache.hadoop.hdfs.server.namenode.NNStorage.format(NNStorage.java:573)
at org.apache.hadoop.hdfs.server.namenode.NNStorage.format(NNStorage.java:594)
at org.apache.hadoop.hdfs.server.namenode.FSImage.format(FSImage.java:174)
at org.apache.hadoop.hdfs.server.namenode.NameNode.format(NameNode.java:1047)
at org.apache.hadoop.hdfs.server.namenode.NameNode.createNameNode(NameNode.java:1488)
at org.apache.hadoop.hdfs.server.namenode.NameNode.main(NameNode.java:1615)
21/02/17 21:16:50 INFO util.ExitUtil: Exiting with status 1
21/02/17 21:16:50 INFO namenode.NameNode: SHUTDOWN_MSG:
/************************************************************
SHUTDOWN_MSG: Shutting down NameNode at hadoop000/172.17.239.134
************************************************************/
暂时不知道错误在哪
第二次编辑
对比了一下 3-11HDFS格式化 和后面的阿里云配置 13-10 HDFS部署,找到了不同的地方
尝试在 vi hdfs-site.xml
中修改成下图
依然报错
21/02/17 22:35:41 WARN namenode.NameNode: Encountered exception during format:
java.io.IOException: Cannot create directory /home/hadoop/app/tmp/dfs/name/current
at org.apache.hadoop.hdfs.server.common.StorageStorageDirectory.clearDirectory(Storage.java:358)atorg.apache.hadoop.hdfs.server.namenode.NNStorage.format(NNStorage.java:573)atorg.apache.hadoop.hdfs.server.namenode.NNStorage.format(NNStorage.java:594)atorg.apache.hadoop.hdfs.server.namenode.FSImage.format(FSImage.java:174)atorg.apache.hadoop.hdfs.server.namenode.NameNode.format(NameNode.java:1047)atorg.apache.hadoop.hdfs.server.namenode.NameNode.createNameNode(NameNode.java:1488)atorg.apache.hadoop.hdfs.server.namenode.NameNode.main(NameNode.java:1615)21/02/1722:35:41ERRORnamenode.NameNode:Failedtostartnamenode.java.io.IOException:Cannotcreatedirectory/home/hadoop/app/tmp/dfs/name/currentatorg.apache.hadoop.hdfs.server.common.StorageStorageDirectory.clearDirectory(Storage.java:358)
at org.apache.hadoop.hdfs.server.namenode.NNStorage.format(NNStorage.java:573)
at org.apache.hadoop.hdfs.server.namenode.NNStorage.format(NNStorage.java:594)
at org.apache.hadoop.hdfs.server.namenode.FSImage.format(FSImage.java:174)
at org.apache.hadoop.hdfs.server.namenode.NameNode.format(NameNode.java:1047)
at org.apache.hadoop.hdfs.server.namenode.NameNode.createNameNode(NameNode.java:1488)
at org.apache.hadoop.hdfs.server.namenode.NameNode.main(NameNode.java:1615)
21/02/17 22:35:41 ERROR namenode.NameNode: Failed to start namenode.
java.io.IOException: Cannot create directory /home/hadoop/app/tmp/dfs/name/current
at org.apache.hadoop.hdfs.server.common.StorageStorageDirectory.clearDirectory(Storage.java:358)atorg.apache.hadoop.hdfs.server.namenode.NNStorage.format(NNStorage.java:573)atorg.apache.hadoop.hdfs.server.namenode.NNStorage.format(NNStorage.java:594)atorg.apache.hadoop.hdfs.server.namenode.FSImage.format(FSImage.java:174)atorg.apache.hadoop.hdfs.server.namenode.NameNode.format(NameNode.java:1047)atorg.apache.hadoop.hdfs.server.namenode.NameNode.createNameNode(NameNode.java:1488)atorg.apache.hadoop.hdfs.server.namenode.NameNode.main(NameNode.java:1615)21/02/1722:35:41ERRORnamenode.NameNode:Failedtostartnamenode.java.io.IOException:Cannotcreatedirectory/home/hadoop/app/tmp/dfs/name/currentatorg.apache.hadoop.hdfs.server.common.StorageStorageDirectory.clearDirectory(Storage.java:358)
at org.apache.hadoop.hdfs.server.namenode.NNStorage.format(NNStorage.java:573)
at org.apache.hadoop.hdfs.server.namenode.NNStorage.format(NNStorage.java:594)
at org.apache.hadoop.hdfs.server.namenode.FSImage.format(FSImage.java:174)
at org.apache.hadoop.hdfs.server.namenode.NameNode.format(NameNode.java:1047)
at org.apache.hadoop.hdfs.server.namenode.NameNode.createNameNode(NameNode.java:1488)
at org.apache.hadoop.hdfs.server.namenode.NameNode.main(NameNode.java:1615)
21/02/17 22:35:41 INFO util.ExitUtil: Exiting with status 1
21/02/17 22:35:41 INFO namenode.NameNode: SHUTDOWN_MSG:
/************************************************************
SHUTDOWN_MSG: Shutting down NameNode at hadoop000/172.17.239.134
************************************************************/
登录后可查看更多问答,登录/注册