Ahmad Humayun wrote:
Whenever I run bin/start-dfs.sh, I get this out of range port error:

starting namenode, logging to
/home/ahmad/bin/hadoop-0.16.3/bin/../logs/hadoop-ahmad-namenode-linux-main.out
Password:
localhost: starting datanode, logging to
/home/ahmad/bin/hadoop-0.16.3/bin/../logs/hadoop-ahmad-datanode-linux-main.out
Password:
localhost: starting secondarynamenode, logging to
/home/ahmad/bin/hadoop-0.16.3/bin/../logs/hadoop-ahmad-secondarynamenode-linux-main.out
localhost: Exception in thread "main" java.lang.IllegalArgumentException:
port out of range:-1
localhost:      at
java.net.InetSocketAddress.<init>(InetSocketAddress.java:118)
localhost:      at
org.apache.hadoop.net.NetUtils.createSocketAddr(NetUtils.java:125)
localhost:      at
org.apache.hadoop.dfs.SecondaryNameNode.<init>(SecondaryNameNode.java:117)
localhost:      at
org.apache.hadoop.dfs.SecondaryNameNode.main(SecondaryNameNode.java:494)


Any ideas how to solve this? Do I need to open some port on my network ...
even though I am running hadoop on a single machine?

Well, the secondary name node is trying to listen on port -1, which is out the range 0-65535, hence the error.

I would skip trying to create a secondary name node. If you do have to run it, find out the configuration parameters for ports and fix it. Pasting that stack trace at the IDE points me at the following parameters

      NetUtils.getServerAddress(conf,
                                "dfs.secondary.info.bindAddress",
                                "dfs.secondary.info.port",
                                "dfs.secondary.http.address")

so, check the bindAddress and port values

Reply via email to