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

Xiao Chen commented on HDFS-7553:
---------------------------------

I met a similar reoccurrence of this failure in a run of 
[HDFS-9519|https://issues.apache.org/jira/browse/HDFS-9519?focusedCommentId=15050540&page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#comment-15050540]:
 
{{TestDFSUpgradeWithHA#testCannotUpgradeSecondNameNode}} failed with stack 
trace 
{noformat}
java.lang.AssertionError: Expected to find 'It looks like the shared log is 
already being upgraded' but got unexpected exception:java.net.BindException: 
Port in use: localhost:51012
        at 
org.apache.hadoop.http.HttpServer2.openListeners(HttpServer2.java:910)
        at org.apache.hadoop.http.HttpServer2.start(HttpServer2.java:847)
        at 
org.apache.hadoop.hdfs.server.namenode.NameNodeHttpServer.start(NameNodeHttpServer.java:142)
        at 
org.apache.hadoop.hdfs.server.namenode.NameNode.startHttpServer(NameNode.java:822)
        at 
org.apache.hadoop.hdfs.server.namenode.NameNode.initialize(NameNode.java:675)
        at 
org.apache.hadoop.hdfs.server.namenode.NameNode.<init>(NameNode.java:884)
        at 
org.apache.hadoop.hdfs.server.namenode.NameNode.<init>(NameNode.java:863)
        at 
org.apache.hadoop.hdfs.server.namenode.NameNode.createNameNode(NameNode.java:1565)
        at 
org.apache.hadoop.hdfs.MiniDFSCluster.restartNameNode(MiniDFSCluster.java:2017)
        at 
org.apache.hadoop.hdfs.server.namenode.ha.TestDFSUpgradeWithHA.testCannotUpgradeSecondNameNode(TestDFSUpgradeWithHA.java:756)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at 
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
        at 
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
        at java.lang.reflect.Method.invoke(Method.java:606)
        at 
org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:47)
        at 
org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:12)
        at 
org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:44)
        at 
org.junit.internal.runners.statements.InvokeMethod.evaluate(InvokeMethod.java:17)
        at 
org.junit.internal.runners.statements.RunBefores.evaluate(RunBefores.java:26)
        at org.junit.runners.ParentRunner.runLeaf(ParentRunner.java:271)
        at 
org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:70)
        at 
org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:50)
        at org.junit.runners.ParentRunner$3.run(ParentRunner.java:238)
        at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:63)
        at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:236)
        at org.junit.runners.ParentRunner.access$000(ParentRunner.java:53)
        at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:229)
        at org.junit.runners.ParentRunner.run(ParentRunner.java:309)
        at 
org.apache.maven.surefire.junit4.JUnit4Provider.execute(JUnit4Provider.java:264)
        at 
org.apache.maven.surefire.junit4.JUnit4Provider.executeTestSet(JUnit4Provider.java:153)
        at 
org.apache.maven.surefire.junit4.JUnit4Provider.invoke(JUnit4Provider.java:124)
        at 
org.apache.maven.surefire.booter.ForkedBooter.invokeProviderInSameClassLoader(ForkedBooter.java:200)
        at 
org.apache.maven.surefire.booter.ForkedBooter.runSuitesInProcess(ForkedBooter.java:153)
        at 
org.apache.maven.surefire.booter.ForkedBooter.main(ForkedBooter.java:103)
Caused by: java.net.BindException: Address already in use
        at sun.nio.ch.Net.bind0(Native Method)
        at sun.nio.ch.Net.bind(Net.java:463)
        at sun.nio.ch.Net.bind(Net.java:455)
        at 
sun.nio.ch.ServerSocketChannelImpl.bind(ServerSocketChannelImpl.java:223)
        at sun.nio.ch.ServerSocketAdaptor.bind(ServerSocketAdaptor.java:74)
        at 
org.mortbay.jetty.nio.SelectChannelConnector.open(SelectChannelConnector.java:216)
        at 
org.apache.hadoop.http.HttpServer2.openListeners(HttpServer2.java:905)
        ... 33 more

        at sun.nio.ch.Net.bind0(Native Method)
        at sun.nio.ch.Net.bind(Net.java:463)
        at sun.nio.ch.Net.bind(Net.java:455)
        at 
sun.nio.ch.ServerSocketChannelImpl.bind(ServerSocketChannelImpl.java:223)
        at sun.nio.ch.ServerSocketAdaptor.bind(ServerSocketAdaptor.java:74)
        at 
org.mortbay.jetty.nio.SelectChannelConnector.open(SelectChannelConnector.java:216)
        at 
org.apache.hadoop.http.HttpServer2.openListeners(HttpServer2.java:905)
        at org.apache.hadoop.http.HttpServer2.start(HttpServer2.java:847)
        at 
org.apache.hadoop.hdfs.server.namenode.NameNodeHttpServer.start(NameNodeHttpServer.java:142)
        at 
org.apache.hadoop.hdfs.server.namenode.NameNode.startHttpServer(NameNode.java:822)
        at 
org.apache.hadoop.hdfs.server.namenode.NameNode.initialize(NameNode.java:675)
        at 
org.apache.hadoop.hdfs.server.namenode.NameNode.<init>(NameNode.java:884)
        at 
org.apache.hadoop.hdfs.server.namenode.NameNode.<init>(NameNode.java:863)
        at 
org.apache.hadoop.hdfs.server.namenode.NameNode.createNameNode(NameNode.java:1565)
        at 
org.apache.hadoop.hdfs.MiniDFSCluster.restartNameNode(MiniDFSCluster.java:2017)
        at 
org.apache.hadoop.hdfs.server.namenode.ha.TestDFSUpgradeWithHA.testCannotUpgradeSecondNameNode(TestDFSUpgradeWithHA.java:756)
{noformat}

> fix the TestDFSUpgradeWithHA due to BindException
> -------------------------------------------------
>
>                 Key: HDFS-7553
>                 URL: https://issues.apache.org/jira/browse/HDFS-7553
>             Project: Hadoop HDFS
>          Issue Type: Test
>          Components: test
>    Affects Versions: 2.7.0
>            Reporter: Liang Xie
>            Assignee: Liang Xie
>              Labels: BB2015-05-TBR
>         Attachments: HDFS-7553-001.txt, HDFS-7553.002.patch
>
>
> see 
> https://builds.apache.org/job/PreCommit-HDFS-Build/9092//testReport/org.apache.hadoop.hdfs.server.namenode.ha/TestDFSUpgradeWithHA/testNfsUpgrade/
>  :
> Error Message
> Port in use: localhost:57896
> Stacktrace
> java.net.BindException: Port in use: localhost:57896
>       at sun.nio.ch.Net.bind0(Native Method)
>       at sun.nio.ch.Net.bind(Net.java:444)
>       at sun.nio.ch.Net.bind(Net.java:436)
>       at 
> sun.nio.ch.ServerSocketChannelImpl.bind(ServerSocketChannelImpl.java:214)
>       at sun.nio.ch.ServerSocketAdaptor.bind(ServerSocketAdaptor.java:74)
>       at 
> org.mortbay.jetty.nio.SelectChannelConnector.open(SelectChannelConnector.java:216)
>       at 
> org.apache.hadoop.http.HttpServer2.openListeners(HttpServer2.java:868)
>       at org.apache.hadoop.http.HttpServer2.start(HttpServer2.java:809)
>       at 
> org.apache.hadoop.hdfs.server.namenode.NameNodeHttpServer.start(NameNodeHttpServer.java:142)
>       at 
> org.apache.hadoop.hdfs.server.namenode.NameNode.startHttpServer(NameNode.java:704)
>       at 
> org.apache.hadoop.hdfs.server.namenode.NameNode.initialize(NameNode.java:591)
>       at 
> org.apache.hadoop.hdfs.server.namenode.NameNode.<init>(NameNode.java:763)
>       at 
> org.apache.hadoop.hdfs.server.namenode.NameNode.<init>(NameNode.java:747)
>       at 
> org.apache.hadoop.hdfs.server.namenode.NameNode.createNameNode(NameNode.java:1443)
>       at 
> org.apache.hadoop.hdfs.MiniDFSCluster.restartNameNode(MiniDFSCluster.java:1815)
>       at 
> org.apache.hadoop.hdfs.MiniDFSCluster.restartNameNode(MiniDFSCluster.java:1796)
>       at 
> org.apache.hadoop.hdfs.server.namenode.ha.TestDFSUpgradeWithHA.testNfsUpgrade(TestDFSUpgradeWithHA.java:285)



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to