Posts: 6
Registered: ‎05-27-2019
Accepted Solution

Failed to start namenode. File does not exist

[ Edited ]

Facing this issue with the namenode down. It is a parcel based CDH 5.15.2 installation on AWS.


9:15:18.262 PM ERROR NameNode
Failed to start namenode. File does not exist: /user/spark/spark2ApplicationHistory/.5e9b4c52-032a-4469-b278-80aa6254cfdf
	at org.apache.hadoop.hdfs.server.namenode.INodeFile.valueOf(
	at org.apache.hadoop.hdfs.server.namenode.INodeFile.valueOf(
	at org.apache.hadoop.hdfs.server.namenode.FSEditLogLoader.applyEditLogOp(
	at org.apache.hadoop.hdfs.server.namenode.FSEditLogLoader.loadEditRecords(
	at org.apache.hadoop.hdfs.server.namenode.FSEditLogLoader.loadFSEdits(
	at org.apache.hadoop.hdfs.server.namenode.FSImage.loadEdits(
	at org.apache.hadoop.hdfs.server.namenode.FSImage.loadFSImage(
	at org.apache.hadoop.hdfs.server.namenode.FSImage.recoverTransitionRead(
	at org.apache.hadoop.hdfs.server.namenode.FSNamesystem.loadFSImage(
	at org.apache.hadoop.hdfs.server.namenode.FSNamesystem.loadFromDisk(
	at org.apache.hadoop.hdfs.server.namenode.NameNode.loadNamesystem(
	at org.apache.hadoop.hdfs.server.namenode.NameNode.initialize(
	at org.apache.hadoop.hdfs.server.namenode.NameNode.<init>(
	at org.apache.hadoop.hdfs.server.namenode.NameNode.<init>(
	at org.apache.hadoop.hdfs.server.namenode.NameNode.createNameNode(
	at org.apache.hadoop.hdfs.server.namenode.NameNode.main(
9:15:18.264 PM INFO ExitUtil
Exiting with status 1
9:15:18.265 PM INFO NameNode
SHUTDOWN_MSG: Shutting down NameNode at xxxx.xxxx.xxxx/**.**.**.**




Stuck from two days. Any help will be highly appreciated.



Expert Contributor
Posts: 108
Registered: ‎02-23-2018

Re: Failed to start namenode. File does not exist

Hi @urbanlad20,


Your error is: 

File does not exist: /user/spark/spark2ApplicationHistory/.5e9b4c52-032a-4469-b278-80aa6254cfdf



 Can you restart the spark installation ? it seems to be related.




Posts: 6
Registered: ‎05-27-2019

Re: Failed to start namenode. File does not exist

I've already tried deleting spark, then restarted the namenode, but it didn't help. Namenode is still looking for that file. Again I installed spark and restarted the namenode, still no luck
Posts: 1,111
Topics: 1
Kudos: 285
Solutions: 134
Registered: ‎04-22-2014

Re: Failed to start namenode. File does not exist

@urbanlad20 ,


That stack reminds me of HDFS-12369 but I also thought it should be fixed in CDH 5.12.2.

I think it would be good to have HDFS folks look at this; I'll move thread to HDFS.

Posts: 1,903
Kudos: 435
Solutions: 307
Registered: ‎07-31-2013

Re: Failed to start namenode. File does not exist

This looks like a case of edit logs getting reordered. As @bgooley noted, it is similar to HDFS-12369, where the OP_CLOSE is appearing after OP_DELETE causing the file to be absent when replaying the edits.

The simplest fix, depending on if this is the only file instance of the reordered issue in your edit logs, would be to run the NameNode manually in an edits-recovery mode and "skip" this edit when it catches the error. The rest of the edits should apply normally and let you start up your NameNode.

The recovery mode of NameNode is detailed at

If you're using CM, you'll need to use the NameNode's most recent generated configuration directory under /var/run/cloudera-scm-agent/process/ on the NameNode host as the HADOOP_CONF_DIR, while logged in as 'hdfs' user, before invoking the manual NameNode startup command.

Once you've followed the prompts and the NameNode appears to start up, quit out/kill it to restart from Cloudera Manager normally.

If you have a Support subscription, I'd recommend filing a case for this, as the process could get more involved depending on how widespread this issue is.