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

improve error message when HMaster can't bind to port

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 2.0.0
    • 1.2.0, 1.3.0, 2.0.0
    • master
    • Reviewed

    Description

      When the master fails to start becahse hbase.master.port is already taken, the log messages could make it easier to tell.

      2015-07-14 13:10:02,667 INFO [main] regionserver.RSRpcServices: master/master01.example.com/10.20.188.121:16000 server-side HConnection retries=350
      2015-07-14 13:10:02,879 INFO [main] ipc.SimpleRpcScheduler: Using deadline as user call queue, count=3
      2015-07-14 13:10:02,895 ERROR [main] master.HMasterCommandLine: Master exiting
      java.lang.RuntimeException: Failed construction of Master: class org.apache.hadoop.hbase.master.HMaster
      at org.apache.hadoop.hbase.master.HMaster.constructMaster(HMaster.java:2258)
      at org.apache.hadoop.hbase.master.HMasterCommandLine.startMaster(HMasterCommandLine.java:234)
      at org.apache.hadoop.hbase.master.HMasterCommandLine.run(HMasterCommandLine.java:140)
      at org.apache.hadoop.util.ToolRunner.run(ToolRunner.java:70)
      at org.apache.hadoop.hbase.util.ServerCommandLine.doMain(ServerCommandLine.java:126)
      at org.apache.hadoop.hbase.master.HMaster.main(HMaster.java:2272)
      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.apache.hadoop.hbase.ipc.RpcServer.bind(RpcServer.java:2513)
      at org.apache.hadoop.hbase.ipc.RpcServer$Listener.<init>(RpcServer.java:599)
      at org.apache.hadoop.hbase.ipc.RpcServer.<init>(RpcServer.java:2000)
      at org.apache.hadoop.hbase.regionserver.RSRpcServices.<init>(RSRpcServices.java:919)
      at org.apache.hadoop.hbase.master.MasterRpcServices.<init>(MasterRpcServices.java:211)
      at org.apache.hadoop.hbase.master.HMaster.createRpcServices(HMaster.java:509)
      at org.apache.hadoop.hbase.regionserver.HRegionServer.<init>(HRegionServer.java:535)
      at org.apache.hadoop.hbase.master.HMaster.<init>(HMaster.java:351)
      at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
      at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:57)
      at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
      at java.lang.reflect.Constructor.newInstance(Constructor.java:526)
      at org.apache.hadoop.hbase.master.HMaster.constructMaster(HMaster.java:2253)
      ... 5 more

      I recognize that the "RSRpcServices" log message shows port 16000, but I don't know why a new operator would. Additionally, it'd be nice to tell them that the port is controlled by hbase.master.port. Maybe give a hint on how to see what's using the port. Could be too os-dist specific?

      Attachments

        1. hbase-14708-v3.patch
          4 kB
          Matt Warhaftig
        2. hbase-14708-v3.patch
          4 kB
          Michael Stack
        3. hbase-14708-v2.patch
          3 kB
          Matt Warhaftig
        4. hbase-14708-v1.patch
          2 kB
          Matt Warhaftig
        5. hbase-14078_post_stack.txt
          2 kB
          Matt Warhaftig

        Issue Links

          Activity

            People

              mwarhaftig Matt Warhaftig
              busbey Sean Busbey
              Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: