Cannot lock storage /tmp/hadoop-root/dfs/name. The directory is already locked.

Posted wzjhoutai

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了Cannot lock storage /tmp/hadoop-root/dfs/name. The directory is already locked.相关的知识,希望对你有一定的参考价值。

[[email protected] bin]# ./hadoop namenode -format
12/05/21 06:13:51 INFO namenode.NameNode: STARTUP_MSG:
/************************************************************
STARTUP_MSG: Starting NameNode
STARTUP_MSG:   host = nn01/127.0.0.1
STARTUP_MSG:   args = [-format]
STARTUP_MSG:   version = 0.20.2
STARTUP_MSG:   build = https://svn.apache.org/repos/asf/hadoop/common/branches/branch-0.20 -r 911707; compiled by ‘chrisdo‘ on Fri Feb 19 08:07:34 UTC 2010
************************************************************/
Re-format filesystem in /tmp/hadoop-root/dfs/name ? (Y or N) Y
12/05/21 06:14:01 INFO namenode.FSNamesystem: fsOwner=root,root,bin,daemon,sys,adm,disk,wheel
12/05/21 06:14:01 INFO namenode.FSNamesystem: supergroup=supergroup
12/05/21 06:14:01 INFO namenode.FSNamesystem: isPermissionEnabled=true
12/05/21 06:14:01 INFO common.Storage: Cannot lock storage /tmp/hadoop-root/dfs/name. The directory is already locked.
12/05/21 06:14:01 ERROR namenode.NameNode: java.io.IOException: Cannot lock storage /tmp/hadoop-root/dfs/name. The directory is already locked.
        at org.apache.hadoop.hdfs.server.common.Storage$StorageDirectory.lock(Storage.java:510)
        at org.apache.hadoop.hdfs.server.namenode.FSImage.format(FSImage.java:1087)
        at org.apache.hadoop.hdfs.server.namenode.FSImage.format(FSImage.java:1110)
        at org.apache.hadoop.hdfs.server.namenode.NameNode.format(NameNode.java:856)
        at org.apache.hadoop.hdfs.server.namenode.NameNode.createNameNode(NameNode.java:948)
        at org.apache.hadoop.hdfs.server.namenode.NameNode.main(NameNode.java:965)

12/05/21 06:14:01 INFO namenode.NameNode: SHUTDOWN_MSG:
/************************************************************
SHUTDOWN_MSG: Shutting down NameNode at nn01/127.0.0.1

 

./hadoop namenode -format 命令是格式化命名空间。一定是在未启动  hadoop 服务的时候才干执行。出现这个错误提示是由于 hadoop 的服务是子执行状态。























以上是关于Cannot lock storage /tmp/hadoop-root/dfs/name. The directory is already locked.的主要内容,如果未能解决你的问题,请参考以下文章

无法完成安装:'Cannot access storage file '/

Git error: cannot lock ref

git cannot lock ref

linux用户管理,删除用户时出现问题cannot lock /etc/passwd

error: cannot lock ref ‘refs/remotes/origin/master‘

linux添加用户adduser出现 useradd:cannot lock /etc/passwd; try again