Uploaded image for project: 'Hadoop HDFS'
  1. Hadoop HDFS
  2. HDFS-1492

Secondary NameNode starting issue

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Minor
    • Resolution: Duplicate
    • Affects Version/s: 0.20.2
    • Fix Version/s: None
    • Component/s: scripts
    • Labels:
      None
    • Environment:

      GNU/Linux

      Description

      If the following setting is opened in conf/hadoop-env.sh:

      1. File naming remote slave hosts. $HADOOP_HOME/conf/slaves by default.
      2. export HADOOP_SLAVES=${HADOOP_HOME}/conf/slaves

      Secondary NameNode servers will be mis-started at the servers listed in the specified file.

      This is because the script slaves.sh, which is the program that really starts secondary
      NameNode servers, sets environment variables by sourcing bin/hadoop-config.sh.
      And when sourcing bin/hadoop-config.sh, conf/hadoop-env.sh will be sourced too.
      If HADOOP_SLAVES is set in hadoop-env.sh, it will override the previous value specified
      with --host at the command line argument by start-dfs.sh.

      This will result in BindException:

      Exception in thread "main" java.net.BindException: Cannot assign requested address
      at sun.nio.ch.Net.bind(Native Method)
      at sun.nio.ch.ServerSocketChannelImpl.bind(ServerSocketChannelImpl.java:119)
      at sun.nio.ch.ServerSocketAdaptor.bind(ServerSocketAdaptor.java:59)
      at org.mortbay.jetty.nio.SelectChannelConnector.open(SelectChannelConnector.java:216)
      at org.apache.hadoop.http.HttpServer.start(HttpServer.java:427)
      at org.apache.hadoop.hdfs.server.namenode.SecondaryNameNode.initialize(SecondaryNameNode.java:165)
      at org.apache.hadoop.hdfs.server.namenode.SecondaryNameNode.<init>(SecondaryNameNode.java:115)
      at org.apache.hadoop.hdfs.server.namenode.SecondaryNameNode.main(SecondaryNameNode.java:476)

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                Unassigned
                Reporter:
                xgp Guanpeng Xu
              • Votes:
                0 Vote for this issue
                Watchers:
                2 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: