Uploaded image for project: 'HBase'
  1. HBase
  2. HBASE-19514

Use random port for TestJMXListener

    XMLWordPrintableJSON

    Details

    • Type: Test
    • Status: Resolved
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 1.3.2, 1.4.1, 2.0.0-beta-1, 2.0.0, 1.2.7
    • Component/s: None
    • Labels:
      None
    • Hadoop Flags:
      Reviewed

      Description

      In recent trunk builds, there was TestJMXListener failure with the following:

      2017-12-14 15:42:13,278 ERROR [RS:0;asf918:34443] coprocessor.CoprocessorHost(399): The coprocessor org.apache.hadoop.hbase.JMXListener threw java.rmi.server.                ExportException: Port already in use: 61120; nested exception is:
        java.net.BindException: Address already in use (Bind failed)
      java.rmi.server.ExportException: Port already in use: 61120; nested exception is:
        java.net.BindException: Address already in use (Bind failed)
        at sun.rmi.transport.tcp.TCPTransport.listen(TCPTransport.java:341)
        at sun.rmi.transport.tcp.TCPTransport.exportObject(TCPTransport.java:249)
        at sun.rmi.transport.tcp.TCPEndpoint.exportObject(TCPEndpoint.java:411)
        at sun.rmi.transport.LiveRef.exportObject(LiveRef.java:147)
        at sun.rmi.server.UnicastServerRef.exportObject(UnicastServerRef.java:236)
        at sun.rmi.registry.RegistryImpl.setup(RegistryImpl.java:213)
        at sun.rmi.registry.RegistryImpl.<init>(RegistryImpl.java:198)
        at java.rmi.registry.LocateRegistry.createRegistry(LocateRegistry.java:203)
        at org.apache.hadoop.hbase.JMXListener.startConnectorServer(JMXListener.java:133)
        at org.apache.hadoop.hbase.JMXListener.start(JMXListener.java:208)
        at org.apache.hadoop.hbase.coprocessor.BaseEnvironment.startup(BaseEnvironment.java:72)
        at org.apache.hadoop.hbase.coprocessor.CoprocessorHost.checkAndLoadInstance(CoprocessorHost.java:264)
        at org.apache.hadoop.hbase.coprocessor.CoprocessorHost.loadSystemCoprocessors(CoprocessorHost.java:157)
        at org.apache.hadoop.hbase.regionserver.RegionServerCoprocessorHost.<init>(RegionServerCoprocessorHost.java:68)
        at org.apache.hadoop.hbase.regionserver.HRegionServer.run(HRegionServer.java:942)
        at org.apache.hadoop.hbase.MiniHBaseCluster$MiniHBaseClusterRegionServer.runRegionServer(MiniHBaseCluster.java:163)
        at org.apache.hadoop.hbase.MiniHBaseCluster$MiniHBaseClusterRegionServer.access$000(MiniHBaseCluster.java:110)
        at org.apache.hadoop.hbase.MiniHBaseCluster$MiniHBaseClusterRegionServer$1.run(MiniHBaseCluster.java:147)
        at java.security.AccessController.doPrivileged(Native Method)
        at javax.security.auth.Subject.doAs(Subject.java:360)
        at org.apache.hadoop.security.UserGroupInformation.doAs(UserGroupInformation.java:1726)
        at org.apache.hadoop.hbase.security.User$SecureHadoopUser.runAs(User.java:305)
        at org.apache.hadoop.hbase.MiniHBaseCluster$MiniHBaseClusterRegionServer.run(MiniHBaseCluster.java:145)
        at java.lang.Thread.run(Thread.java:748)
      Caused by: java.net.BindException: Address already in use (Bind failed)
        at java.net.PlainSocketImpl.socketBind(Native Method)
        at java.net.AbstractPlainSocketImpl.bind(AbstractPlainSocketImpl.java:387)
        at java.net.ServerSocket.bind(ServerSocket.java:375)
        at java.net.ServerSocket.<init>(ServerSocket.java:237)
        at java.net.ServerSocket.<init>(ServerSocket.java:128)
        at sun.rmi.transport.proxy.RMIDirectSocketFactory.createServerSocket(RMIDirectSocketFactory.java:45)
        at sun.rmi.transport.proxy.RMIMasterSocketFactory.createServerSocket(RMIMasterSocketFactory.java:345)
        at sun.rmi.transport.tcp.TCPEndpoint.newServerSocket(TCPEndpoint.java:666)
      

      The test uses 61120 as connector port which would get into above exception if same test from another build is running on the same machine.

        Attachments

        1. 19514.v2.txt
          0.8 kB
          Ted Yu
        2. 19514.v1.txt
          1.0 kB
          Ted Yu

          Activity

            People

            • Assignee:
              yuzhihong@gmail.com Ted Yu
              Reporter:
              yuzhihong@gmail.com Ted Yu
            • Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: