[
https://issues.apache.org/jira/browse/HBASE-12954?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14301855#comment-14301855
]
Ted Yu commented on HBASE-12954:
--------------------------------
Tried to add a test where region server hostname is specified as different from
what the normal hostname is - assuming multiple network interfaces are present.
{code}
Enumeration<NetworkInterface> netInterfaceList =
NetworkInterface.getNetworkInterfaces();
while (netInterfaceList.hasMoreElements()) {
NetworkInterface ni = netInterfaceList.nextElement();
Enumeration<InetAddress> addrList = ni.getInetAddresses();
while (addrList.hasMoreElements()) {
InetAddress addr = addrList.nextElement();
LOG.info("Found " + addr);
}
}
{code}
which produced:
{code}
2015-02-02 12:09:34,351 INFO [Thread-1] regionserver.TestRegionServerName(71):
Found /10.10.9.249
2015-02-02 12:09:34,353 INFO [Thread-1] regionserver.TestRegionServerName(71):
Found /192.168.64.1
2015-02-02 12:09:34,354 INFO [Thread-1] regionserver.TestRegionServerName(71):
Found /10.11.3.249
{code}
Suppose 10.10.9.249 is the one that is returned by ia.getHostName() in
regionServerStartup().
When 10.11.3.249 is specified as hostname, I got:
{code}
Caused by: java.net.ConnectException: Connection refused: /10.11.3.249:52284
at sun.nio.ch.SocketChannelImpl.checkConnect(Native Method)
at
sun.nio.ch.SocketChannelImpl.finishConnect(SocketChannelImpl.java:739)
at
io.netty.channel.socket.nio.NioSocketChannel.doFinishConnect(NioSocketChannel.java:208)
at
io.netty.channel.nio.AbstractNioChannel$AbstractNioUnsafe.finishConnect(AbstractNioChannel.java:287)
at
io.netty.channel.nio.NioEventLoop.processSelectedKey(NioEventLoop.java:528)
{code}
The ports on the network interfaces need to be configured to have the
corresponding value.
> Ability impaired using HBase on multihomed hosts
> ------------------------------------------------
>
> Key: HBASE-12954
> URL: https://issues.apache.org/jira/browse/HBASE-12954
> Project: HBase
> Issue Type: Bug
> Affects Versions: 0.98.4
> Reporter: Clay B.
> Assignee: Ted Yu
> Priority: Minor
> Attachments: 12954-v1.txt, Hadoop Three Interfaces.png
>
>
> For HBase clusters running on unusual networks (such as NAT'd cloud
> environments or physical machines with multiple IP's per network interface)
> it would be ideal to have a way to both specify:
> # which IP interface to which HBase master or region-server will bind
> # what hostname HBase will advertise in Zookeeper both for a master or
> region-server process
> While efforts such as HBASE-8640 go a long way to normalize these two sources
> of information, it is not possible in the current design of the properties
> available to an administrator for these to be unambiguously specified.
> One has been able to request {{hbase.master.ipc.address}} or
> {{hbase.regionserver.ipc.address}} but one can not specify the desired HBase
> {{hbase.master.hostname}}. (It was removed in HBASE-1357, further I am
> unaware of a region-server equivalent.)
> I use a configuration management system to generate all of my configuration
> files on a per-machine basis. As such, an option to generate a file
> specifying exactly which hostname to use would be helpful.
> Today, specifying the bind address for HBase works and one can use an
> HBase-only DNS for faking what to put in Zookeeper but this is far from
> ideal. Network interfaces have no intrinsic IP address, nor hostname.
> Specifing a DNS server is awkward as the DNS server may differ from the
> system's resolver and is a single IP address. Similarly, on hosts which use a
> transient VIP (e.g. through keepalived) for other services, it means there's
> a seemingly non-deterministic hostname choice made by HBase depending on the
> state of the VIP at daemon start-up time.
> I will attach two networking examples I use which become very difficult to
> manage under the current properties.
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)