Re: [jgroups-dev] Question on bind_addr in Jgroups version 2.12.2.Final
Bela Ban <[email protected]> Sat, 31 Dec 2011 09:50:48 +0100
| Newsgroups | gmane.comp.java.javagroups.devel |
|---|---|
| Message-ID | <[email protected]> |
On 12/30/11 11:18 PM, Sundararajan, Mukund wrote:
> Hi,
>
> Is it valid to pass a bind_addr of 0.0.0.0 to the TCP protocol stack in Jgroups? We've tried it and what we are seeing is that we can send messages successfully but the messages are never received at the other end.
No, 0.0.0.0 is not a valid bind address.
> Here's my requirement -
>
> We run our application on RHEL. We have a server pair (as part of a High Availability solution) that shares a common Virtual IP (VIP) address. At any given time one of the servers owns the VIP. This VIP is basically just a secondary IP address assigned to eth0. Our application starts up during linux startup on both servers. A JChannel is created but not connected to an enterprise cluster. Whenever the VIP is assigned to a server, a trigger is sent to the application and it connects the JChannel to the enterprise cluster which consists of several such pairs of servers. When the application starts and creates a JChannel a VIP may or may not be assigned to the server. We want all cluster communications to happen over the VIP and not the physical IP address of the servers.
We have other components running on the linux servers (apache httpd, Oracle weblogic etc) that also create TCP listen sockets and that also need to open the socket at startup and receive pa
ckets sent to the VIP when the VIP becomes available on the server, without rebinding the socket to the VIP. We do this by making them bind to 0.0.0.0. Is it possible for us to specify a bind_addr of 0.0.0.0 to jgroups?
If the VP is a logical NIC, then it must surely have an IP address, so
you can use that IP address. You can do this before connecting the
channel, e.g. via the following code:
JChannel ch; // unconnected channel
TP transport=ch.getProtocolStack().getTransport();
transport.setBindAddress(InetAddress.getByName("x.x.x.x")); // where
x.x.x.x is the IP of the VIP
--
Bela Ban
Lead JGroups (http://www.jgroups.org)
JBoss / Red Hat
------------------------------------------------------------------------------
Ridiculously easy VDI. With Citrix VDI-in-a-Box, you don't need a complex
infrastructure or vast IT resources to deliver seamless, secure access to
virtual desktops. With this all-in-one solution, easily deploy virtual
desktops for less than the cost of PCs and save 60% on VDI infrastructure
costs. Try it free! http://p.sf.net/sfu/Citrix-VDIinabox
_______________________________________________
Javagroups-development mailing list