[
https://issues.apache.org/jira/browse/HDFS-1492?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12931790#action_12931790
]
Eli Collins commented on HDFS-1492:
-----------------------------------
Sounds like we should only export HADOOP_SLAVES if it's not set:
{noformat}
diff --git a/conf/hadoop-env.sh.template b/conf/hadoop-env.sh.template
index ce7ccc8..2eab90b 100644
--- a/conf/hadoop-env.sh.template
+++ b/conf/hadoop-env.sh.template
@@ -34,7 +34,7 @@ export HADOOP_JOBTRACKER_OPTS="-Dcom.sun.management.jmxremote
# export HADOOP_LOG_DIR=${HADOOP_HOME}/logs
# File naming remote slave hosts. $HADOOP_HOME/conf/slaves by default.
-# export HADOOP_SLAVES=${HADOOP_HOME}/conf/slaves
+# if [ "$HADOOP_SLAVES" == "" ]; then export HADOOP_SLAVES=${HADOOP_HOME}/conf/
# host:path where hadoop code should be rsync'd from. Unset by default.
# export HADOOP_MASTER=master:/home/$USER/src/hadoop
{noformat}
> Secondary NameNode starting issue
> ---------------------------------
>
> Key: HDFS-1492
> URL: https://issues.apache.org/jira/browse/HDFS-1492
> Project: Hadoop HDFS
> Issue Type: Bug
> Components: scripts
> Affects Versions: 0.20.2
> Environment: GNU/Linux
> Reporter: Guanpeng Xu
> Priority: Minor
>
> If the following setting is opened in conf/hadoop-env.sh:
> # File naming remote slave hosts. $HADOOP_HOME/conf/slaves by default.
> # 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)
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.