You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cassandra.apache.org by "Michael Shuler (JIRA)" <ji...@apache.org> on 2014/11/04 04:07:33 UTC
[jira] [Commented] (CASSANDRA-8249) cassandra.yaml: rpc_address
overwrites listen_address
[ https://issues.apache.org/jira/browse/CASSANDRA-8249?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14195632#comment-14195632 ]
Michael Shuler commented on CASSANDRA-8249:
-------------------------------------------
Could you be a little more specific in describing your problem? Setting listen_address does not modify the listening IP of native protocol. The setting of {{rpc_address: localhost}} appears to be working as intended for rpc and native listening IPs.
default c*.yaml startup:
{noformat}
$ netstat -ltunp | grep java
(Not all processes could be identified, non-owned process info
will not be shown, you would have to be root to see it all.)
tcp 0 0 127.0.0.1:7000 0.0.0.0:* LISTEN 20526/java
tcp 0 0 0.0.0.0:7199 0.0.0.0:* LISTEN 20526/java
tcp 0 0 0.0.0.0:40324 0.0.0.0:* LISTEN 20526/java
tcp 0 0 127.0.0.1:9160 0.0.0.0:* LISTEN 20526/java
tcp6 0 0 127.0.0.1:9042 :::* LISTEN 20526/java
{noformat}
Set listen_address to my IP:
{noformat}
$ diff -u conf/cassandra.yaml.orig conf/cassandra.yaml
--- conf/cassandra.yaml.orig 2014-11-03 13:25:58.341227602 -0600
+++ conf/cassandra.yaml 2014-11-03 20:52:30.730066522 -0600
@@ -364,7 +364,7 @@
# address associated with the hostname (it might not be).
#
# Setting listen_address to 0.0.0.0 is always wrong.
-listen_address: localhost
+listen_address: 192.168.1.142
# listen_interface: eth0
# Address to broadcast to other Cassandra nodes
{noformat}
{noformat}
$ netstat -ltunp | grep java
tcp 0 0 192.168.1.142:7000 0.0.0.0:* LISTEN 20806/java
tcp 0 0 0.0.0.0:7199 0.0.0.0:* LISTEN 20806/java
tcp 0 0 0.0.0.0:56864 0.0.0.0:* LISTEN 20806/java
tcp 0 0 127.0.0.1:9160 0.0.0.0:* LISTEN 20806/java
tcp6 0 0 127.0.0.1:9042 :::* LISTEN 20806/java
{noformat}
As expected, port 7000 is listening on my specified address. Native transport is listening to localhost, because, as the yaml documentation tells us:
{noformat}
# Please note that the address on which the native transport is bound is the
# same as the rpc_address. The port however is different and specified below.
{noformat}
Setting {{listen_address: 192.168.1.142}} and {{rpc_address: 192.168.1.142}}:
{noformat}
$ diff -u conf/cassandra.yaml.orig conf/cassandra.yaml
--- conf/cassandra.yaml.orig 2014-11-03 13:25:58.341227602 -0600
+++ conf/cassandra.yaml 2014-11-03 21:04:05.136170561 -0600
@@ -364,7 +364,7 @@
# address associated with the hostname (it might not be).
#
# Setting listen_address to 0.0.0.0 is always wrong.
-listen_address: localhost
+listen_address: 192.168.1.142
# listen_interface: eth0
# Address to broadcast to other Cassandra nodes
@@ -405,7 +405,7 @@
#
# Note that unlike listen_address, you can specify 0.0.0.0, but you must also
# set broadcast_rpc_address to a value other than 0.0.0.0.
-rpc_address: localhost
+rpc_address: 192.168.1.142
# rpc_interface: eth1
# port for Thrift to listen for clients on
{noformat}
{noformat}
$ netstat -ltunp | grep java
tcp 0 0 192.168.1.142:7000 0.0.0.0:* LISTEN 21215/java
tcp 0 0 0.0.0.0:7199 0.0.0.0:* LISTEN 21215/java
tcp 0 0 0.0.0.0:44162 0.0.0.0:* LISTEN 21215/java
tcp 0 0 192.168.1.142:9160 0.0.0.0:* LISTEN 21215/java
tcp6 0 0 192.168.1.142:9042 :::* LISTEN 21215/java
{noformat}
Looks right to me.
> cassandra.yaml: rpc_address overwrites listen_address
> -----------------------------------------------------
>
> Key: CASSANDRA-8249
> URL: https://issues.apache.org/jira/browse/CASSANDRA-8249
> Project: Cassandra
> Issue Type: Bug
> Environment: Cassandra 2.1.1, Ubuntu 14.04
> Reporter: Drew Kutcharian
>
> To reproduce set "listen_address" to the node's non-local address, say 192.168.0.10 and set "rpc_address" to "localhost". Start C* and it will bind the native protocol to "localhost".
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)