[ 
https://issues.apache.org/jira/browse/HDFS-771?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12777806#action_12777806
 ] 

Konstantin Boudnik commented on HDFS-771:
-----------------------------------------

After all it seems to be a race condition in the Jetty, e.g. (NameNode:367)
{noformat}
    this.httpServer.start();
{noformat}

Appropriate log file
{noformat}
2009-11-13 07:02:04,605 INFO  http.HttpServer (HttpServer.java:start(432)) - 
Port returned by webServer.getConnectors()[0].getLocalPort() before open() is 
-1. Opening the listener on 0
2009-11-13 07:02:04,606 INFO  http.HttpServer (HttpServer.java:start(437)) - 
listener.getLocalPort() returned 37817 
webServer.getConnectors()[0].getLocalPort() returned 37817
2009-11-13 07:02:04,607 INFO  http.HttpServer (HttpServer.java:start(470)) - 
Jetty bound to port 37817
2009-11-13 07:02:04,607 INFO  mortbay.log (?:invoke0(?)) - jetty-6.1.14
2009-11-13 07:03:04,231 INFO  mortbay.log (?:invoke0(?)) - Started 
selectchannelconnec...@localhost:37817
{noformat}

And the this code is executed (NameNode:370-371)
{noformat}
    // The web-server port can be ephemeral... ensure we have the correct info
    infoPort = this.httpServer.getPort();
    this.httpAddress = new InetSocketAddress(infoHost, infoPort);
{noformat}
and {{this.httpServer.getPort();}} returns -1 as the infoPort value

I'll try to work out a minimal test case to reproduce this problem, however it 
might be hard.

> NameNode's HttpServer can't instantiate InetSocketAddress: 
> IllegalArgumentException is thrown
> ---------------------------------------------------------------------------------------------
>
>                 Key: HDFS-771
>                 URL: https://issues.apache.org/jira/browse/HDFS-771
>             Project: Hadoop HDFS
>          Issue Type: Bug
>          Components: name-node
>    Affects Versions: 0.22.0
>         Environment: Apache Hudson build machine
>            Reporter: Konstantin Boudnik
>            Priority: Blocker
>         Attachments: testEditLog.html
>
>
> In an execution of a tests the following exception has been thrown:
> {noformat}
> Error Message
> port out of range:-1
> Stacktrace
> 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:371)
>       at 
> org.apache.hadoop.hdfs.server.namenode.NameNode.activate(NameNode.java:313)
>       at 
> org.apache.hadoop.hdfs.server.namenode.NameNode.initialize(NameNode.java:304)
>       at 
> org.apache.hadoop.hdfs.server.namenode.NameNode.<init>(NameNode.java:410)
>       at 
> org.apache.hadoop.hdfs.server.namenode.NameNode.<init>(NameNode.java:404)
>       at 
> org.apache.hadoop.hdfs.server.namenode.NameNode.createNameNode(NameNode.java:1211)
>       at org.apache.hadoop.hdfs.MiniDFSCluster.<init>(MiniDFSCluster.java:287)
>       at org.apache.hadoop.hdfs.MiniDFSCluster.<init>(MiniDFSCluster.java:131)
>       at 
> org.apache.hadoop.hdfs.server.namenode.TestEditLog.testEditLog(TestEditLog.java:92)
> {noformat}

-- 
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