Wednesday, May 12, 2010

Hadoop Troubleshooting: Inconsitent storage detected, name and edits storage do not match

Encountered a error that prevented hadoop from starting. The namenode log contained the following:

/opt/hadoop-0.20.2/logs/hadoop-root-namenode-*.log

2010-05-12 13:42:16,406 INFO org.apache.hadoop.hdfs.server.namenode.NameNode: STARTUP_MSG:
/************************************************************
STARTUP_MSG: Starting NameNode
STARTUP_MSG: host = ...
STARTUP_MSG: args = []
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
************************************************************/
...
2010-05-12 13:42:16,690 INFO org.apache.hadoop.hdfs.server.namenode.FSNamesystem: Registered FSNamesystemStatusMBean
2010-05-12 13:42:16,737 ERROR org.apache.hadoop.hdfs.server.namenode.FSNamesystem: FSNamesystem initialization failed.
java.io.IOException: Inconsitent storage detected, name and edits storage do not match
at org.apache.hadoop.hdfs.server.namenode.FSImage.loadFSImage(FSImage.java:794)
at org.apache.hadoop.hdfs.server.namenode.FSImage.recoverTransitionRead(FSImage.java:364)
at org.apache.hadoop.hdfs.server.namenode.FSDirectory.loadFSImage(FSDirectory.java:87)
at org.apache.hadoop.hdfs.server.namenode.FSNamesystem.initialize(FSNamesystem.java:311)
at org.apache.hadoop.hdfs.server.namenode.FSNamesystem.(FSNamesystem.java:292)
at org.apache.hadoop.hdfs.server.namenode.NameNode.initialize(NameNode.java:201)
at org.apache.hadoop.hdfs.server.namenode.NameNode.(NameNode.java:279)
at org.apache.hadoop.hdfs.server.namenode.NameNode.createNameNode(NameNode.java:956)
at org.apache.hadoop.hdfs.server.namenode.NameNode.main(NameNode.java:965)
2010-05-12 13:42:16,739 INFO org.apache.hadoop.ipc.Server: Stopping server on 9000
2010-05-12 13:42:16,741 ERROR org.apache.hadoop.hdfs.server.namenode.NameNode: java.io.IOException: Inconsitent storage detected, name and edits storage do not match
at org.apache.hadoop.hdfs.server.namenode.FSImage.loadFSImage(FSImage.java:794)
at org.apache.hadoop.hdfs.server.namenode.FSImage.recoverTransitionRead(FSImage.java:364)
at org.apache.hadoop.hdfs.server.namenode.FSDirectory.loadFSImage(FSDirectory.java:87)
at org.apache.hadoop.hdfs.server.namenode.FSNamesystem.initialize(FSNamesystem.java:311)
at org.apache.hadoop.hdfs.server.namenode.FSNamesystem.(FSNamesystem.java:292)
at org.apache.hadoop.hdfs.server.namenode.NameNode.initialize(NameNode.java:201)
at org.apache.hadoop.hdfs.server.namenode.NameNode.(NameNode.java:279)
at org.apache.hadoop.hdfs.server.namenode.NameNode.createNameNode(NameNode.java:956)
at org.apache.hadoop.hdfs.server.namenode.NameNode.main(NameNode.java:965)
2010-05-12 13:42:16,742 INFO org.apache.hadoop.hdfs.server.namenode.NameNode: SHUTDOWN_MSG:


I noticed the timestamps were different between the following name and edits areas:

# ls -l /hadoop/dfs/edits/current/
total 12
-rw-r--r-- 1 root root 4 May 11 17:17 edits
-rw-r--r-- 1 root root 8 May 11 16:17 fstime
-rw-r--r-- 1 root root 101 May 11 16:17 VERSION

# ls -l /hadoop/dfs/name/current/
total 332
-rw-r--r-- 1 root root 326458 May 11 17:17 fsimage
-rw-r--r-- 1 root root 8 May 11 17:17 fstime
-rw-r--r-- 1 root root 101 May 11 17:17 VERSION
#


So I copied the latest version to the other and then hadoop started fine.

# cp /hadoop/dfs/name/current/fstime /hadoop/dfs/edits/current/
cp: overwrite `/hadoop/dfs/edits/current/fstime'? y
# cp /hadoop/dfs/name/current/VERSION /hadoop/dfs/edits/current/
cp: overwrite `/hadoop/dfs/edits/current/VERSION'? y
#

I wish I would have seen what the actual difference was but I was likely some timestamp of some sort possibly due to a unclean shutdown of the node itself.

Sunday, May 02, 2010

Love Sonnet LVI

Sweet love, renew thy force; be it not said
Thy edge should blunter be than appetite,
Which but to-day by feeding is allay'd,
To-morrow sharpened in his former might:
So, love, be thou, although to-day thou fill
Thy hungry eyes, even till they wink with fulness,
To-morrow see again, and do not kill
The spirit of love, with a perpetual dulness.
Let this sad interim like the ocean be
Which parts the shore, where two contracted new
Come daily to the banks, that when they see
Return of love, more blest may be the view;
    Or call it winter, which being full of care,
    Makes summer's welcome, thrice more wished, more rare.

(Shakespeare, William. Sonnet 56)