[ 
https://issues.apache.org/jira/browse/HADOOP-6528?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12806804#action_12806804
 ] 

Hemanth Yamijala commented on HADOOP-6528:
------------------------------------------

The said test failure can be seen [here|http://tinyurl.com/ylklluv]

The test was starting a NameNode as part of a MiniDFSCluster. In the process of 
doing this, I see the following in the log file:

2010-01-30 16:02:53,658 INFO http.HttpServer (HttpServer.java:start(442)) - 
Port returned by webServer.getConnectors()[0].getLocalPort() before open() is 
-1. Opening the listener on 0
2010-01-30 16:02:53,659 INFO http.HttpServer (HttpServer.java:start(447)) - 
listener.getLocalPort() returned 38815 
webServer.getConnectors()[0].getLocalPort() returned 38815
2010-01-30 16:02:53,659 INFO http.HttpServer (HttpServer.java:start(480)) - 
Jetty bound to port 38815

However, the NameNode initialization failed as:

{code}
java.lang.IllegalArgumentException: port out of range:-1
        at java.net.InetSocketAddress.<init>(InetSocketAddress.java:118)
        at 
org.apache.hadoop.hdfs.server.namenode.NameNode.startHttpServer(NameNode.java:377)
        at 
org.apache.hadoop.hdfs.server.namenode.NameNode.activate(NameNode.java:317)
        at 
org.apache.hadoop.hdfs.server.namenode.NameNode.initialize(NameNode.java:308)
        at 
org.apache.hadoop.hdfs.server.namenode.NameNode.<init>(NameNode.java:421)
        at 
org.apache.hadoop.hdfs.server.namenode.NameNode.<init>(NameNode.java:410)
        at 
org.apache.hadoop.hdfs.server.namenode.NameNode.createNameNode(NameNode.java:1261)
        at org.apache.hadoop.hdfs.MiniDFSCluster.<init>(MiniDFSCluster.java:278)
        at org.apache.hadoop.hdfs.MiniDFSCluster.<init>(MiniDFSCluster.java:127)
        at 
org.apache.hadoop.mapred.ClusterMapReduceTestCase.startCluster(ClusterMapReduceTestCase.java:81)
        at 
org.apache.hadoop.mapred.ClusterMapReduceTestCase.setUp(ClusterMapReduceTestCase.java:56)
{code}

The call in NameNode just before this Socket creation does HttpServer.getPort() 
that seems to be returning -1.

A similar failure has been seen before in Map/Reduce, and was tracked in 
HADOOP-4744. After some struggle in trying to determine the root cause along 
with Jetty folks, I think we worked around in Map/Reduce by reinitializing the 
MR server whenever getPort returns -1. I think we need a more permanent fix, as 
this is now being seen in other daemons as well.

> Jetty returns -1 resulting in Hadoop masters / slaves to fail during startup.
> -----------------------------------------------------------------------------
>
>                 Key: HADOOP-6528
>                 URL: https://issues.apache.org/jira/browse/HADOOP-6528
>             Project: Hadoop Common
>          Issue Type: Bug
>            Reporter: Hemanth Yamijala
>
> A recent test failure on Hudson seems to indicate that Jetty's 
> Server.getConnectors()[0].getLocalPort() is returning -1 in the 
> HttpServer.getPort() method. When this happens, Hadoop masters / slaves that 
> use Jetty fail to startup correctly.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.

Reply via email to