[
https://issues.apache.org/jira/browse/CASSANDRA-9748?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14967887#comment-14967887
]
Paulo Motta commented on CASSANDRA-9748:
----------------------------------------
Attached [2.1|https://github.com/pauloricardomg/cassandra/tree/9478-2.1],
[2.2|https://github.com/pauloricardomg/cassandra/tree/9478-2.2] and
[3.0|https://github.com/pauloricardomg/cassandra/tree/9478-3.0] patches. Merge
conflicts are basically test formatting, so not much difference between
different version patches.
Main changes are:
* Allow specifying {{listen_address=0.0.0.0}} (in order to support listening on
multiple interfaces), as long as {{broadcast_address != 0.0.0.0}} (similar to
what is done in {{rpc_address}} and {{rpc_broadcast_address}}). AFAIK
{{listen_address=0.0.0.0}} was disallowed for [historic
reasons|http://wiki.apache.org/cassandra/FAQ#cant_listen_on_ip_any], mostly
because this was used as a node primary id, but since the introduction of
{{broadcast_address}} on CASSANDRA-2491 I believe this is not a concern anymore.
* Added {{local_address}} option to {{GossipingPropertyFileSnitch}} in order to
specify preferred local address to use when {{prefer_local=true}} and
{{listen_address=0.0.0.0}} (since currently the value of {{listen_address}} is
used as preferred local address).
** Added warning when {{prefer_local==true}}, {{listen_address=0.0.0.0}} and
{{local_address}} is not specified on {{cassandra-rackdc.properties}}.
* {{DatabaseDescriptor}} tests with validations when {{listen_address=0.0.0.0}}
and {{GossipingPropertyFileSnitch}} tests for new {{local_address}} option.
Tests:
* 2.1
[testall|http://cassci.datastax.com/view/Dev/view/paulomotta/job/pauloricardomg-9478-2.1-testall/]
[dtest|http://cassci.datastax.com/view/Dev/view/paulomotta/job/pauloricardomg-9478-2.1-dtest/]
* 2.2
[testall|http://cassci.datastax.com/view/Dev/view/paulomotta/job/pauloricardomg-9478-2.2-testall/]
[dtest|http://cassci.datastax.com/view/Dev/view/paulomotta/job/pauloricardomg-9478-2.2-dtest/]
* 3.0
[testall|http://cassci.datastax.com/view/Dev/view/paulomotta/job/pauloricardomg-9478-3.0-testall/]
[dtest|http://cassci.datastax.com/view/Dev/view/paulomotta/job/pauloricardomg-9478-3.0-dtest/]
* trunk
[testall|http://cassci.datastax.com/view/Dev/view/paulomotta/job/pauloricardomg-9478-trunk-testall/]
[dtest|http://cassci.datastax.com/view/Dev/view/paulomotta/job/pauloricardomg-9478-trunk-dtest/]
TODO after merged:
* Update [Using multiple network
interfaces|http://docs.datastax.com/en/cassandra/2.1/cassandra/configuration/configMultiNetworks.html]
doc entry to refer to the new options (outside EC2).
* Update [wiki
entry|http://wiki.apache.org/cassandra/FAQ#cant_listen_on_ip_any] disallowing
0.0.0.0
> Can't see other nodes when using multiple network interfaces
> ------------------------------------------------------------
>
> Key: CASSANDRA-9748
> URL: https://issues.apache.org/jira/browse/CASSANDRA-9748
> Project: Cassandra
> Issue Type: Bug
> Environment: Cassandra 2.0.16; multi-DC configuration
> Reporter: Roman Bielik
> Assignee: Paulo Motta
> Attachments: system_node1.log, system_node2.log
>
>
> The idea is to setup a multi-DC environment across 2 different networks based
> on the following configuration recommendations:
> http://docs.datastax.com/en/cassandra/2.0/cassandra/configuration/configMultiNetworks.html
> Each node has 2 network interfaces. One used as a private network (DC1:
> 10.0.1.x and DC2: 10.0.2.x). The second one a "public" network where all
> nodes can see each other (this one has a higher latency).
> Using the following settings in cassandra.yaml:
> *seeds:* public IP (same as used in broadcast_address)
> *listen_address:* private IP
> *broadcast_address:* public IP
> *rpc_address:* 0.0.0.0
> *endpoint_snitch:* GossipingPropertyFileSnitch
> _(tried different combinations with no luck)_
> No firewall and no SSL/encryption used.
> The problem is that nodes do not see each other (a gossip problem I guess).
> The nodetool ring/status shows only the local node but not the other ones
> (even from the same DC).
> When I set listen_address to public IP, then everything works fine, but that
> is not the required configuration.
> _Note: Not using EC2 cloud!_
> netstat -anp | grep -E "(7199|9160|9042|7000)"
> tcp 0 0 0.0.0.0:7199 0.0.0.0:*
> LISTEN 3587/java
> tcp 0 0 10.0.1.1:9160 0.0.0.0:*
> LISTEN 3587/java
> tcp 0 0 10.0.1.1:9042 0.0.0.0:*
> LISTEN 3587/java
> tcp 0 0 10.0.1.1:7000 0.0.0.0:*
> LISTEN 3587/java
> tcp 0 0 127.0.0.1:7199 127.0.0.1:52874
> ESTABLISHED 3587/java
> tcp 0 0 10.0.1.1:7199 10.0.1.1:39650
> ESTABLISHED 3587/java
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)