You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@cassandra.apache.org by Anuj Wadehra <an...@yahoo.co.in> on 2016/08/20 18:20:55 UTC

Preferred IP is NULL

Hi,
We use multiple interfaces in multi DC setup.Broadcast address is public IP while listen address is private IP.
I dont understand why prefeerred IP in peers table is null for all rows.
There is very little documentation on the role of preferred IP and when it is set. As per code TCP connections use preferred IP. According to my understanding, nodes in local dc should use preferrably private IP to connect and that's referred as preferred IP for a node.
Setup: Cassandra 2.0.14
ThanksAnuj


Re: Preferred IP is NULL

Posted by Anuj Wadehra <an...@yahoo.co.in>.
Finally, multiple DC setup is working as expected in 2.0.
So the recipe for configuring multiple interfaces in 2.0 is as follows: use GossipingPropertyFileSnitch so that preferred IP (private IP) is used for intra DC communication. Morever, you need to have a NAT rule to route traffic on public interface to private interface. NAT rule is needed due to CASSANDRA-9748 (No process listens on broadcast address).

ThanksAnuj

Sent from Yahoo Mail on Android 
 
  On Mon, 22 Aug, 2016 at 11:55 PM, Anuj Wadehra<an...@yahoo.co.in> wrote:   We are using PropertyFileSnitch.
ThanksAnuj

Sent from Yahoo Mail on Android 
 
  On Mon, 22 Aug, 2016 at 7:09 PM, Paulo Motta<pa...@gmail.com> wrote:   What snitch are you using? If GPFS you need to enable the prefer_local=true flag (this is automatic on EC2MRS).

2016-08-21 22:24 GMT-03:00 Anuj Wadehra <an...@yahoo.co.in>:

Hi Paulo,
I am aware of CASSANDRA-9748. It says that Cassandra only listens at listen_address and not broadcast_address. To overcome that I can add a NAT rule to route all traffiic on public IP to private IP. 
But, why preferred IP is set to null in peers table? Whats the expected value?
Even if I add a NAT rule as workaround for CASSANDRA-9748, what if my public interface is down on a node? My traffic would still fail.
I want that at least nodes in my local DC should contact at each other on private IP. I thought preferred IP is for that purpose so focussing on fixing the null value of preferred IPs.

ThanksAnuj
 
 
 On Sun, 21 Aug, 2016 at 7:10 PM, Paulo Motta<pa...@gmail.com> wrote:   See CASSANDRA-9748, I think it might be related.

2016-08-20 15:20 GMT-03:00 Anuj Wadehra <an...@yahoo.co.in>:

Hi,
We use multiple interfaces in multi DC setup.Broadcast address is public IP while listen address is private IP.
I dont understand why prefeerred IP in peers table is null for all rows.
There is very little documentation on the role of preferred IP and when it is set. As per code TCP connections use preferred IP. According to my understanding, nodes in local dc should use preferrably private IP to connect and that's referred as preferred IP for a node.
Setup: Cassandra 2.0.14
ThanksAnuj



  


  
  

Re: Preferred IP is NULL

Posted by Anuj Wadehra <an...@yahoo.co.in>.
We are using PropertyFileSnitch.
ThanksAnuj

Sent from Yahoo Mail on Android 
 
  On Mon, 22 Aug, 2016 at 7:09 PM, Paulo Motta<pa...@gmail.com> wrote:   What snitch are you using? If GPFS you need to enable the prefer_local=true flag (this is automatic on EC2MRS).

2016-08-21 22:24 GMT-03:00 Anuj Wadehra <an...@yahoo.co.in>:

Hi Paulo,
I am aware of CASSANDRA-9748. It says that Cassandra only listens at listen_address and not broadcast_address. To overcome that I can add a NAT rule to route all traffiic on public IP to private IP. 
But, why preferred IP is set to null in peers table? Whats the expected value?
Even if I add a NAT rule as workaround for CASSANDRA-9748, what if my public interface is down on a node? My traffic would still fail.
I want that at least nodes in my local DC should contact at each other on private IP. I thought preferred IP is for that purpose so focussing on fixing the null value of preferred IPs.

ThanksAnuj
 
 
 On Sun, 21 Aug, 2016 at 7:10 PM, Paulo Motta<pa...@gmail.com> wrote:   See CASSANDRA-9748, I think it might be related.

2016-08-20 15:20 GMT-03:00 Anuj Wadehra <an...@yahoo.co.in>:

Hi,
We use multiple interfaces in multi DC setup.Broadcast address is public IP while listen address is private IP.
I dont understand why prefeerred IP in peers table is null for all rows.
There is very little documentation on the role of preferred IP and when it is set. As per code TCP connections use preferred IP. According to my understanding, nodes in local dc should use preferrably private IP to connect and that's referred as preferred IP for a node.
Setup: Cassandra 2.0.14
ThanksAnuj



  


  

Re: Preferred IP is NULL

Posted by Paulo Motta <pa...@gmail.com>.
What snitch are you using? If GPFS you need to enable the prefer_local=true
flag (this is automatic on EC2MRS).

2016-08-21 22:24 GMT-03:00 Anuj Wadehra <an...@yahoo.co.in>:

> Hi Paulo,
>
> I am aware of CASSANDRA-9748. It says that Cassandra only listens at
> listen_address and not broadcast_address. To overcome that I can add a NAT
> rule to route all traffiic on public IP to private IP.
>
> But, why preferred IP is set to null in peers table? Whats the expected
> value?
>
> Even if I add a NAT rule as workaround for CASSANDRA-9748, what if my
> public interface is down on a node? My traffic would still fail.
>
> I want that at least nodes in my local DC should contact at each other on
> private IP. I thought preferred IP is for that purpose so focussing on
> fixing the null value of preferred IPs.
>
>
> Thanks
> Anuj
>
>
> On Sun, 21 Aug, 2016 at 7:10 PM, Paulo Motta
> <pa...@gmail.com> wrote:
> See CASSANDRA-9748, I think it might be related.
>
> 2016-08-20 15:20 GMT-03:00 Anuj Wadehra <an...@yahoo.co.in>:
>
>> Hi,
>>
>> We use multiple interfaces in multi DC setup.Broadcast address is public
>> IP while listen address is private IP.
>>
>> I dont understand why prefeerred IP in peers table is null for all rows.
>>
>> There is very little documentation on the role of preferred IP and when
>> it is set. As per code TCP connections use preferred IP. According to my
>> understanding, nodes in local dc should use preferrably private IP to
>> connect and that's referred as preferred IP for a node.
>>
>> Setup: Cassandra 2.0.14
>>
>> Thanks
>> Anuj
>>
>>
>>
>

Re: Preferred IP is NULL

Posted by Anuj Wadehra <an...@yahoo.co.in>.
Hi Paulo,
I am aware of CASSANDRA-9748. It says that Cassandra only listens at listen_address and not broadcast_address. To overcome that I can add a NAT rule to route all traffiic on public IP to private IP. 
But, why preferred IP is set to null in peers table? Whats the expected value?
Even if I add a NAT rule as workaround for CASSANDRA-9748, what if my public interface is down on a node? My traffic would still fail.
I want that at least nodes in my local DC should contact at each other on private IP. I thought preferred IP is for that purpose so focussing on fixing the null value of preferred IPs.

ThanksAnuj
 
 
  On Sun, 21 Aug, 2016 at 7:10 PM, Paulo Motta<pa...@gmail.com> wrote:   See CASSANDRA-9748, I think it might be related.

2016-08-20 15:20 GMT-03:00 Anuj Wadehra <an...@yahoo.co.in>:

Hi,
We use multiple interfaces in multi DC setup.Broadcast address is public IP while listen address is private IP.
I dont understand why prefeerred IP in peers table is null for all rows.
There is very little documentation on the role of preferred IP and when it is set. As per code TCP connections use preferred IP. According to my understanding, nodes in local dc should use preferrably private IP to connect and that's referred as preferred IP for a node.
Setup: Cassandra 2.0.14
ThanksAnuj



  

Re: Preferred IP is NULL

Posted by Paulo Motta <pa...@gmail.com>.
See CASSANDRA-9748, I think it might be related.

2016-08-20 15:20 GMT-03:00 Anuj Wadehra <an...@yahoo.co.in>:

> Hi,
>
> We use multiple interfaces in multi DC setup.Broadcast address is public
> IP while listen address is private IP.
>
> I dont understand why prefeerred IP in peers table is null for all rows.
>
> There is very little documentation on the role of preferred IP and when it
> is set. As per code TCP connections use preferred IP. According to my
> understanding, nodes in local dc should use preferrably private IP to
> connect and that's referred as preferred IP for a node.
>
> Setup: Cassandra 2.0.14
>
> Thanks
> Anuj
>
>
>