java.io.IOException: Cannot create directory /usr/local/hadoop/hdfs/name/current
at org.apache.hadoop.hdfs.server.common.Storage
StorageDirectory.clearDirectory(Storage.java:337)atorg.apache.hadoop.hdfs.server.namenode.NNStorage.format(NNStorage.java:548)atorg.apache.hadoop.hdfs.server.namenode.NNStorage.format(NNStorage.java:569)atorg.apache.hadoop.hdfs.server.namenode.FSImage.format(FSImage.java:161)atorg.apache.hadoop.hdfs.server.namenode.NameNode.format(NameNode.java:991)atorg.apache.hadoop.hdfs.server.namenode.NameNode.createNameNode(NameNode.java:1429)atorg.apache.hadoop.hdfs.server.namenode.NameNode.main(NameNode.java:1554)17/11/2216:54:44ERRORnamenode.NameNode:Failedtostartnamenode.java.io.IOException:Cannotcreatedirectory/usr/local/hadoop/hdfs/name/currentatorg.apache.hadoop.hdfs.server.common.Storage
StorageDirectory.clearDirectory(Storage.java:337)
at org.apache.hadoop.hdfs.server.namenode.NNStorage.format(NNStorage.java:548)
at org.apache.hadoop.hdfs.server.namenode.NNStorage.format(NNStorage.java:569)
at org.apache.hadoop.hdfs.server.namenode.FSImage.format(FSImage.java:161)
at org.apache.hadoop.hdfs.server.namenode.NameNode.format(NameNode.java:991)
at org.apache.hadoop.hdfs.server.namenode.NameNode.createNameNode(NameNode.java:1429)
at org.apache.hadoop.hdfs.server.namenode.NameNode.main(NameNode.java:1554)
17/11/22 16:54:44 INFO util.ExitUtil: Exiting with status 1
在hadoop初始化过程中发现文件创建失败,分析原因是权限不够,将hadoop安装目录的用户组进行修改:
chown -R ubuntu:ubuntu hadoop
重新初始化还是发现创建不了文件,分析是没有写权限:
chown -R a+w hadoop
然后启动成功
欢迎使用CSDN-markdown编辑器
最新推荐文章于 2021-01-07 23:01:28 发布