Home Forums HDP on Linux – Installation Error starting NameNode with HDP 1.1.3

This topic contains 9 replies, has 3 voices, and was last updated by  Thomas D 10 months, 1 week ago.

  • Creator
    Topic
  • #47323

    Thomas D
    Participant

    Hello,

    I’m trying to install HortonWorks 1.3.3 following this procedure

    But when trying to start the namenode (on chapter 4), I get an error telling me the namenode is not formatted, although I did it previously.
    I ran these commands:

    su hdfs
    /usr/lib/hadoop/bin/hadoop namenode -format
    /usr/lib/hadoop/bin/hadoop-daemon.sh --config $HADOOP_CONF_DIR start namenode

    When checking the log, I can see this:

    2014-01-23 11:13:36,712 INFO org.apache.hadoop.hdfs.util.GSet: recommended=1048576, actual=1048576
    2014-01-23 11:13:36,730 ERROR org.apache.hadoop.hdfs.server.namenode.FSNamesystem: FSNamesystem initialization failed.
    java.io.IOException: NameNode is not formatted.
    at org.apache.hadoop.hdfs.server.namenode.FSImage.recoverTransitionRead(FSImage.java:316)
    at org.apache.hadoop.hdfs.server.namenode.FSDirectory.loadFSImage(FSDirectory.java:144)
    at org.apache.hadoop.hdfs.server.namenode.FSNamesystem.initialize(FSNamesystem.java:466)
    at org.apache.hadoop.hdfs.server.namenode.FSNamesystem.<init>(FSNamesystem.java:432)
    at org.apache.hadoop.hdfs.server.namenode.NameNode.initialize(NameNode.java:302)
    at org.apache.hadoop.hdfs.server.namenode.NameNode.<init>(NameNode.java:585)
    at org.apache.hadoop.hdfs.server.namenode.NameNode.createNameNode(NameNode.java:1523)
    at org.apache.hadoop.hdfs.server.namenode.NameNode.main(NameNode.java:1532)
    2014-01-23 11:13:36,740 ERROR org.apache.hadoop.hdfs.server.namenode.NameNode: java.io.IOException: NameNode is not formatted.
    at org.apache.hadoop.hdfs.server.namenode.FSImage.recoverTransitionRead(FSImage.java:316)
    at org.apache.hadoop.hdfs.server.namenode.FSDirectory.loadFSImage(FSDirectory.java:144)
    at org.apache.hadoop.hdfs.server.namenode.FSNamesystem.initialize(FSNamesystem.java:466)
    at org.apache.hadoop.hdfs.server.namenode.FSNamesystem.<init>(FSNamesystem.java:432)
    at org.apache.hadoop.hdfs.server.namenode.NameNode.initialize(NameNode.java:302)
    at org.apache.hadoop.hdfs.server.namenode.NameNode.<init>(NameNode.java:585)
    at org.apache.hadoop.hdfs.server.namenode.NameNode.createNameNode(NameNode.java:1523)
    at org.apache.hadoop.hdfs.server.namenode.NameNode.main(NameNode.java:1532)

    I can try to format the namenode again and again but it doesn’t seem to work.
    Does any one have any idea ?

Viewing 9 replies - 1 through 9 (of 9 total)

You must be logged in to reply to this topic.

  • Author
    Replies
  • #47411

    Thomas D
    Participant

    Well, It seems it makes no difference.

    * I created new dn, nn, sn directories,
    * changed the right of the directories,
    * changed the hdfs-site.xml and core-site.xml
    * formated the nn

    But nothing changed .

    Collapse
    #47407

    Dave
    Moderator

    Hi Thomas,

    Can you modify the NN and DN directories in the hdfs site to something else?
    Then try and format the namenode and see if that makes a difference.

    Thanks

    Dave

    Collapse
    #47406

    Thomas D
    Participant

    Hi,

    It’s a new VM.
    The directory exists

    [hdfs@horton hdfs]$ pwd
    /horton/hadoop/hdfs
    [hdfs@horton hdfs]$ ll
    total 12
    drwxr-xr-x. 2 hdfs hadoop 4096 22 janv. 18:45 dn
    drwxr-xr-x. 2 hdfs hadoop 4096 24 janv. 10:52 nn
    drwxr-xr-x. 2 hdfs hadoop 4096 22 janv. 18:38 snn

    and there is enough space on it :

    [hdfs@horton hdfs]$ df -h
    Filesystem Size Used Avail Use% Mounted on
    /dev/mapper/VolGroup-lv_root 8,5G 1,6G 6,4G 20% /
    tmpfs 246M 0 246M 0% /dev/shm
    /dev/sda1 485M 33M 427M 8% /boot

    Collapse
    #47405

    Dave
    Moderator

    Hi Thomas,

    Is /horton a mount point?
    Can you check that there is enough space on this mount / or this directory?
    Does this directory exist and does the hdfs user have correct permissions to it as below:

    drwxr-xr-x 5 root root 4096 Jan 22 18:13 .
    drwxr-xr-x 7 root root 4096 Jan 22 18:00 ..
    drwxr-x— 3 hdfs hadoop 4096 Jan 23 20:09 data
    drwxr-xr-x 3 hdfs hadoop 4096 Jan 23 20:09 namenode
    drwxr-xr-x 3 hdfs hadoop 4096 Jan 22 18:09 namesecondary
    [root@HDP20AMB2 hdfs]# pwd
    /hadoop/hdfs

    Thanks

    Dave

    Collapse
    #47404

    Thomas D
    Participant

    Hi Dave,

    I tried to force format, but the same error occurs. I configured the hdfs-site.xml, but I don’t know if it’s correct !
    My machine is named “horton”, and following this chapter http://docs.hortonworks.com/HDPDocuments/HDP1/HDP-1.3.3/bk_installing_manually_book/content/rpm_chap3.html, I configured like this:


    <property>
    <name>dfs.name.dir</name>
    <!-- cluster variant -->
    <value>/horton/hadoop/hdfs/nn</value>
    <description>
    Determines where on the local filesystem the DFS name node
    should store the name table. If this is a comma-delimited list
    of directories then the name table is replicated in all of the
    directories, for redundancy.
    </description>
    <final>true</final>
    </property>
    <property>
    <name>dfs.data.dir</name>
    <value>/horton/hadoop/hdfs/dn</value>
    <description>
    Determines where on the local filesystem an DFS data node
    should store its blocks. If this is a comma-delimited
    list of directories, then data will be stored in all named
    directories, typically on different devices.
    Directories that do not exist are ignored.
    </description>
    <final>true</final>
    </property>
    <property>
    <name>dfs.http.address</name>
    <value>horton:50070</value>
    <description>
    The name of the default file system. Either the
    literal string "local" or a host:port for NDFS.
    </description>
    <final>true</final>
    </property>
    <property>
    <!-- cluster variant -->
    <name>dfs.secondary.http.address</name>
    <value>horton:50090</value>
    <description>Address of secondary namenode web server</description>
    </property>
    <property>
    <name>dfs.https.address</name>
    <value>horton:50470</value>
    <description>The https address where namenode binds</description>
    </property>

    Collapse
    #47401

    Dave
    Moderator

    Hi Thomas,

    What happens if you run:

    su – hdfs
    hadoop namenode -format -force

    (you should be able to run this from any directory as hdfs user)

    Also, have you configured the hdfs-site.xml correctly?

    Thanks

    Dave

    Collapse
    #47399

    Thomas D
    Participant

    Off course:


    [root@horton conf]# su hdfs
    [hdfs@horton conf]$ /usr/lib/hadoop/bin/hadoop namenode -format
    14/01/24 09:24:47 INFO namenode.NameNode: STARTUP_MSG:
    /************************************************************
    STARTUP_MSG: Starting NameNode
    STARTUP_MSG: host = horton/192.168.2.148
    STARTUP_MSG: args = [-format]
    STARTUP_MSG: version = 1.2.0.1.3.3.0-58
    STARTUP_MSG: build = git://c64-s15/ on branch condorM30-1.2.0 -r 7f8bae036417f4e4bcae4e5752252e05b92d54ef; compiled by 'jenkins' on Sun Nov 17 17:17:23 PST 2013
    STARTUP_MSG: java = 1.6.0_31
    ************************************************************/
    Re-format filesystem in /tmp/hadoop-hdfs/dfs/name ? (Y or N) Y
    14/01/24 09:24:49 INFO util.GSet: Computing capacity for map BlocksMap
    14/01/24 09:24:49 INFO util.GSet: VM type = 64-bit
    14/01/24 09:24:49 INFO util.GSet: 2.0% max memory = 1013645312
    14/01/24 09:24:49 INFO util.GSet: capacity = 2^21 = 2097152 entries
    14/01/24 09:24:49 INFO util.GSet: recommended=2097152, actual=2097152
    14/01/24 09:24:49 INFO namenode.FSNamesystem: fsOwner=hdfs
    14/01/24 09:24:49 INFO namenode.FSNamesystem: supergroup=supergroup
    14/01/24 09:24:49 INFO namenode.FSNamesystem: isPermissionEnabled=true
    14/01/24 09:24:49 INFO namenode.FSNamesystem: dfs.block.invalidate.limit=100
    14/01/24 09:24:49 INFO namenode.FSNamesystem: isAccessTokenEnabled=false accessKeyUpdateInterval=0 min(s), accessTokenLifetime=0 min(s)
    14/01/24 09:24:49 INFO namenode.FSEditLog: dfs.namenode.edits.toleration.length = 0
    14/01/24 09:24:49 INFO namenode.NameNode: Caching file names occuring more than 10 times
    14/01/24 09:24:49 INFO util.GSet: Computing capacity for map INodeMap
    14/01/24 09:24:49 INFO util.GSet: VM type = 64-bit
    14/01/24 09:24:49 INFO util.GSet: 1.0% max memory = 1013645312
    14/01/24 09:24:49 INFO util.GSet: capacity = 2^20 = 1048576 entries
    14/01/24 09:24:49 INFO util.GSet: recommended=1048576, actual=1048576
    14/01/24 09:24:50 INFO common.Storage: Image file /tmp/hadoop-hdfs/dfs/name/current/fsimage of size 163 bytes saved in 0 seconds.
    14/01/24 09:24:50 INFO namenode.FSEditLog: closing edit log: position=4, editlog=/tmp/hadoop-hdfs/dfs/name/current/edits
    14/01/24 09:24:50 INFO namenode.FSEditLog: close success: truncate to 4, editlog=/tmp/hadoop-hdfs/dfs/name/current/edits
    14/01/24 09:24:50 INFO common.Storage: Storage directory /tmp/hadoop-hdfs/dfs/name has been successfully formatted.
    14/01/24 09:24:50 INFO namenode.NameNode: SHUTDOWN_MSG:
    /************************************************************
    SHUTDOWN_MSG: Shutting down NameNode at horton/192.168.2.148
    ************************************************************/
    [hdfs@horton conf]$

    /usr/lib/hadoop/bin/hadoop-daemon.sh --config $HADOOP_CONF_DIR start namenode
    starting namenode, logging to /var/log/hadoop/root/hadoop-root-namenode-horton.out
    [root@horton conf]#

    Here you are.

    Collapse
    #47333

    Kenny Zhang
    Moderator

    Hi Thomas,

    Can you also share the output of the format command you ran?

    Thanks,
    Kenny

    Collapse
    #47332
    Collapse
Viewing 9 replies - 1 through 9 (of 9 total)