Uploaded image for project: 'Hadoop Common'
  1. Hadoop Common
  2. HADOOP-9203

RPCCallBenchmark should find a random available port

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Trivial
    • Resolution: Fixed
    • 2.0.3-alpha, 3.0.0-alpha1
    • 2.0.3-alpha
    • ipc, test
    • None
    • Reviewed

    Description

      RPCCallBenchmark insists on port 12345 by default. It should find a random ephemeral range port instead if one isn't specified.

      testBenchmarkWithProto(org.apache.hadoop.ipc.TestRPCCallBenchmark)  Time elapsed: 5092 sec  <<< ERROR!
      java.net.BindException: Problem binding to [0.0.0.0:12345] java.net.BindException: Address already in use; For more details see:  http://wiki.apache.org/hadoop/BindException
      	at org.apache.hadoop.net.NetUtils.wrapException(NetUtils.java:710)
      	at org.apache.hadoop.ipc.Server.bind(Server.java:361)
      	at org.apache.hadoop.ipc.Server$Listener.<init>(Server.java:459)
      	at org.apache.hadoop.ipc.Server.<init>(Server.java:1877)
      	at org.apache.hadoop.ipc.RPC$Server.<init>(RPC.java:982)
      	at org.apache.hadoop.ipc.ProtobufRpcEngine$Server.<init>(ProtobufRpcEngine.java:376)
      	at org.apache.hadoop.ipc.ProtobufRpcEngine.getServer(ProtobufRpcEngine.java:351)
      	at org.apache.hadoop.ipc.RPC$Builder.build(RPC.java:825)
      	at org.apache.hadoop.ipc.RPCCallBenchmark.startServer(RPCCallBenchmark.java:230)
      	at org.apache.hadoop.ipc.RPCCallBenchmark.run(RPCCallBenchmark.java:264)
      	at org.apache.hadoop.util.ToolRunner.run(ToolRunner.java:70)
      	at org.apache.hadoop.util.ToolRunner.run(ToolRunner.java:84)
      	at org.apache.hadoop.ipc.TestRPCCallBenchmark.testBenchmarkWithProto(TestRPCCallBenchmark.java:43)
      	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
      	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
      	at java.lang.reflect.Method.invoke(Method.java:597)
      	at org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:44)
      	at org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:15)
      	at org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:41)
      	at org.junit.internal.runners.statements.InvokeMethod.evaluate(InvokeMethod.java:20)
      	at org.junit.internal.runners.statements.FailOnTimeout$1.run(FailOnTimeout.java:28)
      

      Attachments

        1. HADOOP-9203.patch
          4 kB
          Andrew Kyle Purtell
        2. HADOOP-9203.patch
          3 kB
          Andrew Kyle Purtell

        Issue Links

          Activity

            People

              apurtell Andrew Kyle Purtell
              apurtell Andrew Kyle Purtell
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: