zoukankan      html  css  js  c++  java
  • hbase Problem binding to node1/192.168.1.13:16020 : 地址已在使用

      这是hbase 从0.9.x升级到1.x后HMaster与HRegionServer端口冲突问题

      

      在hbase升级到1.0.0版本后,默认端口做了改动。其中16020端口是hmaster服务和hregionserver服务各自使用的默认端口,导致端口冲突。

      官方文档相关信息如下 
      The HMaster server controls the HBase cluster. You can start up to 9 backup HMaster servers, which makes 10 total HMasters, counting the primary. To start a backup HMaster, use the local-master-backup.sh. For each backup   master you want to start, add a parameter representing the port offset for that master. Each HMaster uses three ports (16010, 16020, and 16030 by default). The port offset is added to these ports, so using an offset of 2, the   backup HMaster would use ports 16012, 16022, and 16032. The following command starts 3 backup servers using ports 16012/16022/16032, 16013/16023/16033, and 16015/16025/16035.

      The HRegionServer manages the data in its StoreFiles as directed by the HMaster. Generally, one HRegionServer runs per node in the cluster. Running multiple HRegionServers on the same system can be useful for testing in

      pseudo-distributed mode. The local-regionservers.sh command allows you to run multiple RegionServers. It works in a similar way to the local-master-backup.sh command, in that each parameter you provide represents the port offset for an instance. Each RegionServer requires two ports, and the default ports are 16020 and 16030. However, the base ports for additional RegionServers are not the default ports since the default ports are used by the HMaster, which is also a RegionServer since HBase version 1.0.0. The base ports are 16200 and 16300 instead. You can run 99 additional RegionServers that are not a HMaster or backup HMaster, on a server. The following command starts four additional RegionServers, running on sequential ports starting at 16202/16302 (base ports 16200/16300 plus 2).

      解决方法: 
      按理说不使用默认配置,定义自己的端口配置就可以解决该问题

          

       <property>
            <name>hbase.master.port</name>
            <value>16000</value>
        </property>
        <property>
            <name>hbase.master.info.port</name>
            <value>16010</value>
        </property>
        <property>
            <name>hbase.regionserver.port</name>
            <value>16201</value>
        </property>
        <property>
            <name>hbase.regionserver.info.port</name>
            <value>16301</value>
        </property>
    

      但是实际上 使用start-hbase.sh 脚本启动regionserver还是会报端口冲突问题,可能通过这个脚本启动程序存在问题。没有深究看源码。 
      该问题可以通过 使用单独的regionserver启动脚本程序启动regionserver来规避。 
      使用方法:

          

    bin/local-regionservers.sh start 1
    

      部分转载自:http://blog.csdn.net/xishanxinyue/article/details/45874063

  • 相关阅读:
    深入理解JavaScript系列(24):JavaScript与DOM(下)
    大叔手记(20):ASP.NET MVC中使用jQuery时的浏览器缓存问题
    深入理解JavaScript系列(22):S.O.L.I.D五大原则之依赖倒置原则DIP
    深入理解JavaScript系列(21):S.O.L.I.D五大原则之接口隔离原则ISP
    深入理解JavaScript系列(23):JavaScript与DOM(上)——也适用于新手
    深入理解JavaScript系列(25):设计模式之单例模式
    深入理解JavaScript系列(26):设计模式之构造函数模式
    ASP.NET GridView中使用搜索框(SearchableGridView)
    WPF中的图表设计器 – 1
    使用URL Routing进行数据分页
  • 原文地址:https://www.cnblogs.com/xjh713/p/6963097.html
Copyright © 2011-2022 走看看