Uploaded image for project: 'Hadoop HDFS'
  1. Hadoop HDFS
  2. HDFS-7914

TestJournalNode#testFailToStartWithBadConfig fails when the default dfs.journalnode.http-address port 8480 is in use

    XMLWordPrintableJSON

Details

    • Test
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 2.6.0
    • 2.7.0
    • None
    • None
    • Mac

    • Reviewed

    Description

      The default journal node http port address 8480 used by the test is always conflicting with iTunes service on Mac OS as shown below. The fix for this test to let OS choose a free port for the test. I will post a patch shortly.

      Tests run: 6, Failures: 1, Errors: 0, Skipped: 0, Time elapsed: 3.392 sec <<< FAILURE! - in org.apache.hadoop.hdfs.qjournal.server.TestJournalNode
      testFailToStartWithBadConfig(org.apache.hadoop.hdfs.qjournal.server.TestJournalNode) Time elapsed: 0.176 sec <<< FAILURE!
      java.lang.AssertionError: Expected to find 'Cannot create directory' but got unexpected exception:java.net.BindException: Port in use: 0.0.0.0:8480
      at org.apache.hadoop.http.HttpServer2.openListeners(HttpServer2.java:812)
      at org.apache.hadoop.http.HttpServer2.start(HttpServer2.java:749)
      at org.apache.hadoop.hdfs.qjournal.server.JournalNodeHttpServer.start(JournalNodeHttpServer.java:69)
      at org.apache.hadoop.hdfs.qjournal.server.JournalNode.start(JournalNode.java:150)
      at org.apache.hadoop.hdfs.qjournal.server.TestJournalNode.assertJNFailsToStart(TestJournalNode.java:297)
      at org.apache.hadoop.hdfs.qjournal.server.TestJournalNode.testFailToStartWithBadConfig(TestJournalNode.java:289)
      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.FailOnTimeout$StatementThread.run(FailOnTimeout.java:74)
      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: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:807)
      ... 14 more

      at org.junit.Assert.fail(Assert.java:88)
      at org.junit.Assert.assertTrue(Assert.java:41)
      at org.apache.hadoop.test.GenericTestUtils.assertExceptionContains(GenericTestUtils.java:146)
      at org.apache.hadoop.hdfs.qjournal.server.TestJournalNode.assertJNFailsToStart(TestJournalNode.java:299)
      at org.apache.hadoop.hdfs.qjournal.server.TestJournalNode.testFailToStartWithBadConfig(TestJournalNode.java:289)

      Attachments

        1. HDFS-7914.00.patch
          0.9 kB
          Xiaoyu Yao

        Activity

          People

            xyao Xiaoyu Yao
            xyao Xiaoyu Yao
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: