You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@cassandra.apache.org by Dave Viner <da...@gmail.com> on 2011/02/23 07:06:15 UTC

Re: Cassandra nodes on EC2 in two different regions not communicating

If you login to one of the nodes, can you telnet to port 7000 on the other
node?

If not, then almost certainly it's a firewall/Security Group issue.

You can find out the security groups for any node by logging in, and then
running:

% curl "http://169.254.169.254/latest/meta-data/security-groups"

Assuming that both nodes are in the same security group, ensure that the SG
is configured to allow other members of the SG to communicate on port 7000
to each other.

HTH,
Dave Viner


On Tue, Feb 22, 2011 at 8:59 PM, Himanshi Sharma <hi...@tcs.com>wrote:

>
> Hi,
>
> I am new to Cassandra. I m running Cassandra on EC2. I configured Cassandra
> cluster on two instances in different regions.
> But when I am trying the nodetool command with ring option, I am getting
> only single node.
>
> How to make these two nodes communicate with each other. I have already
> opened required ports. i.e 7000, 8080, 9160 in respective
> security groups. Plz help me with this.
>
> Regards,
> Himanshi Sharma
>
>
> =====-----=====-----=====
> Notice: The information contained in this e-mail
> message and/or attachments to it may contain
> confidential or privileged information. If you are
> not the intended recipient, any dissemination, use,
> review, distribution, printing or copying of the
> information contained in this e-mail message
> and/or attachments to it are strictly prohibited. If
> you have received this communication in error,
> please notify us by reply e-mail or telephone and
> immediately and permanently delete the message
> and any attachments. Thank you
>
>
>

Re: Cassandra nodes on EC2 in two different regions not communicating

Posted by Himanshi Sharma <hi...@tcs.com>.
Hi Dave,

Thanks for ur reply..I tried using elastics ips.

 And below is the configuration of the cassandra.yaml in both the nodes. 

seeds:
   - 50.18.60.117
   - 175.41.143.192

Now when i run cassandra i get following exception

INFO 04:30:56,680 Heap size: 878116864/879165440
 INFO 04:30:56,684 JNA not found. Native methods will be disabled.
 INFO 04:30:56,691 Loading settings from 
file:/opt/cassandra/apache-cassandra-0.7.0/conf/cassandra.yaml
 INFO 04:30:56,898 DiskAccessMode 'auto' determined to be standard, 
indexAccessMode is standard
 INFO 04:30:57,092 Creating new commitlog segment 
/var/lib/cassandra/commitlog/CommitLog-1298521857092.log
 INFO 04:30:57,265 reading saved cache 
/var/lib/cassandra/saved_caches/system-IndexInfo-KeyCache
 INFO 04:30:57,270 reading saved cache 
/var/lib/cassandra/saved_caches/system-Schema-KeyCache
 INFO 04:30:57,305 Opening /var/lib/cassandra/data/system/Schema-e-2
 INFO 04:30:57,315 Opening /var/lib/cassandra/data/system/Schema-e-1
 INFO 04:30:57,326 reading saved cache 
/var/lib/cassandra/saved_caches/system-Migrations-KeyCache
 INFO 04:30:57,327 Opening /var/lib/cassandra/data/system/Migrations-e-2
 INFO 04:30:57,331 Opening /var/lib/cassandra/data/system/Migrations-e-1
 INFO 04:30:57,412 reading saved cache 
/var/lib/cassandra/saved_caches/system-LocationInfo-KeyCache
 INFO 04:30:57,413 Opening 
/var/lib/cassandra/data/system/LocationInfo-e-65
 INFO 04:30:57,416 Opening 
/var/lib/cassandra/data/system/LocationInfo-e-67
 INFO 04:30:57,421 Opening 
/var/lib/cassandra/data/system/LocationInfo-e-66
 INFO 04:30:57,427 reading saved cache 
/var/lib/cassandra/saved_caches/system-HintsColumnFamily-KeyCache
 INFO 04:30:57,454 Loading schema version 
f13dfb89-3db9-11e0-8bbe-e700f669bcfc
 WARN 04:30:57,831 Schema definitions were defined both locally and in 
cassandra.yaml. Definitions in cassandra.yaml were ignored.
 INFO 04:30:57,841 reading saved cache 
/var/lib/cassandra/saved_caches/AddressBook-Himanshi-KeyCache
 INFO 04:30:57,842 Opening 
/var/lib/cassandra/data/AddressBook/Himanshi-e-1
 INFO 04:30:57,854 Replaying 
/var/lib/cassandra/commitlog/CommitLog-1298521699165.log
 INFO 04:30:57,854 Finished reading 
/var/lib/cassandra/commitlog/CommitLog-1298521699165.log
 INFO 04:30:57,855 Log replay complete
 INFO 04:30:57,981 Cassandra version: 0.7.0
 INFO 04:30:57,981 Thrift API version: 19.4.0
 INFO 04:30:57,989 Loading persisted ring state
 INFO 04:30:58,025 Starting up server gossip
 INFO 04:30:58,046 switching in a fresh Memtable for LocationInfo at 
CommitLogContext(file='/var/lib/cassandra/commitlog/CommitLog-1298521857092.log', 
position=148)
 INFO 04:30:58,047 Enqueuing flush of Memtable-LocationInfo@22845412(29 
bytes, 1 operations)
 INFO 04:30:58,047 Writing Memtable-LocationInfo@22845412(29 bytes, 1 
operations)
 INFO 04:30:58,425 Completed flushing 
/var/lib/cassandra/data/system/LocationInfo-e-68-Data.db (149 bytes)
 INFO 04:30:58,426 Compacting 
[org.apache.cassandra.io.sstable.SSTableReader(path='/var/lib/cassandra/data/system/LocationInfo-e-65-Data.db'),org.apache.cassandra.io.sstable.SSTableReader(path='/var/lib/cassandra/data/system/LocationInfo-e-66-Data.db'),org.apache.cassandra.io.sstable.SSTableReader(path='/var/lib/cassandra/data/system/LocationInfo-e-67-Data.db'),org.apache.cassandra.io.sstable.SSTableReader(path='/var/lib/cassandra/data/system/LocationInfo-e-68-Data.db')]
ERROR 04:30:58,513 Exception encountered during startup.
java.net.BindException: Cannot assign requested address
        at sun.nio.ch.Net.bind(Native Method)
        at 
sun.nio.ch.ServerSocketChannelImpl.bind(ServerSocketChannelImpl.java:126)
        at 
sun.nio.ch.ServerSocketAdaptor.bind(ServerSocketAdaptor.java:59)
        at 
sun.nio.ch.ServerSocketAdaptor.bind(ServerSocketAdaptor.java:52)
        at 
org.apache.cassandra.net.MessagingService.listen(MessagingService.java:181)
        at 
org.apache.cassandra.service.StorageService.initServer(StorageService.java:334)
        at 
org.apache.cassandra.service.AbstractCassandraDaemon.setup(AbstractCassandraDaemon.java:161)
        at 
org.apache.cassandra.thrift.CassandraDaemon.setup(CassandraDaemon.java:55)
        at 
org.apache.cassandra.service.AbstractCassandraDaemon.activate(AbstractCassandraDaemon.java:217)
        at 
org.apache.cassandra.thrift.CassandraDaemon.main(CassandraDaemon.java:134)
Exception encountered during startup.
java.net.BindException: Cannot assign requested address
        at sun.nio.ch.Net.bind(Native Method)
        at 
sun.nio.ch.ServerSocketChannelImpl.bind(ServerSocketChannelImpl.java:126)
        at 
sun.nio.ch.ServerSocketAdaptor.bind(ServerSocketAdaptor.java:59)
        at 
sun.nio.ch.ServerSocketAdaptor.bind(ServerSocketAdaptor.java:52)
        at 
org.apache.cassandra.net.MessagingService.listen(MessagingService.java:181)
        at 
org.apache.cassandra.service.StorageService.initServer(StorageService.java:334)
        at 
org.apache.cassandra.service.AbstractCassandraDaemon.setup(AbstractCassandraDaemon.java:161)
        at 
org.apache.cassandra.thrift.CassandraDaemon.setup(CassandraDaemon.java:55)
        at 
org.apache.cassandra.service.AbstractCassandraDaemon.activate(AbstractCassandraDaemon.java:217)
        at 
org.apache.cassandra.thrift.CassandraDaemon.main(CassandraDaemon.java:134)

 I am able to ping both the nodes through public ips.





From:
Dave Viner <da...@gmail.com>
To:
user@cassandra.apache.org
Date:
02/23/2011 11:01 PM
Subject:
Re: Cassandra nodes on EC2 in two different regions not communicating



internal EC2 ips (10.xxx.xxx.xxx) work across availability zones (e.g., 
from us-east-1a to us-east-1b) but do not work across regions (e.g., 
us-east to us-west).  To do regions, you must use the public ip address 
assigned by amazon.

Himanshi, when you log into 1 node, and telnet to port 7000 on the other 
node, which IP address did you use - the 10.x address or the public ip 
address?
And what is the seed/non-seed configuration in both cassandra.yaml files?

Dave Viner


On Wed, Feb 23, 2011 at 8:12 AM, Frank LoVecchio <fr...@isidorey.com> 
wrote:
The internal Amazon IP address is what you will want to use so you don't 
have to go through DNS anyways; not sure if this works from US-East to 
US-West, but it does make things quicker in between zones, e.g. us-east-1a 
to us-east-1b.


On Wed, Feb 23, 2011 at 9:09 AM, Dave Viner <da...@gmail.com> wrote:
Try using the IP address, not the dns name in the cassandra.yaml.

If you can telnet from one to the other on port 7000, and both nodes have 
the other node in their config, it should work.

Dave Viner


On Wed, Feb 23, 2011 at 1:43 AM, Himanshi Sharma <hi...@tcs.com> 
wrote:

Ya they do. Have specified Public DNS in seed field of each node in 
Cassandra.yaml...nt able to figure out what the problem is ??? 




From: 
Sasha Dolgy <sd...@gmail.com> 
To: 
user@cassandra.apache.org 
Date: 
02/23/2011 02:56 PM 
Subject: 
Re: Cassandra nodes on EC2 in two different regions not communicating




did you define the other host in the cassandra.yaml ?  on both servers 
.... they need to know about each other 

On Wed, Feb 23, 2011 at 10:16 AM, Himanshi Sharma <himanshi.sharma@tcs.com
> wrote: 

Thanks Dave but I am able to telnet to other instances on port 7000 
and when i run  ./nodetool --host 
ec2-50-18-60-117.us-west-1.compute.amazonaws.com  ring... I can see only 
one node. 

Do we need to configure anything else in Cassandra.yaml or 
Cassandra-env.sh ??? 






From: 
Dave Viner <da...@gmail.com> 
To: 
user@cassandra.apache.org 
Cc: 
Himanshi Sharma <hi...@tcs.com> 
Date: 
02/23/2011 11:36 AM 
Subject: 
Re: Cassandra nodes on EC2 in two different regions not communicating





If you login to one of the nodes, can you telnet to port 7000 on the other 
node? 

If not, then almost certainly it's a firewall/Security Group issue. 

You can find out the security groups for any node by logging in, and then 
running: 

% curl "http://169.254.169.254/latest/meta-data/security-groups" 

Assuming that both nodes are in the same security group, ensure that the 
SG is configured to allow other members of the SG to communicate on port 
7000 to each other. 

HTH, 
Dave Viner 


On Tue, Feb 22, 2011 at 8:59 PM, Himanshi Sharma <hi...@tcs.com> 
wrote: 

Hi, 

I am new to Cassandra. I m running Cassandra on EC2. I configured 
Cassandra cluster on two instances in different regions. 
But when I am trying the nodetool command with ring option, I am getting 
only single node. 

How to make these two nodes communicate with each other. I have already 
opened required ports. i.e 7000, 8080, 9160 in respective 
security groups. Plz help me with this. 

Regards, 
Himanshi Sharma 


=====-----=====-----=====
Notice: The information contained in this e-mail
message and/or attachments to it may contain 
confidential or privileged information. If you are 

not the intended recipient, any dissemination, use, 
review, distribution, printing or copying of the 
information contained in this e-mail message 
and/or attachments to it are strictly prohibited. If 
you have received this communication in error, 

please notify us by reply e-mail or telephone and 
immediately and permanently delete the message 
and any attachments. Thank you




=====-----=====-----=====


Notice: The information contained in this e-mail
message and/or attachments to it may contain 
confidential or privileged information. If you are 
not the intended recipient, any dissemination, use, 
review, distribution, printing or copying of the 


information contained in this e-mail message 
and/or attachments to it are strictly prohibited. If 
you have received this communication in error, 
please notify us by reply e-mail or telephone and 
immediately and permanently delete the message 


and any attachments. Thank you





-- 
Sasha Dolgy
sasha.dolgy@gmail.com 

=====-----=====-----=====
Notice: The information contained in this e-mail
message and/or attachments to it may contain 
confidential or privileged information. If you are 



not the intended recipient, any dissemination, use, 
review, distribution, printing or copying of the 
information contained in this e-mail message 
and/or attachments to it are strictly prohibited. If 
you have received this communication in error, 



please notify us by reply e-mail or telephone and 
immediately and permanently delete the message 
and any attachments. Thank you






-- 
Frank LoVecchio
Senior Software Engineer | Isidorey, LLC
Google Voice +1.720.295.9179
isidorey.com | facebook.com/franklovecchio | franklovecchio.com



=====-----=====-----=====
Notice: The information contained in this e-mail
message and/or attachments to it may contain 
confidential or privileged information. If you are 
not the intended recipient, any dissemination, use, 
review, distribution, printing or copying of the 
information contained in this e-mail message 
and/or attachments to it are strictly prohibited. If 
you have received this communication in error, 
please notify us by reply e-mail or telephone and 
immediately and permanently delete the message 
and any attachments. Thank you



Re: Cassandra nodes on EC2 in two different regions not communicating

Posted by Peter Fales <Pe...@alcatel-lucent.com>.
Are you running nodetool on the host, or on a remote machine? 

If local, does "netstat -n" show that you are listening on the JMX port?

If remote, have you added the JMX port to your security group?


On Tue, Mar 01, 2011 at 12:54:13AM -0600, Himanshi Sharma wrote:
> Peter,
> 
> I build Cassandra after making changes as per ur patch. Nw when try
> nodetool i get this exception.
> 
> 
> [root@ip-10-170-153-71 bin]#  ./nodetool -h 175.41.143.192 ring
> 
> Error connection to remote JMX agent!
> java.rmi.ConnectException: Connection refused to host: 10.130.62.177;
> nested exception is:
>         java.net.ConnectException: Connection timed out
>         at
> sun.rmi.transport.tcp.TCPEndpoint.newSocket(TCPEndpoint.java:601)
>         at
> sun.rmi.transport.tcp.TCPChannel.createConnection(TCPChannel.java:198)
>         at
> sun.rmi.transport.tcp.TCPChannel.newConnection(TCPChannel.java:184)
>         at sun.rmi.server.UnicastRef.invoke(UnicastRef.java:110)
>         at
> javax.management.remote.rmi.RMIServerImpl_Stub.newClient(Unknown Source)
>         at
> javax.management.remote.rmi.RMIConnector.getConnection(RMIConnector.java:2327)
>         at
> javax.management.remote.rmi.RMIConnector.connect(RMIConnector.java:279)
>         at
> javax.management.remote.JMXConnectorFactory.connect(JMXConnectorFactory.java:248)
>         at
> org.apache.cassandra.tools.NodeProbe.connect(NodeProbe.java:110)
>         at org.apache.cassandra.tools.NodeProbe.<init>(NodeProbe.java:86)
>         at org.apache.cassandra.tools.NodeCmd.main(NodeCmd.java:476)
> Caused by: java.net.ConnectException: Connection timed out
>         at java.net.PlainSocketImpl.socketConnect(Native Method)
>         at java.net.PlainSocketImpl.doConnect(PlainSocketImpl.java:351)
>         at
> java.net.PlainSocketImpl.connectToAddress(PlainSocketImpl.java:213)
>         at java.net.PlainSocketImpl.connect(PlainSocketImpl.java:200)
>         at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:366)
>         at java.net.Socket.connect(Socket.java:529)
>         at java.net.Socket.connect(Socket.java:478)
>         at java.net.Socket.<init>(Socket.java:375)
>         at java.net.Socket.<init>(Socket.java:189)
>         at
> sun.rmi.transport.proxy.RMIDirectSocketFactory.createSocket(RMIDirectSocketFactory.java:22)
>         at
> sun.rmi.transport.proxy.RMIMasterSocketFactory.createSocket(RMIMasterSocketFactory.java:128)
>         at
> sun.rmi.transport.tcp.TCPEndpoint.newSocket(TCPEndpoint.java:595)
>         ... 10 more
> 
> 
> Himanshi Sharma
> 
> 
> 
> 
> From:
> Peter Fales <Pe...@alcatel-lucent.com>
> To:
> "dev@cassandra.apache.org" <de...@cassandra.apache.org>
> Date:
> 02/28/2011 06:25 PM
> Subject:
> Re: Cassandra nodes on EC2 in two different regions not communicating
> 
> 
> 
> Are you sure you actually re-built Cassandra after making those source
> code changes?   I believe "Cannot assign requested address" is the error
> you
> get with the official Cassandra because the external IP address is
> not the actual address of an adapter.   The patches change the code
> so that it listens on all interfaces (so it should not actually be
> requesting a specific address)
> 
> On Mon, Feb 28, 2011 at 06:23:53AM -0600, Himanshi Sharma wrote:
> > Hi Peter,
> >
> > I made changes as per ur patch. Still its nt working. Using external ip
> in
> > Listen addr gives this exception.
> >
> > ERROR 11:47:14,092 Exception encountered during startup.
> > java.net.BindException: Cannot assign requested address
> >         at sun.nio.ch.Net.bind(Native Method)
> >         at
> >
> sun.nio.ch.ServerSocketChannelImpl.bind(ServerSocketChannelImpl.java:137)
> >         at
> > sun.nio.ch.ServerSocketAdaptor.bind(ServerSocketAdaptor.java:77)
> >         at
> > sun.nio.ch.ServerSocketAdaptor.bind(ServerSocketAdaptor.java:70)
> >         at
> >
> org.apache.cassandra.net.MessagingService.listen(MessagingService.java:138)
> >         at
> >
> org.apache.cassandra.service.StorageService.initServer(StorageService.java:319)
> >         at
> >
> org.apache.cassandra.thrift.CassandraDaemon.setup(CassandraDaemon.java:99)
> >         at
> >
> org.apache.cassandra.thrift.CassandraDaemon.main(CassandraDaemon.java:177)
> > Exception encountered during startup.
> > java.net.BindException: Cannot assign requested address
> >         at sun.nio.ch.Net.bind(Native Method)
> >         at
> >
> sun.nio.ch.ServerSocketChannelImpl.bind(ServerSocketChannelImpl.java:137)
> >         at
> > sun.nio.ch.ServerSocketAdaptor.bind(ServerSocketAdaptor.java:77)
> >         at
> > sun.nio.ch.ServerSocketAdaptor.bind(ServerSocketAdaptor.java:70)
> >         at
> >
> org.apache.cassandra.net.MessagingService.listen(MessagingService.java:138)
> >         at
> >
> org.apache.cassandra.service.StorageService.initServer(StorageService.java:319)
> >         at
> >
> org.apache.cassandra.thrift.CassandraDaemon.setup(CassandraDaemon.java:99)
> >         at
> >
> org.apache.cassandra.thrift.CassandraDaemon.main(CassandraDaemon.java:177)
> >
> > So i kept them blank. Cassandra runs. Bt still not showing nodes of
> other
> > regions in nodetool cmd, whereas i am able to ping and telnet.
> >
> > Thanks,
> > Himanshi Sharma
> >
> >
> >
> >
> > From:
> > Peter Fales <Pe...@alcatel-lucent.com>
> > To:
> > "dev@cassandra.apache.org" <de...@cassandra.apache.org>
> > Date:
> > 02/24/2011 06:44 PM
> > Subject:
> > Re: Cassandra nodes on EC2 in two different regions not communicating
> >
> >
> >
> > I sent a note mentioning this yesterday and referring to my post from
> > last September. See:
> > http://www.mail-archive.com/user@cassandra.apache.org/msg05692.html
> >
> > On Thu, Feb 24, 2011 at 07:04:03AM -0600, Himanshi Sharma wrote:
> > > Peter,
> > >
> > > Please tell me the options. I m new to cassandra and definitely want
> to
> > > try out.
> > >
> > > Thanks,
> > > Himanshi
> > >
> > >
> > >
> > >
> > > From:
> > > Peter Fales <Pe...@alcatel-lucent.com>
> > > To:
> > > "dev@cassandra.apache.org" <de...@cassandra.apache.org>
> > > Date:
> > > 02/24/2011 06:30 PM
> > > Subject:
> > > Re: Cassandra nodes on EC2 in two different regions not communicating
> > >
> > >
> > >
> > > It's pretty easy to do if you're willing/able to make some small
> changes
> > > to the Cassandra code.   Is that an option?
> > >
> > > On Thu, Feb 24, 2011 at 06:52:24AM -0600, Himanshi Sharma wrote:
> > > > Hi All,
> > > >
> > > > I am trying to configure a cassandra cluster of 2 nodes in different
> 
> > > > regions of amazon ec2.
> > > >
> > > > Nodes are running fine but when i try nodetool command with ring
> > option
> > > i
> > > > get single node.
> > > >
> > > > And  both the nodes are able to ping each other, telnet each other.
> > Not
> > > > able to figure out what is the problem.
> > > >
> > > > Plz help
> > > >
> > > > Thanks,
> > > > Himanshi Sharma
> > > >
> > > > =====-----=====-----=====
> > > > Notice: The information contained in this e-mail
> > > > message and/or attachments to it may contain
> > > > confidential or privileged information. If you are
> > > > not the intended recipient, any dissemination, use,
> > > > review, distribution, printing or copying of the
> > > > information contained in this e-mail message
> > > > and/or attachments to it are strictly prohibited. If
> > > > you have received this communication in error,
> > > > please notify us by reply e-mail or telephone and
> > > > immediately and permanently delete the message
> > > > and any attachments. Thank you
> > > >
> > >
> > > --
> > > Peter Fales
> > > Alcatel-Lucent
> > > Member of Technical Staff
> > > 1960 Lucent Lane
> > > Room: 9H-505
> > > Naperville, IL 60566-7033
> > > Email: Peter.Fales@alcatel-lucent.com
> > > Phone: 630 979 8031
> > >
> > >
> > > =====-----=====-----=====
> > > Notice: The information contained in this e-mail
> > > message and/or attachments to it may contain
> > > confidential or privileged information. If you are
> > > not the intended recipient, any dissemination, use,
> > > review, distribution, printing or copying of the
> > > information contained in this e-mail message
> > > and/or attachments to it are strictly prohibited. If
> > > you have received this communication in error,
> > > please notify us by reply e-mail or telephone and
> > > immediately and permanently delete the message
> > > and any attachments. Thank you
> > >
> >
> > --
> > Peter Fales
> > Alcatel-Lucent
> > Member of Technical Staff
> > 1960 Lucent Lane
> > Room: 9H-505
> > Naperville, IL 60566-7033
> > Email: Peter.Fales@alcatel-lucent.com
> > Phone: 630 979 8031
> >
> >
> > =====-----=====-----=====
> > Notice: The information contained in this e-mail
> > message and/or attachments to it may contain
> > confidential or privileged information. If you are
> > not the intended recipient, any dissemination, use,
> > review, distribution, printing or copying of the
> > information contained in this e-mail message
> > and/or attachments to it are strictly prohibited. If
> > you have received this communication in error,
> > please notify us by reply e-mail or telephone and
> > immediately and permanently delete the message
> > and any attachments. Thank you
> >
> 
> --
> Peter Fales
> Alcatel-Lucent
> Member of Technical Staff
> 1960 Lucent Lane
> Room: 9H-505
> Naperville, IL 60566-7033
> Email: Peter.Fales@alcatel-lucent.com
> Phone: 630 979 8031
> 
> 
> =====-----=====-----=====
> Notice: The information contained in this e-mail
> message and/or attachments to it may contain
> confidential or privileged information. If you are
> not the intended recipient, any dissemination, use,
> review, distribution, printing or copying of the
> information contained in this e-mail message
> and/or attachments to it are strictly prohibited. If
> you have received this communication in error,
> please notify us by reply e-mail or telephone and
> immediately and permanently delete the message
> and any attachments. Thank you
> 

-- 
Peter Fales
Alcatel-Lucent
Member of Technical Staff
1960 Lucent Lane
Room: 9H-505
Naperville, IL 60566-7033
Email: Peter.Fales@alcatel-lucent.com
Phone: 630 979 8031

Re: Cassandra nodes on EC2 in two different regions not communicating

Posted by Himanshi Sharma <hi...@tcs.com>.
Peter,

I build Cassandra after making changes as per ur patch. Nw when try 
nodetool i get this exception. 


[root@ip-10-170-153-71 bin]#  ./nodetool -h 175.41.143.192 ring

Error connection to remote JMX agent!
java.rmi.ConnectException: Connection refused to host: 10.130.62.177; 
nested exception is:
        java.net.ConnectException: Connection timed out
        at 
sun.rmi.transport.tcp.TCPEndpoint.newSocket(TCPEndpoint.java:601)
        at 
sun.rmi.transport.tcp.TCPChannel.createConnection(TCPChannel.java:198)
        at 
sun.rmi.transport.tcp.TCPChannel.newConnection(TCPChannel.java:184)
        at sun.rmi.server.UnicastRef.invoke(UnicastRef.java:110)
        at 
javax.management.remote.rmi.RMIServerImpl_Stub.newClient(Unknown Source)
        at 
javax.management.remote.rmi.RMIConnector.getConnection(RMIConnector.java:2327)
        at 
javax.management.remote.rmi.RMIConnector.connect(RMIConnector.java:279)
        at 
javax.management.remote.JMXConnectorFactory.connect(JMXConnectorFactory.java:248)
        at 
org.apache.cassandra.tools.NodeProbe.connect(NodeProbe.java:110)
        at org.apache.cassandra.tools.NodeProbe.<init>(NodeProbe.java:86)
        at org.apache.cassandra.tools.NodeCmd.main(NodeCmd.java:476)
Caused by: java.net.ConnectException: Connection timed out
        at java.net.PlainSocketImpl.socketConnect(Native Method)
        at java.net.PlainSocketImpl.doConnect(PlainSocketImpl.java:351)
        at 
java.net.PlainSocketImpl.connectToAddress(PlainSocketImpl.java:213)
        at java.net.PlainSocketImpl.connect(PlainSocketImpl.java:200)
        at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:366)
        at java.net.Socket.connect(Socket.java:529)
        at java.net.Socket.connect(Socket.java:478)
        at java.net.Socket.<init>(Socket.java:375)
        at java.net.Socket.<init>(Socket.java:189)
        at 
sun.rmi.transport.proxy.RMIDirectSocketFactory.createSocket(RMIDirectSocketFactory.java:22)
        at 
sun.rmi.transport.proxy.RMIMasterSocketFactory.createSocket(RMIMasterSocketFactory.java:128)
        at 
sun.rmi.transport.tcp.TCPEndpoint.newSocket(TCPEndpoint.java:595)
        ... 10 more


Himanshi Sharma




From:
Peter Fales <Pe...@alcatel-lucent.com>
To:
"dev@cassandra.apache.org" <de...@cassandra.apache.org>
Date:
02/28/2011 06:25 PM
Subject:
Re: Cassandra nodes on EC2 in two different regions not communicating



Are you sure you actually re-built Cassandra after making those source
code changes?   I believe "Cannot assign requested address" is the error 
you
get with the official Cassandra because the external IP address is 
not the actual address of an adapter.   The patches change the code
so that it listens on all interfaces (so it should not actually be
requesting a specific address)

On Mon, Feb 28, 2011 at 06:23:53AM -0600, Himanshi Sharma wrote:
> Hi Peter,
> 
> I made changes as per ur patch. Still its nt working. Using external ip 
in 
> Listen addr gives this exception.
> 
> ERROR 11:47:14,092 Exception encountered during startup.
> java.net.BindException: Cannot assign requested address
>         at sun.nio.ch.Net.bind(Native Method)
>         at 
> 
sun.nio.ch.ServerSocketChannelImpl.bind(ServerSocketChannelImpl.java:137)
>         at 
> sun.nio.ch.ServerSocketAdaptor.bind(ServerSocketAdaptor.java:77)
>         at 
> sun.nio.ch.ServerSocketAdaptor.bind(ServerSocketAdaptor.java:70)
>         at 
> 
org.apache.cassandra.net.MessagingService.listen(MessagingService.java:138)
>         at 
> 
org.apache.cassandra.service.StorageService.initServer(StorageService.java:319)
>         at 
> 
org.apache.cassandra.thrift.CassandraDaemon.setup(CassandraDaemon.java:99)
>         at 
> 
org.apache.cassandra.thrift.CassandraDaemon.main(CassandraDaemon.java:177)
> Exception encountered during startup.
> java.net.BindException: Cannot assign requested address
>         at sun.nio.ch.Net.bind(Native Method)
>         at 
> 
sun.nio.ch.ServerSocketChannelImpl.bind(ServerSocketChannelImpl.java:137)
>         at 
> sun.nio.ch.ServerSocketAdaptor.bind(ServerSocketAdaptor.java:77)
>         at 
> sun.nio.ch.ServerSocketAdaptor.bind(ServerSocketAdaptor.java:70)
>         at 
> 
org.apache.cassandra.net.MessagingService.listen(MessagingService.java:138)
>         at 
> 
org.apache.cassandra.service.StorageService.initServer(StorageService.java:319)
>         at 
> 
org.apache.cassandra.thrift.CassandraDaemon.setup(CassandraDaemon.java:99)
>         at 
> 
org.apache.cassandra.thrift.CassandraDaemon.main(CassandraDaemon.java:177)
> 
> So i kept them blank. Cassandra runs. Bt still not showing nodes of 
other 
> regions in nodetool cmd, whereas i am able to ping and telnet.
> 
> Thanks,
> Himanshi Sharma
> 
> 
> 
> 
> From:
> Peter Fales <Pe...@alcatel-lucent.com>
> To:
> "dev@cassandra.apache.org" <de...@cassandra.apache.org>
> Date:
> 02/24/2011 06:44 PM
> Subject:
> Re: Cassandra nodes on EC2 in two different regions not communicating
> 
> 
> 
> I sent a note mentioning this yesterday and referring to my post from
> last September. See:
> http://www.mail-archive.com/user@cassandra.apache.org/msg05692.html
> 
> On Thu, Feb 24, 2011 at 07:04:03AM -0600, Himanshi Sharma wrote:
> > Peter,
> > 
> > Please tell me the options. I m new to cassandra and definitely want 
to 
> > try out.
> > 
> > Thanks,
> > Himanshi
> > 
> > 
> > 
> > 
> > From:
> > Peter Fales <Pe...@alcatel-lucent.com>
> > To:
> > "dev@cassandra.apache.org" <de...@cassandra.apache.org>
> > Date:
> > 02/24/2011 06:30 PM
> > Subject:
> > Re: Cassandra nodes on EC2 in two different regions not communicating
> > 
> > 
> > 
> > It's pretty easy to do if you're willing/able to make some small 
changes
> > to the Cassandra code.   Is that an option?
> > 
> > On Thu, Feb 24, 2011 at 06:52:24AM -0600, Himanshi Sharma wrote:
> > > Hi All,
> > > 
> > > I am trying to configure a cassandra cluster of 2 nodes in different 

> > > regions of amazon ec2. 
> > > 
> > > Nodes are running fine but when i try nodetool command with ring 
> option 
> > i 
> > > get single node.
> > > 
> > > And  both the nodes are able to ping each other, telnet each other. 
> Not 
> > > able to figure out what is the problem.
> > > 
> > > Plz help
> > > 
> > > Thanks,
> > > Himanshi Sharma
> > > 
> > > =====-----=====-----=====
> > > Notice: The information contained in this e-mail
> > > message and/or attachments to it may contain 
> > > confidential or privileged information. If you are 
> > > not the intended recipient, any dissemination, use, 
> > > review, distribution, printing or copying of the 
> > > information contained in this e-mail message 
> > > and/or attachments to it are strictly prohibited. If 
> > > you have received this communication in error, 
> > > please notify us by reply e-mail or telephone and 
> > > immediately and permanently delete the message 
> > > and any attachments. Thank you
> > > 
> > 
> > -- 
> > Peter Fales
> > Alcatel-Lucent
> > Member of Technical Staff
> > 1960 Lucent Lane
> > Room: 9H-505
> > Naperville, IL 60566-7033
> > Email: Peter.Fales@alcatel-lucent.com
> > Phone: 630 979 8031
> > 
> > 
> > =====-----=====-----=====
> > Notice: The information contained in this e-mail
> > message and/or attachments to it may contain 
> > confidential or privileged information. If you are 
> > not the intended recipient, any dissemination, use, 
> > review, distribution, printing or copying of the 
> > information contained in this e-mail message 
> > and/or attachments to it are strictly prohibited. If 
> > you have received this communication in error, 
> > please notify us by reply e-mail or telephone and 
> > immediately and permanently delete the message 
> > and any attachments. Thank you
> > 
> 
> -- 
> Peter Fales
> Alcatel-Lucent
> Member of Technical Staff
> 1960 Lucent Lane
> Room: 9H-505
> Naperville, IL 60566-7033
> Email: Peter.Fales@alcatel-lucent.com
> Phone: 630 979 8031
> 
> 
> =====-----=====-----=====
> Notice: The information contained in this e-mail
> message and/or attachments to it may contain 
> confidential or privileged information. If you are 
> not the intended recipient, any dissemination, use, 
> review, distribution, printing or copying of the 
> information contained in this e-mail message 
> and/or attachments to it are strictly prohibited. If 
> you have received this communication in error, 
> please notify us by reply e-mail or telephone and 
> immediately and permanently delete the message 
> and any attachments. Thank you
> 

-- 
Peter Fales
Alcatel-Lucent
Member of Technical Staff
1960 Lucent Lane
Room: 9H-505
Naperville, IL 60566-7033
Email: Peter.Fales@alcatel-lucent.com
Phone: 630 979 8031


=====-----=====-----=====
Notice: The information contained in this e-mail
message and/or attachments to it may contain 
confidential or privileged information. If you are 
not the intended recipient, any dissemination, use, 
review, distribution, printing or copying of the 
information contained in this e-mail message 
and/or attachments to it are strictly prohibited. If 
you have received this communication in error, 
please notify us by reply e-mail or telephone and 
immediately and permanently delete the message 
and any attachments. Thank you



Re: Cassandra nodes on EC2 in two different regions not communicating

Posted by Himanshi Sharma <hi...@tcs.com>.
Hello All,

My problem with Cassandra across region is solved. Thanks to Milind and 
Peter.

I was editing the Source, the two files MessagingService.java and 
OutboundTcpConnection.java correctly and even was able to build it 
successfully
by referring the patch on 
http://www.mail-archive.com/user@cassandra.apache.org/msg05692.html. 

The problem was with the cassandra.yaml.

In rpc_address filed, private ip should be used and in listen_address it 
should be public. I was trying with public ip in both the fields as well 
as by keeping both blank.

Regards,
Himanshi Sharma




From:
Peter Fales <Pe...@alcatel-lucent.com>
To:
"dev@cassandra.apache.org" <de...@cassandra.apache.org>
Date:
02/28/2011 06:25 PM
Subject:
Re: Cassandra nodes on EC2 in two different regions not communicating



Are you sure you actually re-built Cassandra after making those source
code changes?   I believe "Cannot assign requested address" is the error 
you
get with the official Cassandra because the external IP address is 
not the actual address of an adapter.   The patches change the code
so that it listens on all interfaces (so it should not actually be
requesting a specific address)

On Mon, Feb 28, 2011 at 06:23:53AM -0600, Himanshi Sharma wrote:
> Hi Peter,
> 
> I made changes as per ur patch. Still its nt working. Using external ip 
in 
> Listen addr gives this exception.
> 
> ERROR 11:47:14,092 Exception encountered during startup.
> java.net.BindException: Cannot assign requested address
>         at sun.nio.ch.Net.bind(Native Method)
>         at 
> 
sun.nio.ch.ServerSocketChannelImpl.bind(ServerSocketChannelImpl.java:137)
>         at 
> sun.nio.ch.ServerSocketAdaptor.bind(ServerSocketAdaptor.java:77)
>         at 
> sun.nio.ch.ServerSocketAdaptor.bind(ServerSocketAdaptor.java:70)
>         at 
> 
org.apache.cassandra.net.MessagingService.listen(MessagingService.java:138)
>         at 
> 
org.apache.cassandra.service.StorageService.initServer(StorageService.java:319)
>         at 
> 
org.apache.cassandra.thrift.CassandraDaemon.setup(CassandraDaemon.java:99)
>         at 
> 
org.apache.cassandra.thrift.CassandraDaemon.main(CassandraDaemon.java:177)
> Exception encountered during startup.
> java.net.BindException: Cannot assign requested address
>         at sun.nio.ch.Net.bind(Native Method)
>         at 
> 
sun.nio.ch.ServerSocketChannelImpl.bind(ServerSocketChannelImpl.java:137)
>         at 
> sun.nio.ch.ServerSocketAdaptor.bind(ServerSocketAdaptor.java:77)
>         at 
> sun.nio.ch.ServerSocketAdaptor.bind(ServerSocketAdaptor.java:70)
>         at 
> 
org.apache.cassandra.net.MessagingService.listen(MessagingService.java:138)
>         at 
> 
org.apache.cassandra.service.StorageService.initServer(StorageService.java:319)
>         at 
> 
org.apache.cassandra.thrift.CassandraDaemon.setup(CassandraDaemon.java:99)
>         at 
> 
org.apache.cassandra.thrift.CassandraDaemon.main(CassandraDaemon.java:177)
> 
> So i kept them blank. Cassandra runs. Bt still not showing nodes of 
other 
> regions in nodetool cmd, whereas i am able to ping and telnet.
> 
> Thanks,
> Himanshi Sharma
> 
> 
> 
> 
> From:
> Peter Fales <Pe...@alcatel-lucent.com>
> To:
> "dev@cassandra.apache.org" <de...@cassandra.apache.org>
> Date:
> 02/24/2011 06:44 PM
> Subject:
> Re: Cassandra nodes on EC2 in two different regions not communicating
> 
> 
> 
> I sent a note mentioning this yesterday and referring to my post from
> last September. See:
> http://www.mail-archive.com/user@cassandra.apache.org/msg05692.html
> 
> On Thu, Feb 24, 2011 at 07:04:03AM -0600, Himanshi Sharma wrote:
> > Peter,
> > 
> > Please tell me the options. I m new to cassandra and definitely want 
to 
> > try out.
> > 
> > Thanks,
> > Himanshi
> > 
> > 
> > 
> > 
> > From:
> > Peter Fales <Pe...@alcatel-lucent.com>
> > To:
> > "dev@cassandra.apache.org" <de...@cassandra.apache.org>
> > Date:
> > 02/24/2011 06:30 PM
> > Subject:
> > Re: Cassandra nodes on EC2 in two different regions not communicating
> > 
> > 
> > 
> > It's pretty easy to do if you're willing/able to make some small 
changes
> > to the Cassandra code.   Is that an option?
> > 
> > On Thu, Feb 24, 2011 at 06:52:24AM -0600, Himanshi Sharma wrote:
> > > Hi All,
> > > 
> > > I am trying to configure a cassandra cluster of 2 nodes in different 

> > > regions of amazon ec2. 
> > > 
> > > Nodes are running fine but when i try nodetool command with ring 
> option 
> > i 
> > > get single node.
> > > 
> > > And  both the nodes are able to ping each other, telnet each other. 
> Not 
> > > able to figure out what is the problem.
> > > 
> > > Plz help
> > > 
> > > Thanks,
> > > Himanshi Sharma
> > > 
> > > =====-----=====-----=====
> > > Notice: The information contained in this e-mail
> > > message and/or attachments to it may contain 
> > > confidential or privileged information. If you are 
> > > not the intended recipient, any dissemination, use, 
> > > review, distribution, printing or copying of the 
> > > information contained in this e-mail message 
> > > and/or attachments to it are strictly prohibited. If 
> > > you have received this communication in error, 
> > > please notify us by reply e-mail or telephone and 
> > > immediately and permanently delete the message 
> > > and any attachments. Thank you
> > > 
> > 
> > -- 
> > Peter Fales
> > Alcatel-Lucent
> > Member of Technical Staff
> > 1960 Lucent Lane
> > Room: 9H-505
> > Naperville, IL 60566-7033
> > Email: Peter.Fales@alcatel-lucent.com
> > Phone: 630 979 8031
> > 
> > 
> > =====-----=====-----=====
> > Notice: The information contained in this e-mail
> > message and/or attachments to it may contain 
> > confidential or privileged information. If you are 
> > not the intended recipient, any dissemination, use, 
> > review, distribution, printing or copying of the 
> > information contained in this e-mail message 
> > and/or attachments to it are strictly prohibited. If 
> > you have received this communication in error, 
> > please notify us by reply e-mail or telephone and 
> > immediately and permanently delete the message 
> > and any attachments. Thank you
> > 
> 
> -- 
> Peter Fales
> Alcatel-Lucent
> Member of Technical Staff
> 1960 Lucent Lane
> Room: 9H-505
> Naperville, IL 60566-7033
> Email: Peter.Fales@alcatel-lucent.com
> Phone: 630 979 8031
> 
> 
> =====-----=====-----=====
> Notice: The information contained in this e-mail
> message and/or attachments to it may contain 
> confidential or privileged information. If you are 
> not the intended recipient, any dissemination, use, 
> review, distribution, printing or copying of the 
> information contained in this e-mail message 
> and/or attachments to it are strictly prohibited. If 
> you have received this communication in error, 
> please notify us by reply e-mail or telephone and 
> immediately and permanently delete the message 
> and any attachments. Thank you
> 

-- 
Peter Fales
Alcatel-Lucent
Member of Technical Staff
1960 Lucent Lane
Room: 9H-505
Naperville, IL 60566-7033
Email: Peter.Fales@alcatel-lucent.com
Phone: 630 979 8031


=====-----=====-----=====
Notice: The information contained in this e-mail
message and/or attachments to it may contain 
confidential or privileged information. If you are 
not the intended recipient, any dissemination, use, 
review, distribution, printing or copying of the 
information contained in this e-mail message 
and/or attachments to it are strictly prohibited. If 
you have received this communication in error, 
please notify us by reply e-mail or telephone and 
immediately and permanently delete the message 
and any attachments. Thank you



Re: Cassandra nodes on EC2 in two different regions not communicating

Posted by Peter Fales <Pe...@alcatel-lucent.com>.
Are you sure you actually re-built Cassandra after making those source
code changes?   I believe "Cannot assign requested address" is the error you
get with the official Cassandra because the external IP address is 
not the actual address of an adapter.   The patches change the code
so that it listens on all interfaces (so it should not actually be
requesting a specific address)

On Mon, Feb 28, 2011 at 06:23:53AM -0600, Himanshi Sharma wrote:
> Hi Peter,
> 
> I made changes as per ur patch. Still its nt working. Using external ip in 
> Listen addr gives this exception.
> 
> ERROR 11:47:14,092 Exception encountered during startup.
> java.net.BindException: Cannot assign requested address
>         at sun.nio.ch.Net.bind(Native Method)
>         at 
> sun.nio.ch.ServerSocketChannelImpl.bind(ServerSocketChannelImpl.java:137)
>         at 
> sun.nio.ch.ServerSocketAdaptor.bind(ServerSocketAdaptor.java:77)
>         at 
> sun.nio.ch.ServerSocketAdaptor.bind(ServerSocketAdaptor.java:70)
>         at 
> org.apache.cassandra.net.MessagingService.listen(MessagingService.java:138)
>         at 
> org.apache.cassandra.service.StorageService.initServer(StorageService.java:319)
>         at 
> org.apache.cassandra.thrift.CassandraDaemon.setup(CassandraDaemon.java:99)
>         at 
> org.apache.cassandra.thrift.CassandraDaemon.main(CassandraDaemon.java:177)
> Exception encountered during startup.
> java.net.BindException: Cannot assign requested address
>         at sun.nio.ch.Net.bind(Native Method)
>         at 
> sun.nio.ch.ServerSocketChannelImpl.bind(ServerSocketChannelImpl.java:137)
>         at 
> sun.nio.ch.ServerSocketAdaptor.bind(ServerSocketAdaptor.java:77)
>         at 
> sun.nio.ch.ServerSocketAdaptor.bind(ServerSocketAdaptor.java:70)
>         at 
> org.apache.cassandra.net.MessagingService.listen(MessagingService.java:138)
>         at 
> org.apache.cassandra.service.StorageService.initServer(StorageService.java:319)
>         at 
> org.apache.cassandra.thrift.CassandraDaemon.setup(CassandraDaemon.java:99)
>         at 
> org.apache.cassandra.thrift.CassandraDaemon.main(CassandraDaemon.java:177)
> 
> So i kept them blank. Cassandra runs. Bt still not showing nodes of other 
> regions in nodetool cmd, whereas i am able to ping and telnet.
> 
> Thanks,
> Himanshi Sharma
> 
> 
> 
> 
> From:
> Peter Fales <Pe...@alcatel-lucent.com>
> To:
> "dev@cassandra.apache.org" <de...@cassandra.apache.org>
> Date:
> 02/24/2011 06:44 PM
> Subject:
> Re: Cassandra nodes on EC2 in two different regions not communicating
> 
> 
> 
> I sent a note mentioning this yesterday and referring to my post from
> last September. See:
> http://www.mail-archive.com/user@cassandra.apache.org/msg05692.html
> 
> On Thu, Feb 24, 2011 at 07:04:03AM -0600, Himanshi Sharma wrote:
> > Peter,
> > 
> > Please tell me the options. I m new to cassandra and definitely want to 
> > try out.
> > 
> > Thanks,
> > Himanshi
> > 
> > 
> > 
> > 
> > From:
> > Peter Fales <Pe...@alcatel-lucent.com>
> > To:
> > "dev@cassandra.apache.org" <de...@cassandra.apache.org>
> > Date:
> > 02/24/2011 06:30 PM
> > Subject:
> > Re: Cassandra nodes on EC2 in two different regions not communicating
> > 
> > 
> > 
> > It's pretty easy to do if you're willing/able to make some small changes
> > to the Cassandra code.   Is that an option?
> > 
> > On Thu, Feb 24, 2011 at 06:52:24AM -0600, Himanshi Sharma wrote:
> > > Hi All,
> > > 
> > > I am trying to configure a cassandra cluster of 2 nodes in different 
> > > regions of amazon ec2. 
> > > 
> > > Nodes are running fine but when i try nodetool command with ring 
> option 
> > i 
> > > get single node.
> > > 
> > > And  both the nodes are able to ping each other, telnet each other. 
> Not 
> > > able to figure out what is the problem.
> > > 
> > > Plz help
> > > 
> > > Thanks,
> > > Himanshi Sharma
> > > 
> > > =====-----=====-----=====
> > > Notice: The information contained in this e-mail
> > > message and/or attachments to it may contain 
> > > confidential or privileged information. If you are 
> > > not the intended recipient, any dissemination, use, 
> > > review, distribution, printing or copying of the 
> > > information contained in this e-mail message 
> > > and/or attachments to it are strictly prohibited. If 
> > > you have received this communication in error, 
> > > please notify us by reply e-mail or telephone and 
> > > immediately and permanently delete the message 
> > > and any attachments. Thank you
> > > 
> > 
> > -- 
> > Peter Fales
> > Alcatel-Lucent
> > Member of Technical Staff
> > 1960 Lucent Lane
> > Room: 9H-505
> > Naperville, IL 60566-7033
> > Email: Peter.Fales@alcatel-lucent.com
> > Phone: 630 979 8031
> > 
> > 
> > =====-----=====-----=====
> > Notice: The information contained in this e-mail
> > message and/or attachments to it may contain 
> > confidential or privileged information. If you are 
> > not the intended recipient, any dissemination, use, 
> > review, distribution, printing or copying of the 
> > information contained in this e-mail message 
> > and/or attachments to it are strictly prohibited. If 
> > you have received this communication in error, 
> > please notify us by reply e-mail or telephone and 
> > immediately and permanently delete the message 
> > and any attachments. Thank you
> > 
> 
> -- 
> Peter Fales
> Alcatel-Lucent
> Member of Technical Staff
> 1960 Lucent Lane
> Room: 9H-505
> Naperville, IL 60566-7033
> Email: Peter.Fales@alcatel-lucent.com
> Phone: 630 979 8031
> 
> 
> =====-----=====-----=====
> Notice: The information contained in this e-mail
> message and/or attachments to it may contain 
> confidential or privileged information. If you are 
> not the intended recipient, any dissemination, use, 
> review, distribution, printing or copying of the 
> information contained in this e-mail message 
> and/or attachments to it are strictly prohibited. If 
> you have received this communication in error, 
> please notify us by reply e-mail or telephone and 
> immediately and permanently delete the message 
> and any attachments. Thank you
> 

-- 
Peter Fales
Alcatel-Lucent
Member of Technical Staff
1960 Lucent Lane
Room: 9H-505
Naperville, IL 60566-7033
Email: Peter.Fales@alcatel-lucent.com
Phone: 630 979 8031

Re: Cassandra nodes on EC2 in two different regions not communicating

Posted by Himanshi Sharma <hi...@tcs.com>.
Peter,

Ya i saw but m nt sure how to run this patch, where to run.

Thanks, 
Himanshi Sharma




From:
Peter Fales <Pe...@alcatel-lucent.com>
To:
"dev@cassandra.apache.org" <de...@cassandra.apache.org>
Date:
02/24/2011 06:44 PM
Subject:
Re: Cassandra nodes on EC2 in two different regions not communicating



I sent a note mentioning this yesterday and referring to my post from
last September. See:
http://www.mail-archive.com/user@cassandra.apache.org/msg05692.html

On Thu, Feb 24, 2011 at 07:04:03AM -0600, Himanshi Sharma wrote:
> Peter,
> 
> Please tell me the options. I m new to cassandra and definitely want to 
> try out.
> 
> Thanks,
> Himanshi
> 
> 
> 
> 
> From:
> Peter Fales <Pe...@alcatel-lucent.com>
> To:
> "dev@cassandra.apache.org" <de...@cassandra.apache.org>
> Date:
> 02/24/2011 06:30 PM
> Subject:
> Re: Cassandra nodes on EC2 in two different regions not communicating
> 
> 
> 
> It's pretty easy to do if you're willing/able to make some small changes
> to the Cassandra code.   Is that an option?
> 
> On Thu, Feb 24, 2011 at 06:52:24AM -0600, Himanshi Sharma wrote:
> > Hi All,
> > 
> > I am trying to configure a cassandra cluster of 2 nodes in different 
> > regions of amazon ec2. 
> > 
> > Nodes are running fine but when i try nodetool command with ring 
option 
> i 
> > get single node.
> > 
> > And  both the nodes are able to ping each other, telnet each other. 
Not 
> > able to figure out what is the problem.
> > 
> > Plz help
> > 
> > Thanks,
> > Himanshi Sharma
> > 
> > =====-----=====-----=====
> > Notice: The information contained in this e-mail
> > message and/or attachments to it may contain 
> > confidential or privileged information. If you are 
> > not the intended recipient, any dissemination, use, 
> > review, distribution, printing or copying of the 
> > information contained in this e-mail message 
> > and/or attachments to it are strictly prohibited. If 
> > you have received this communication in error, 
> > please notify us by reply e-mail or telephone and 
> > immediately and permanently delete the message 
> > and any attachments. Thank you
> > 
> 
> -- 
> Peter Fales
> Alcatel-Lucent
> Member of Technical Staff
> 1960 Lucent Lane
> Room: 9H-505
> Naperville, IL 60566-7033
> Email: Peter.Fales@alcatel-lucent.com
> Phone: 630 979 8031
> 
> 
> =====-----=====-----=====
> Notice: The information contained in this e-mail
> message and/or attachments to it may contain 
> confidential or privileged information. If you are 
> not the intended recipient, any dissemination, use, 
> review, distribution, printing or copying of the 
> information contained in this e-mail message 
> and/or attachments to it are strictly prohibited. If 
> you have received this communication in error, 
> please notify us by reply e-mail or telephone and 
> immediately and permanently delete the message 
> and any attachments. Thank you
> 

-- 
Peter Fales
Alcatel-Lucent
Member of Technical Staff
1960 Lucent Lane
Room: 9H-505
Naperville, IL 60566-7033
Email: Peter.Fales@alcatel-lucent.com
Phone: 630 979 8031


=====-----=====-----=====
Notice: The information contained in this e-mail
message and/or attachments to it may contain 
confidential or privileged information. If you are 
not the intended recipient, any dissemination, use, 
review, distribution, printing or copying of the 
information contained in this e-mail message 
and/or attachments to it are strictly prohibited. If 
you have received this communication in error, 
please notify us by reply e-mail or telephone and 
immediately and permanently delete the message 
and any attachments. Thank you



Re: Cassandra nodes on EC2 in two different regions not communicating

Posted by Himanshi Sharma <hi...@tcs.com>.
Hi Peter,

I made changes as per ur patch. Still its nt working. Using external ip in 
Listen addr gives this exception.

ERROR 11:47:14,092 Exception encountered during startup.
java.net.BindException: Cannot assign requested address
        at sun.nio.ch.Net.bind(Native Method)
        at 
sun.nio.ch.ServerSocketChannelImpl.bind(ServerSocketChannelImpl.java:137)
        at 
sun.nio.ch.ServerSocketAdaptor.bind(ServerSocketAdaptor.java:77)
        at 
sun.nio.ch.ServerSocketAdaptor.bind(ServerSocketAdaptor.java:70)
        at 
org.apache.cassandra.net.MessagingService.listen(MessagingService.java:138)
        at 
org.apache.cassandra.service.StorageService.initServer(StorageService.java:319)
        at 
org.apache.cassandra.thrift.CassandraDaemon.setup(CassandraDaemon.java:99)
        at 
org.apache.cassandra.thrift.CassandraDaemon.main(CassandraDaemon.java:177)
Exception encountered during startup.
java.net.BindException: Cannot assign requested address
        at sun.nio.ch.Net.bind(Native Method)
        at 
sun.nio.ch.ServerSocketChannelImpl.bind(ServerSocketChannelImpl.java:137)
        at 
sun.nio.ch.ServerSocketAdaptor.bind(ServerSocketAdaptor.java:77)
        at 
sun.nio.ch.ServerSocketAdaptor.bind(ServerSocketAdaptor.java:70)
        at 
org.apache.cassandra.net.MessagingService.listen(MessagingService.java:138)
        at 
org.apache.cassandra.service.StorageService.initServer(StorageService.java:319)
        at 
org.apache.cassandra.thrift.CassandraDaemon.setup(CassandraDaemon.java:99)
        at 
org.apache.cassandra.thrift.CassandraDaemon.main(CassandraDaemon.java:177)

So i kept them blank. Cassandra runs. Bt still not showing nodes of other 
regions in nodetool cmd, whereas i am able to ping and telnet.

Thanks,
Himanshi Sharma




From:
Peter Fales <Pe...@alcatel-lucent.com>
To:
"dev@cassandra.apache.org" <de...@cassandra.apache.org>
Date:
02/24/2011 06:44 PM
Subject:
Re: Cassandra nodes on EC2 in two different regions not communicating



I sent a note mentioning this yesterday and referring to my post from
last September. See:
http://www.mail-archive.com/user@cassandra.apache.org/msg05692.html

On Thu, Feb 24, 2011 at 07:04:03AM -0600, Himanshi Sharma wrote:
> Peter,
> 
> Please tell me the options. I m new to cassandra and definitely want to 
> try out.
> 
> Thanks,
> Himanshi
> 
> 
> 
> 
> From:
> Peter Fales <Pe...@alcatel-lucent.com>
> To:
> "dev@cassandra.apache.org" <de...@cassandra.apache.org>
> Date:
> 02/24/2011 06:30 PM
> Subject:
> Re: Cassandra nodes on EC2 in two different regions not communicating
> 
> 
> 
> It's pretty easy to do if you're willing/able to make some small changes
> to the Cassandra code.   Is that an option?
> 
> On Thu, Feb 24, 2011 at 06:52:24AM -0600, Himanshi Sharma wrote:
> > Hi All,
> > 
> > I am trying to configure a cassandra cluster of 2 nodes in different 
> > regions of amazon ec2. 
> > 
> > Nodes are running fine but when i try nodetool command with ring 
option 
> i 
> > get single node.
> > 
> > And  both the nodes are able to ping each other, telnet each other. 
Not 
> > able to figure out what is the problem.
> > 
> > Plz help
> > 
> > Thanks,
> > Himanshi Sharma
> > 
> > =====-----=====-----=====
> > Notice: The information contained in this e-mail
> > message and/or attachments to it may contain 
> > confidential or privileged information. If you are 
> > not the intended recipient, any dissemination, use, 
> > review, distribution, printing or copying of the 
> > information contained in this e-mail message 
> > and/or attachments to it are strictly prohibited. If 
> > you have received this communication in error, 
> > please notify us by reply e-mail or telephone and 
> > immediately and permanently delete the message 
> > and any attachments. Thank you
> > 
> 
> -- 
> Peter Fales
> Alcatel-Lucent
> Member of Technical Staff
> 1960 Lucent Lane
> Room: 9H-505
> Naperville, IL 60566-7033
> Email: Peter.Fales@alcatel-lucent.com
> Phone: 630 979 8031
> 
> 
> =====-----=====-----=====
> Notice: The information contained in this e-mail
> message and/or attachments to it may contain 
> confidential or privileged information. If you are 
> not the intended recipient, any dissemination, use, 
> review, distribution, printing or copying of the 
> information contained in this e-mail message 
> and/or attachments to it are strictly prohibited. If 
> you have received this communication in error, 
> please notify us by reply e-mail or telephone and 
> immediately and permanently delete the message 
> and any attachments. Thank you
> 

-- 
Peter Fales
Alcatel-Lucent
Member of Technical Staff
1960 Lucent Lane
Room: 9H-505
Naperville, IL 60566-7033
Email: Peter.Fales@alcatel-lucent.com
Phone: 630 979 8031


=====-----=====-----=====
Notice: The information contained in this e-mail
message and/or attachments to it may contain 
confidential or privileged information. If you are 
not the intended recipient, any dissemination, use, 
review, distribution, printing or copying of the 
information contained in this e-mail message 
and/or attachments to it are strictly prohibited. If 
you have received this communication in error, 
please notify us by reply e-mail or telephone and 
immediately and permanently delete the message 
and any attachments. Thank you



Re: Cassandra nodes on EC2 in two different regions not communicating

Posted by Peter Fales <Pe...@alcatel-lucent.com>.
I sent a note mentioning this yesterday and referring to my post from
last September. See:
http://www.mail-archive.com/user@cassandra.apache.org/msg05692.html

On Thu, Feb 24, 2011 at 07:04:03AM -0600, Himanshi Sharma wrote:
> Peter,
> 
> Please tell me the options. I m new to cassandra and definitely want to 
> try out.
> 
> Thanks,
> Himanshi
> 
> 
> 
> 
> From:
> Peter Fales <Pe...@alcatel-lucent.com>
> To:
> "dev@cassandra.apache.org" <de...@cassandra.apache.org>
> Date:
> 02/24/2011 06:30 PM
> Subject:
> Re: Cassandra nodes on EC2 in two different regions not communicating
> 
> 
> 
> It's pretty easy to do if you're willing/able to make some small changes
> to the Cassandra code.   Is that an option?
> 
> On Thu, Feb 24, 2011 at 06:52:24AM -0600, Himanshi Sharma wrote:
> > Hi All,
> > 
> > I am trying to configure a cassandra cluster of 2 nodes in different 
> > regions of amazon ec2. 
> > 
> > Nodes are running fine but when i try nodetool command with ring option 
> i 
> > get single node.
> > 
> > And  both the nodes are able to ping each other, telnet each other. Not 
> > able to figure out what is the problem.
> > 
> > Plz help
> > 
> > Thanks,
> > Himanshi Sharma
> > 
> > =====-----=====-----=====
> > Notice: The information contained in this e-mail
> > message and/or attachments to it may contain 
> > confidential or privileged information. If you are 
> > not the intended recipient, any dissemination, use, 
> > review, distribution, printing or copying of the 
> > information contained in this e-mail message 
> > and/or attachments to it are strictly prohibited. If 
> > you have received this communication in error, 
> > please notify us by reply e-mail or telephone and 
> > immediately and permanently delete the message 
> > and any attachments. Thank you
> > 
> 
> -- 
> Peter Fales
> Alcatel-Lucent
> Member of Technical Staff
> 1960 Lucent Lane
> Room: 9H-505
> Naperville, IL 60566-7033
> Email: Peter.Fales@alcatel-lucent.com
> Phone: 630 979 8031
> 
> 
> =====-----=====-----=====
> Notice: The information contained in this e-mail
> message and/or attachments to it may contain 
> confidential or privileged information. If you are 
> not the intended recipient, any dissemination, use, 
> review, distribution, printing or copying of the 
> information contained in this e-mail message 
> and/or attachments to it are strictly prohibited. If 
> you have received this communication in error, 
> please notify us by reply e-mail or telephone and 
> immediately and permanently delete the message 
> and any attachments. Thank you
> 

-- 
Peter Fales
Alcatel-Lucent
Member of Technical Staff
1960 Lucent Lane
Room: 9H-505
Naperville, IL 60566-7033
Email: Peter.Fales@alcatel-lucent.com
Phone: 630 979 8031

Re: Cassandra nodes on EC2 in two different regions not communicating

Posted by Himanshi Sharma <hi...@tcs.com>.
Peter,

Please tell me the options. I m new to cassandra and definitely want to 
try out.

Thanks,
Himanshi




From:
Peter Fales <Pe...@alcatel-lucent.com>
To:
"dev@cassandra.apache.org" <de...@cassandra.apache.org>
Date:
02/24/2011 06:30 PM
Subject:
Re: Cassandra nodes on EC2 in two different regions not communicating



It's pretty easy to do if you're willing/able to make some small changes
to the Cassandra code.   Is that an option?

On Thu, Feb 24, 2011 at 06:52:24AM -0600, Himanshi Sharma wrote:
> Hi All,
> 
> I am trying to configure a cassandra cluster of 2 nodes in different 
> regions of amazon ec2. 
> 
> Nodes are running fine but when i try nodetool command with ring option 
i 
> get single node.
> 
> And  both the nodes are able to ping each other, telnet each other. Not 
> able to figure out what is the problem.
> 
> Plz help
> 
> Thanks,
> Himanshi Sharma
> 
> =====-----=====-----=====
> Notice: The information contained in this e-mail
> message and/or attachments to it may contain 
> confidential or privileged information. If you are 
> not the intended recipient, any dissemination, use, 
> review, distribution, printing or copying of the 
> information contained in this e-mail message 
> and/or attachments to it are strictly prohibited. If 
> you have received this communication in error, 
> please notify us by reply e-mail or telephone and 
> immediately and permanently delete the message 
> and any attachments. Thank you
> 

-- 
Peter Fales
Alcatel-Lucent
Member of Technical Staff
1960 Lucent Lane
Room: 9H-505
Naperville, IL 60566-7033
Email: Peter.Fales@alcatel-lucent.com
Phone: 630 979 8031


=====-----=====-----=====
Notice: The information contained in this e-mail
message and/or attachments to it may contain 
confidential or privileged information. If you are 
not the intended recipient, any dissemination, use, 
review, distribution, printing or copying of the 
information contained in this e-mail message 
and/or attachments to it are strictly prohibited. If 
you have received this communication in error, 
please notify us by reply e-mail or telephone and 
immediately and permanently delete the message 
and any attachments. Thank you



Re: Cassandra nodes on EC2 in two different regions not communicating

Posted by Peter Fales <Pe...@alcatel-lucent.com>.
It's pretty easy to do if you're willing/able to make some small changes
to the Cassandra code.   Is that an option?

On Thu, Feb 24, 2011 at 06:52:24AM -0600, Himanshi Sharma wrote:
> Hi All,
> 
> I am trying to configure a cassandra cluster of 2 nodes in different 
> regions of amazon ec2. 
> 
> Nodes are running fine but when i try nodetool command with ring option i 
> get single node.
> 
> And  both the nodes are able to ping each other, telnet each other. Not 
> able to figure out what is the problem.
> 
> Plz help
> 
> Thanks,
> Himanshi Sharma
> 
> =====-----=====-----=====
> Notice: The information contained in this e-mail
> message and/or attachments to it may contain 
> confidential or privileged information. If you are 
> not the intended recipient, any dissemination, use, 
> review, distribution, printing or copying of the 
> information contained in this e-mail message 
> and/or attachments to it are strictly prohibited. If 
> you have received this communication in error, 
> please notify us by reply e-mail or telephone and 
> immediately and permanently delete the message 
> and any attachments. Thank you
> 

-- 
Peter Fales
Alcatel-Lucent
Member of Technical Staff
1960 Lucent Lane
Room: 9H-505
Naperville, IL 60566-7033
Email: Peter.Fales@alcatel-lucent.com
Phone: 630 979 8031

Re: Cassandra nodes on EC2 in two different regions not communicating

Posted by Frank LoVecchio <fr...@isidorey.com>.
Not sure if there is a particular reason for you using different regions,
but Amazon states that each zone is a different physical location completely
separate from others, e.g. us-east-1a and us-east-1b.  Using the Amazon
internal IPs (10.x. etc) reduces latency greatly by not going outbound
through DNS (though us-east-1c is twice as latent), you have an RF 4
possible (in different physical locations!), and most importantly.... sh*t
just works.

Maybe this won't help you, but it may be useful for others :)

On Thu, Feb 24, 2011 at 10:53 AM, Dave Viner <da...@gmail.com> wrote:

> Another possibility is this:
>
> why not setup 2 nodes in 1 region in 1 az, and get that to work.
> Then, open a third node in the same region, but different AZ, and get that
> to work.
> Then, once you have that working, open a fourth node in a different region
> and get that to work.
>
> Seems like taking a piece-meal approach would be beneficial here.
>
> Dave Viner
>
>
> On Thu, Feb 24, 2011 at 6:11 AM, Daniel van Ham Colchete <
> daniel.colchete@gmail.com> wrote:
>
>> Himanshi,
>>
>> my bad, try this for iptables:
>>
>> # SNAT outgoing connections
>> iptables -t nat -A POSTROUTING -p tcp --dport 7000 -d 175.41.143.192 -j
>> SNAT --to-source INTERNALIP
>>
>> As for tcpdump the argument for the -i option is the interface name (eth0,
>> cassth0, etc...), and not the IP. So, it should be
>> tcpdump -i cassth0 -n port 7000
>> or
>> tcpdump -i eth0 -n port 7000
>>
>> I`m assuming your main network card is eth0, but that should be the case.
>>
>> Does it work?
>>
>> Best,
>> Daniel
>>
>>
>> On Thu, Feb 24, 2011 at 9:27 AM, Himanshi Sharma <himanshi.sharma@tcs.com
>> > wrote:
>>
>>>
>>> Thanks Daniel.
>>>
>>> But SNAT command is not working and when i try tcpdump it gives
>>>
>>> [root@ip-10-136-75-201 ~]# tcpdump -i 50.18.60.117 -n port 7000
>>> tcpdump: Invalid adapter index
>>>
>>> Not able to figure out wats this ??
>>>
>>> Thanks,
>>> Himanshi
>>>
>>>
>>>
>>>  From: Daniel van Ham Colchete <da...@gmail.com> To:
>>> user@cassandra.apache.org Date: 02/24/2011 04:27 PM Subject: Re:
>>> Cassandra nodes on EC2 in two different regions not communicating
>>> ------------------------------
>>>
>>>
>>>
>>> Himanshi,
>>>
>>> you could try adding your public IP address to an internal interface and
>>> DNAT the packets to it. This shouldn't give you any problems with your
>>> normal traffic. Tell Cassandra on listen on the public IPs and it should
>>> work.
>>>
>>> Linux commands would be:
>>>
>>> # Create an internal interface using bridge-utils
>>> brctl addbr cassth0
>>>
>>> # add the ip
>>> ip addr add dev cassth0 *50.18.60.117/32* <http://50.18.60.117/32>
>>>
>>> # DNAT incoming connections
>>> iptables -t nat -A PREROUTING -p tcp --dport 7000 -d INTERNALIP -j DNAT
>>> --to-destination 50.18.60.117
>>>
>>> # SNAT outgoing connections
>>> iptables -t nat -A OUTPUT -p tcp --dport 7000 -d 175.41.143.192 -j SNAT
>>> --to-source INTERNALIP
>>>
>>> This should work since Amazon you re-SNAT your outgoing packets to your
>>> public IP again, so the other cassandra instance will see your public IP as
>>> your source address.
>>>
>>> I didn't test this setup here but it should work unless I forgot some
>>> small detail. If you need to troubleshoot use the command "tcpdump -i
>>> INTERFACE -n port 7000" where INTERFACE should be your public interface or
>>> your cassth0.
>>>
>>> Please let me know if it worked.
>>>
>>> Best regards,
>>> Daniel Colchete
>>>
>>> On Thu, Feb 24, 2011 at 4:04 AM, Himanshi Sharma <*
>>> himanshi.sharma@tcs.com* <hi...@tcs.com>> wrote:
>>> giving private ip to rpc address gives the same exception
>>> and the keeping it blank and providing public to listen also fails. I
>>> tried keeping both blank and did telnet on 7000 so i get following o/p
>>>
>>> [root@ip-10-166-223-150 bin]# telnet 122.248.193.37 7000
>>> Trying 122.248.193.37...
>>> Connected to 122.248.193.37.
>>> Escape character is '^]'.
>>>
>>> Similarly from another achine
>>>
>>> [root@ip-10-136-75-201 bin]# telnet 184.72.22.87 7000
>>> Trying 184.72.22.87...
>>> Connected to 184.72.22.87.
>>> Escape character is '^]'.
>>>
>>>
>>>
>>> -----Dave Viner wrote: -----
>>> To: *user@cassandra.apache.org* <us...@cassandra.apache.org>
>>> From: Dave Viner <*daveviner@gmail.com* <da...@gmail.com>>
>>> Date: 02/24/2011 11:59AM
>>> cc: Himanshi Sharma <*himanshi.sharma@tcs.com* <hi...@tcs.com>
>>> >
>>>
>>> Subject: Re: Cassandra nodes on EC2 in two different regions not
>>> communicating
>>>
>>> Try using the private ipv4 address in the rpc_address field, and the
>>> public ipv4 (NOT the elastic ip) in the listen_address.
>>>
>>> If that fails, go back to rpc_address empty, and start up cassandra.
>>>
>>> Then from the other node, please telnet to port 7000 on the first node.
>>>  And show the output of that session in your reply.
>>>
>>> I haven't actually constructed a cross-region cluster nor have I used
>>> v0.7, but this really sounds like it should be easy.
>>>
>>> On Wed, Feb 23, 2011 at 10:22 PM, Himanshi Sharma < *himanshi.sharma@tcs.com
>>> * <hi...@tcs.com>> wrote:
>>> Hi Dave,
>>>
>>> I tried with the public ips. If i mention the public ip in rpc address
>>> field, Cassandra gives the same exception but if leave it blank then
>>> Cassandra runs but again in the nodetool command with ring option it does'nt
>>> show the node in another region.
>>>
>>> Thanks,
>>> Himanshi
>>>
>>>
>>> -----Dave Viner wrote: -----
>>> To: *user@cassandra.apache.org * <us...@cassandra.apache.org>
>>> From: Dave Viner < *daveviner@gmail.com * <da...@gmail.com>>
>>> Date: 02/24/2011 10:43AM
>>>
>>> Subject: Re: Cassandra nodes on EC2 in two different regions not
>>> communicating
>>>
>>> That looks like it's not an issue of communicating between nodes.  It
>>> appears that the node can not bind to the address on the localhost that
>>> you're asking for.
>>>
>>> " java.net.BindException: Cannot assign requested address  "
>>>
>>> I think the issue is that the Elastic IP address is not actually an IP
>>> address that's on the localhost.  So the daemon can not bind to that IP.
>>>  Instead of using the EIP, use the local IP address for the rpc_address (i
>>> think that's what you need since that is what Thrift will bind to).  Then
>>> for the listen_address should be the ip address that is routable from the
>>> other node.  I would first try with the actual public IP address (not the
>>> Elastic IP).  Once you get that to work, then shutdown the cluster, change
>>> the listen_address to the EIP, boot up and try again.
>>>
>>> Dave Viner
>>>
>>>
>>> On Wed, Feb 23, 2011 at 8:54 PM, Himanshi Sharma < *himanshi.sharma@tcs.com
>>> * <hi...@tcs.com>> wrote:
>>>
>>> Hey Dave,
>>>
>>> Sorry i forgot to mention the Non-seed configuration.
>>>
>>> for first node in us-west its as below....i.e its own elastic ip
>>>
>>> listen_address: 50.18.60.117
>>> rpc_address: 50.18.60.117
>>>
>>> and for second node in ap-southeast-1 its as below....i.e again its own
>>> elastic ip
>>>
>>> listen_address: 175.41.143.192
>>> rpc_address: 175.41.143.192
>>>
>>> Thanks,
>>> Himanshi
>>>
>>>
>>>
>>>
>>>   From: Dave Viner < *daveviner@gmail.com * <da...@gmail.com>>  To:
>>> *user@cassandra.apache.org * <us...@cassandra.apache.org> Date: 02/23/2011
>>> 11:01 PM  Subject: Re: Cassandra nodes on EC2 in two different regions
>>> not communicating
>>>
>>>  ------------------------------
>>>
>>>
>>>
>>> internal EC2 ips (10.xxx.xxx.xxx) work across availability zones (e.g.,
>>> from us-east-1a to us-east-1b) but do not work across regions (e.g., us-east
>>> to us-west).  To do regions, you must use the public ip address assigned by
>>> amazon.
>>>
>>> Himanshi, when you log into 1 node, and telnet to port 7000 on the other
>>> node, which IP address did you use - the 10.x address or the public ip
>>> address?
>>> And what is the seed/non-seed configuration in both cassandra.yaml files?
>>>
>>>
>>> Dave Viner
>>>
>>>
>>> On Wed, Feb 23, 2011 at 8:12 AM, Frank LoVecchio < *frank@isidorey.com *<fr...@isidorey.com>>
>>> wrote:
>>> The internal Amazon IP address is what you will want to use so you don't
>>> have to go through DNS anyways; not sure if this works from US-East to
>>> US-West, but it does make things quicker in between zones, e.g. us-east-1a
>>> to us-east-1b.
>>>
>>>
>>> On Wed, Feb 23, 2011 at 9:09 AM, Dave Viner < *daveviner@gmail.com *<da...@gmail.com>>
>>> wrote:
>>> Try using the IP address, not the dns name in the cassandra.yaml.
>>>
>>> If you can telnet from one to the other on port 7000, and both nodes have
>>> the other node in their config, it should work.
>>>
>>> Dave Viner
>>>
>>>
>>> On Wed, Feb 23, 2011 at 1:43 AM, Himanshi Sharma < *himanshi.sharma@tcs.com
>>> * <hi...@tcs.com>> wrote:
>>>
>>> Ya they do. Have specified Public DNS in seed field of each node in
>>> Cassandra.yaml...nt able to figure out what the problem is ???
>>>
>>>
>>>   From: Sasha Dolgy < *sdolgy@gmail.com * <sd...@gmail.com>>  To: *user@cassandra.apache.org
>>> * <us...@cassandra.apache.org> Date: 02/23/2011 02:56 PM  Subject: Re:
>>> Cassandra nodes on EC2 in two different regions not communicating
>>>
>>>
>>>  ------------------------------
>>>
>>>
>>>
>>> did you define the other host in the cassandra.yaml ?  on both servers
>>> .... they need to know about each other
>>>
>>> On Wed, Feb 23, 2011 at 10:16 AM, Himanshi Sharma < *himanshi.sharma@tcs.com
>>> * <hi...@tcs.com>> wrote:
>>>
>>> Thanks Dave but I am able to telnet to other instances on port 7000
>>> and when i run  ./nodetool --host *ec2-50-18-60-117.us-west-1.compute.amazonaws.com
>>> * <http://ec2-50-18-60-117.us-west-1.compute.amazonaws.com/> ring... I
>>> can see only one node.
>>>
>>> Do we need to configure anything else in Cassandra.yaml or
>>> Cassandra-env.sh ???
>>>
>>>
>>>
>>>
>>>   From: Dave Viner < *daveviner@gmail.com * <da...@gmail.com>>  To:
>>> *user@cassandra.apache.org * <us...@cassandra.apache.org> Cc: Himanshi
>>> Sharma < *himanshi.sharma@tcs.com * <hi...@tcs.com>>  Date: 02/23/2011
>>> 11:36 AM  Subject: Re: Cassandra nodes on EC2 in two different regions
>>> not communicating
>>>
>>>
>>>
>>>  ------------------------------
>>>
>>>
>>>
>>> If you login to one of the nodes, can you telnet to port 7000 on the
>>> other node?
>>>
>>> If not, then almost certainly it's a firewall/Security Group issue.
>>>
>>> You can find out the security groups for any node by logging in, and then
>>> running:
>>>
>>> % curl " *http://169.254.169.254/latest/meta-data/security-groups *<http://169.254.169.254/latest/meta-data/security-groups>"
>>>
>>>
>>> Assuming that both nodes are in the same security group, ensure that the
>>> SG is configured to allow other members of the SG to communicate on port
>>> 7000 to each other.
>>>
>>> HTH,
>>> Dave Viner
>>>
>>>
>>> On Tue, Feb 22, 2011 at 8:59 PM, Himanshi Sharma < *himanshi.sharma@tcs.com
>>> * <hi...@tcs.com>> wrote:
>>>
>>> Hi,
>>>
>>> I am new to Cassandra. I m running Cassandra on EC2. I configured
>>> Cassandra cluster on two instances in different regions.
>>> But when I am trying the nodetool command with ring option, I am getting
>>> only single node.
>>>
>>> How to make these two nodes communicate with each other. I have already
>>> opened required ports. i.e 7000, 8080, 9160 in respective
>>> security groups. Plz help me with this.
>>>
>>> Regards,
>>> Himanshi Sharma
>>>
>>>
>>> =====-----=====-----=====
>>> Notice: The information contained in this e-mail
>>> message and/or attachments to it may contain
>>> confidential or privileged information. If you are
>>>
>>> not the intended recipient, any dissemination, use,
>>> review, distribution, printing or copying of the
>>> information contained in this e-mail message
>>> and/or attachments to it are strictly prohibited. If
>>> you have received this communication in error,
>>>
>>> please notify us by reply e-mail or telephone and
>>> immediately and permanently delete the message
>>> and any attachments. Thank you
>>>
>>>
>>>
>>>
>>> =====-----=====-----=====
>>>
>>>
>>> Notice: The information contained in this e-mail
>>> message and/or attachments to it may contain
>>> confidential or privileged information. If you are
>>> not the intended recipient, any dissemination, use,
>>> review, distribution, printing or copying of the
>>>
>>>
>>> information contained in this e-mail message
>>> and/or attachments to it are strictly prohibited. If
>>> you have received this communication in error,
>>> please notify us by reply e-mail or telephone and
>>> immediately and permanently delete the message
>>>
>>>
>>> and any attachments. Thank you
>>>
>>>
>>>
>>>
>>>
>>> --
>>> Sasha Dolgy *
>>> **sasha.dolgy@gmail.com * <sa...@gmail.com>
>>>
>>> =====-----=====-----=====
>>> Notice: The information contained in this e-mail
>>> message and/or attachments to it may contain
>>> confidential or privileged information. If you are
>>>
>>>
>>>
>>> not the intended recipient, any dissemination, use,
>>> review, distribution, printing or copying of the
>>> information contained in this e-mail message
>>> and/or attachments to it are strictly prohibited. If
>>> you have received this communication in error,
>>>
>>>
>>>
>>> please notify us by reply e-mail or telephone and
>>> immediately and permanently delete the message
>>> and any attachments. Thank you
>>>
>>>
>>>
>>>
>>>
>>>
>>> --
>>> Frank LoVecchio
>>> Senior Software Engineer | Isidorey, LLC
>>> Google Voice +1.720.295.9179 *
>>> **isidorey.com * <http://isidorey.com/>| *facebook.com/franklovecchio *<http://facebook.com/franklovecchio>|
>>> *franklovecchio.com * <http://franklovecchio.com/>
>>>
>>>
>>>
>>> =====-----=====-----=====
>>>
>>> Notice: The information contained in this e-mail
>>>
>>> message and/or attachments to it may contain
>>>
>>> confidential or privileged information. If you are
>>>
>>>
>>> not the intended recipient, any dissemination, use,
>>>
>>> review, distribution, printing or copying of the
>>>
>>> information contained in this e-mail message
>>>
>>> and/or attachments to it are strictly prohibited. If
>>>
>>> you have received this communication in error,
>>>
>>>
>>> please notify us by reply e-mail or telephone and
>>>
>>> immediately and permanently delete the message
>>>
>>> and any attachments. Thank you
>>>
>>>
>>>
>>>
>>> =====-----=====-----=====
>>>
>>> Notice: The information contained in this e-mail
>>>
>>> message and/or attachments to it may contain
>>>
>>> confidential or privileged information. If you are
>>>
>>>
>>> not the intended recipient, any dissemination, use,
>>>
>>> review, distribution, printing or copying of the
>>>
>>> information contained in this e-mail message
>>>
>>> and/or attachments to it are strictly prohibited. If
>>>
>>> you have received this communication in error,
>>>
>>>
>>> please notify us by reply e-mail or telephone and
>>>
>>> immediately and permanently delete the message
>>>
>>> and any attachments. Thank you
>>>
>>>
>>>
>>>
>>> =====-----=====-----=====
>>>
>>> Notice: The information contained in this e-mail
>>> message and/or attachments to it may contain
>>> confidential or privileged information. If you are
>>>
>>>
>>> not the intended recipient, any dissemination, use,
>>> review, distribution, printing or copying of the
>>> information contained in this e-mail message
>>> and/or attachments to it are strictly prohibited. If
>>> you have received this communication in error,
>>>
>>>
>>> please notify us by reply e-mail or telephone and
>>> immediately and permanently delete the message
>>> and any attachments. Thank you
>>>
>>>
>>>
>>>
>>> =====-----=====-----=====
>>>
>>> Notice: The information contained in this e-mail
>>> message and/or attachments to it may contain
>>> confidential or privileged information. If you are
>>>
>>>
>>>
>>> not the intended recipient, any dissemination, use,
>>> review, distribution, printing or copying of the
>>> information contained in this e-mail message
>>> and/or attachments to it are strictly prohibited. If
>>> you have received this communication in error,
>>>
>>>
>>>
>>> please notify us by reply e-mail or telephone and
>>> immediately and permanently delete the message
>>> and any attachments. Thank you
>>>
>>>
>>>
>>
>


-- 
Frank LoVecchio
Senior Software Engineer | Isidorey, LLC
Google Voice +1.720.295.9179
isidorey.com | facebook.com/franklovecchio | franklovecchio.com

Re: Cassandra nodes on EC2 in two different regions not communicating

Posted by Dave Viner <da...@gmail.com>.
Another possibility is this:

why not setup 2 nodes in 1 region in 1 az, and get that to work.
Then, open a third node in the same region, but different AZ, and get that
to work.
Then, once you have that working, open a fourth node in a different region
and get that to work.

Seems like taking a piece-meal approach would be beneficial here.

Dave Viner


On Thu, Feb 24, 2011 at 6:11 AM, Daniel van Ham Colchete <
daniel.colchete@gmail.com> wrote:

> Himanshi,
>
> my bad, try this for iptables:
>
> # SNAT outgoing connections
> iptables -t nat -A POSTROUTING -p tcp --dport 7000 -d 175.41.143.192 -j
> SNAT --to-source INTERNALIP
>
> As for tcpdump the argument for the -i option is the interface name (eth0,
> cassth0, etc...), and not the IP. So, it should be
> tcpdump -i cassth0 -n port 7000
> or
> tcpdump -i eth0 -n port 7000
>
> I`m assuming your main network card is eth0, but that should be the case.
>
> Does it work?
>
> Best,
> Daniel
>
>
> On Thu, Feb 24, 2011 at 9:27 AM, Himanshi Sharma <hi...@tcs.com>wrote:
>
>>
>> Thanks Daniel.
>>
>> But SNAT command is not working and when i try tcpdump it gives
>>
>> [root@ip-10-136-75-201 ~]# tcpdump -i 50.18.60.117 -n port 7000
>> tcpdump: Invalid adapter index
>>
>> Not able to figure out wats this ??
>>
>> Thanks,
>> Himanshi
>>
>>
>>
>>  From: Daniel van Ham Colchete <da...@gmail.com> To:
>> user@cassandra.apache.org Date: 02/24/2011 04:27 PM Subject: Re:
>> Cassandra nodes on EC2 in two different regions not communicating
>> ------------------------------
>>
>>
>>
>> Himanshi,
>>
>> you could try adding your public IP address to an internal interface and
>> DNAT the packets to it. This shouldn't give you any problems with your
>> normal traffic. Tell Cassandra on listen on the public IPs and it should
>> work.
>>
>> Linux commands would be:
>>
>> # Create an internal interface using bridge-utils
>> brctl addbr cassth0
>>
>> # add the ip
>> ip addr add dev cassth0 *50.18.60.117/32* <http://50.18.60.117/32>
>>
>> # DNAT incoming connections
>> iptables -t nat -A PREROUTING -p tcp --dport 7000 -d INTERNALIP -j DNAT
>> --to-destination 50.18.60.117
>>
>> # SNAT outgoing connections
>> iptables -t nat -A OUTPUT -p tcp --dport 7000 -d 175.41.143.192 -j SNAT
>> --to-source INTERNALIP
>>
>> This should work since Amazon you re-SNAT your outgoing packets to your
>> public IP again, so the other cassandra instance will see your public IP as
>> your source address.
>>
>> I didn't test this setup here but it should work unless I forgot some
>> small detail. If you need to troubleshoot use the command "tcpdump -i
>> INTERFACE -n port 7000" where INTERFACE should be your public interface or
>> your cassth0.
>>
>> Please let me know if it worked.
>>
>> Best regards,
>> Daniel Colchete
>>
>> On Thu, Feb 24, 2011 at 4:04 AM, Himanshi Sharma <*
>> himanshi.sharma@tcs.com* <hi...@tcs.com>> wrote:
>> giving private ip to rpc address gives the same exception
>> and the keeping it blank and providing public to listen also fails. I
>> tried keeping both blank and did telnet on 7000 so i get following o/p
>>
>> [root@ip-10-166-223-150 bin]# telnet 122.248.193.37 7000
>> Trying 122.248.193.37...
>> Connected to 122.248.193.37.
>> Escape character is '^]'.
>>
>> Similarly from another achine
>>
>> [root@ip-10-136-75-201 bin]# telnet 184.72.22.87 7000
>> Trying 184.72.22.87...
>> Connected to 184.72.22.87.
>> Escape character is '^]'.
>>
>>
>>
>> -----Dave Viner wrote: -----
>> To: *user@cassandra.apache.org* <us...@cassandra.apache.org>
>> From: Dave Viner <*daveviner@gmail.com* <da...@gmail.com>>
>> Date: 02/24/2011 11:59AM
>> cc: Himanshi Sharma <*himanshi.sharma@tcs.com* <hi...@tcs.com>>
>>
>> Subject: Re: Cassandra nodes on EC2 in two different regions not
>> communicating
>>
>> Try using the private ipv4 address in the rpc_address field, and the
>> public ipv4 (NOT the elastic ip) in the listen_address.
>>
>> If that fails, go back to rpc_address empty, and start up cassandra.
>>
>> Then from the other node, please telnet to port 7000 on the first node.
>>  And show the output of that session in your reply.
>>
>> I haven't actually constructed a cross-region cluster nor have I used
>> v0.7, but this really sounds like it should be easy.
>>
>> On Wed, Feb 23, 2011 at 10:22 PM, Himanshi Sharma < *himanshi.sharma@tcs.com
>> * <hi...@tcs.com>> wrote:
>> Hi Dave,
>>
>> I tried with the public ips. If i mention the public ip in rpc address
>> field, Cassandra gives the same exception but if leave it blank then
>> Cassandra runs but again in the nodetool command with ring option it does'nt
>> show the node in another region.
>>
>> Thanks,
>> Himanshi
>>
>>
>> -----Dave Viner wrote: -----
>> To: *user@cassandra.apache.org * <us...@cassandra.apache.org>
>> From: Dave Viner < *daveviner@gmail.com * <da...@gmail.com>>
>> Date: 02/24/2011 10:43AM
>>
>> Subject: Re: Cassandra nodes on EC2 in two different regions not
>> communicating
>>
>> That looks like it's not an issue of communicating between nodes.  It
>> appears that the node can not bind to the address on the localhost that
>> you're asking for.
>>
>> " java.net.BindException: Cannot assign requested address  "
>>
>> I think the issue is that the Elastic IP address is not actually an IP
>> address that's on the localhost.  So the daemon can not bind to that IP.
>>  Instead of using the EIP, use the local IP address for the rpc_address (i
>> think that's what you need since that is what Thrift will bind to).  Then
>> for the listen_address should be the ip address that is routable from the
>> other node.  I would first try with the actual public IP address (not the
>> Elastic IP).  Once you get that to work, then shutdown the cluster, change
>> the listen_address to the EIP, boot up and try again.
>>
>> Dave Viner
>>
>>
>> On Wed, Feb 23, 2011 at 8:54 PM, Himanshi Sharma < *himanshi.sharma@tcs.com
>> * <hi...@tcs.com>> wrote:
>>
>> Hey Dave,
>>
>> Sorry i forgot to mention the Non-seed configuration.
>>
>> for first node in us-west its as below....i.e its own elastic ip
>>
>> listen_address: 50.18.60.117
>> rpc_address: 50.18.60.117
>>
>> and for second node in ap-southeast-1 its as below....i.e again its own
>> elastic ip
>>
>> listen_address: 175.41.143.192
>> rpc_address: 175.41.143.192
>>
>> Thanks,
>> Himanshi
>>
>>
>>
>>
>>   From: Dave Viner < *daveviner@gmail.com * <da...@gmail.com>>  To: *user@cassandra.apache.org
>> * <us...@cassandra.apache.org> Date: 02/23/2011 11:01 PM  Subject: Re:
>> Cassandra nodes on EC2 in two different regions not communicating
>>
>>  ------------------------------
>>
>>
>>
>> internal EC2 ips (10.xxx.xxx.xxx) work across availability zones (e.g.,
>> from us-east-1a to us-east-1b) but do not work across regions (e.g., us-east
>> to us-west).  To do regions, you must use the public ip address assigned by
>> amazon.
>>
>> Himanshi, when you log into 1 node, and telnet to port 7000 on the other
>> node, which IP address did you use - the 10.x address or the public ip
>> address?
>> And what is the seed/non-seed configuration in both cassandra.yaml files?
>>
>> Dave Viner
>>
>>
>> On Wed, Feb 23, 2011 at 8:12 AM, Frank LoVecchio < *frank@isidorey.com *<fr...@isidorey.com>>
>> wrote:
>> The internal Amazon IP address is what you will want to use so you don't
>> have to go through DNS anyways; not sure if this works from US-East to
>> US-West, but it does make things quicker in between zones, e.g. us-east-1a
>> to us-east-1b.
>>
>>
>> On Wed, Feb 23, 2011 at 9:09 AM, Dave Viner < *daveviner@gmail.com *<da...@gmail.com>>
>> wrote:
>> Try using the IP address, not the dns name in the cassandra.yaml.
>>
>> If you can telnet from one to the other on port 7000, and both nodes have
>> the other node in their config, it should work.
>>
>> Dave Viner
>>
>>
>> On Wed, Feb 23, 2011 at 1:43 AM, Himanshi Sharma < *himanshi.sharma@tcs.com
>> * <hi...@tcs.com>> wrote:
>>
>> Ya they do. Have specified Public DNS in seed field of each node in
>> Cassandra.yaml...nt able to figure out what the problem is ???
>>
>>
>>   From: Sasha Dolgy < *sdolgy@gmail.com * <sd...@gmail.com>>  To: *user@cassandra.apache.org
>> * <us...@cassandra.apache.org> Date: 02/23/2011 02:56 PM  Subject: Re:
>> Cassandra nodes on EC2 in two different regions not communicating
>>
>>
>>  ------------------------------
>>
>>
>>
>> did you define the other host in the cassandra.yaml ?  on both servers
>> .... they need to know about each other
>>
>> On Wed, Feb 23, 2011 at 10:16 AM, Himanshi Sharma < *himanshi.sharma@tcs.com
>> * <hi...@tcs.com>> wrote:
>>
>> Thanks Dave but I am able to telnet to other instances on port 7000
>> and when i run  ./nodetool --host *ec2-50-18-60-117.us-west-1.compute.amazonaws.com
>> * <http://ec2-50-18-60-117.us-west-1.compute.amazonaws.com/> ring... I
>> can see only one node.
>>
>> Do we need to configure anything else in Cassandra.yaml or
>> Cassandra-env.sh ???
>>
>>
>>
>>
>>   From: Dave Viner < *daveviner@gmail.com * <da...@gmail.com>>  To: *user@cassandra.apache.org
>> * <us...@cassandra.apache.org> Cc: Himanshi Sharma < *himanshi.sharma@tcs.com
>> * <hi...@tcs.com>>  Date: 02/23/2011 11:36 AM  Subject: Re:
>> Cassandra nodes on EC2 in two different regions not communicating
>>
>>
>>
>>  ------------------------------
>>
>>
>>
>> If you login to one of the nodes, can you telnet to port 7000 on the other
>> node?
>>
>> If not, then almost certainly it's a firewall/Security Group issue.
>>
>> You can find out the security groups for any node by logging in, and then
>> running:
>>
>> % curl " *http://169.254.169.254/latest/meta-data/security-groups *<http://169.254.169.254/latest/meta-data/security-groups>"
>>
>>
>> Assuming that both nodes are in the same security group, ensure that the
>> SG is configured to allow other members of the SG to communicate on port
>> 7000 to each other.
>>
>> HTH,
>> Dave Viner
>>
>>
>> On Tue, Feb 22, 2011 at 8:59 PM, Himanshi Sharma < *himanshi.sharma@tcs.com
>> * <hi...@tcs.com>> wrote:
>>
>> Hi,
>>
>> I am new to Cassandra. I m running Cassandra on EC2. I configured
>> Cassandra cluster on two instances in different regions.
>> But when I am trying the nodetool command with ring option, I am getting
>> only single node.
>>
>> How to make these two nodes communicate with each other. I have already
>> opened required ports. i.e 7000, 8080, 9160 in respective
>> security groups. Plz help me with this.
>>
>> Regards,
>> Himanshi Sharma
>>
>>
>> =====-----=====-----=====
>> Notice: The information contained in this e-mail
>> message and/or attachments to it may contain
>> confidential or privileged information. If you are
>>
>> not the intended recipient, any dissemination, use,
>> review, distribution, printing or copying of the
>> information contained in this e-mail message
>> and/or attachments to it are strictly prohibited. If
>> you have received this communication in error,
>>
>> please notify us by reply e-mail or telephone and
>> immediately and permanently delete the message
>> and any attachments. Thank you
>>
>>
>>
>>
>> =====-----=====-----=====
>>
>>
>> Notice: The information contained in this e-mail
>> message and/or attachments to it may contain
>> confidential or privileged information. If you are
>> not the intended recipient, any dissemination, use,
>> review, distribution, printing or copying of the
>>
>>
>> information contained in this e-mail message
>> and/or attachments to it are strictly prohibited. If
>> you have received this communication in error,
>> please notify us by reply e-mail or telephone and
>> immediately and permanently delete the message
>>
>>
>> and any attachments. Thank you
>>
>>
>>
>>
>>
>> --
>> Sasha Dolgy *
>> **sasha.dolgy@gmail.com * <sa...@gmail.com>
>>
>> =====-----=====-----=====
>> Notice: The information contained in this e-mail
>> message and/or attachments to it may contain
>> confidential or privileged information. If you are
>>
>>
>>
>> not the intended recipient, any dissemination, use,
>> review, distribution, printing or copying of the
>> information contained in this e-mail message
>> and/or attachments to it are strictly prohibited. If
>> you have received this communication in error,
>>
>>
>>
>> please notify us by reply e-mail or telephone and
>> immediately and permanently delete the message
>> and any attachments. Thank you
>>
>>
>>
>>
>>
>>
>> --
>> Frank LoVecchio
>> Senior Software Engineer | Isidorey, LLC
>> Google Voice +1.720.295.9179 *
>> **isidorey.com * <http://isidorey.com/>| *facebook.com/franklovecchio *<http://facebook.com/franklovecchio>|
>> *franklovecchio.com * <http://franklovecchio.com/>
>>
>>
>>
>> =====-----=====-----=====
>>
>> Notice: The information contained in this e-mail
>>
>> message and/or attachments to it may contain
>>
>> confidential or privileged information. If you are
>>
>>
>> not the intended recipient, any dissemination, use,
>>
>> review, distribution, printing or copying of the
>>
>> information contained in this e-mail message
>>
>> and/or attachments to it are strictly prohibited. If
>>
>> you have received this communication in error,
>>
>>
>> please notify us by reply e-mail or telephone and
>>
>> immediately and permanently delete the message
>>
>> and any attachments. Thank you
>>
>>
>>
>>
>> =====-----=====-----=====
>>
>> Notice: The information contained in this e-mail
>>
>> message and/or attachments to it may contain
>>
>> confidential or privileged information. If you are
>>
>>
>> not the intended recipient, any dissemination, use,
>>
>> review, distribution, printing or copying of the
>>
>> information contained in this e-mail message
>>
>> and/or attachments to it are strictly prohibited. If
>>
>> you have received this communication in error,
>>
>>
>> please notify us by reply e-mail or telephone and
>>
>> immediately and permanently delete the message
>>
>> and any attachments. Thank you
>>
>>
>>
>>
>> =====-----=====-----=====
>>
>> Notice: The information contained in this e-mail
>> message and/or attachments to it may contain
>> confidential or privileged information. If you are
>>
>>
>> not the intended recipient, any dissemination, use,
>> review, distribution, printing or copying of the
>> information contained in this e-mail message
>> and/or attachments to it are strictly prohibited. If
>> you have received this communication in error,
>>
>>
>> please notify us by reply e-mail or telephone and
>> immediately and permanently delete the message
>> and any attachments. Thank you
>>
>>
>>
>>
>> =====-----=====-----=====
>>
>> Notice: The information contained in this e-mail
>> message and/or attachments to it may contain
>> confidential or privileged information. If you are
>>
>>
>> not the intended recipient, any dissemination, use,
>> review, distribution, printing or copying of the
>> information contained in this e-mail message
>> and/or attachments to it are strictly prohibited. If
>> you have received this communication in error,
>>
>>
>> please notify us by reply e-mail or telephone and
>> immediately and permanently delete the message
>> and any attachments. Thank you
>>
>>
>>
>

Re: Cassandra nodes on EC2 in two different regions not communicating

Posted by Daniel van Ham Colchete <da...@gmail.com>.
Himanshi,

my bad, try this for iptables:

# SNAT outgoing connections
iptables -t nat -A POSTROUTING -p tcp --dport 7000 -d 175.41.143.192 -j SNAT
--to-source INTERNALIP

As for tcpdump the argument for the -i option is the interface name (eth0,
cassth0, etc...), and not the IP. So, it should be
tcpdump -i cassth0 -n port 7000
or
tcpdump -i eth0 -n port 7000

I`m assuming your main network card is eth0, but that should be the case.

Does it work?

Best,
Daniel

On Thu, Feb 24, 2011 at 9:27 AM, Himanshi Sharma <hi...@tcs.com>wrote:

>
> Thanks Daniel.
>
> But SNAT command is not working and when i try tcpdump it gives
>
> [root@ip-10-136-75-201 ~]# tcpdump -i 50.18.60.117 -n port 7000
> tcpdump: Invalid adapter index
>
> Not able to figure out wats this ??
>
> Thanks,
> Himanshi
>
>
>
>  From: Daniel van Ham Colchete <da...@gmail.com> To:
> user@cassandra.apache.org Date: 02/24/2011 04:27 PM Subject: Re: Cassandra
> nodes on EC2 in two different regions not communicating
> ------------------------------
>
>
>
> Himanshi,
>
> you could try adding your public IP address to an internal interface and
> DNAT the packets to it. This shouldn't give you any problems with your
> normal traffic. Tell Cassandra on listen on the public IPs and it should
> work.
>
> Linux commands would be:
>
> # Create an internal interface using bridge-utils
> brctl addbr cassth0
>
> # add the ip
> ip addr add dev cassth0 *50.18.60.117/32* <http://50.18.60.117/32>
>
> # DNAT incoming connections
> iptables -t nat -A PREROUTING -p tcp --dport 7000 -d INTERNALIP -j DNAT
> --to-destination 50.18.60.117
>
> # SNAT outgoing connections
> iptables -t nat -A OUTPUT -p tcp --dport 7000 -d 175.41.143.192 -j SNAT
> --to-source INTERNALIP
>
> This should work since Amazon you re-SNAT your outgoing packets to your
> public IP again, so the other cassandra instance will see your public IP as
> your source address.
>
> I didn't test this setup here but it should work unless I forgot some small
> detail. If you need to troubleshoot use the command "tcpdump -i INTERFACE -n
> port 7000" where INTERFACE should be your public interface or your cassth0.
>
> Please let me know if it worked.
>
> Best regards,
> Daniel Colchete
>
> On Thu, Feb 24, 2011 at 4:04 AM, Himanshi Sharma <*himanshi.sharma@tcs.com
> * <hi...@tcs.com>> wrote:
> giving private ip to rpc address gives the same exception
> and the keeping it blank and providing public to listen also fails. I tried
> keeping both blank and did telnet on 7000 so i get following o/p
>
> [root@ip-10-166-223-150 bin]# telnet 122.248.193.37 7000
> Trying 122.248.193.37...
> Connected to 122.248.193.37.
> Escape character is '^]'.
>
> Similarly from another achine
>
> [root@ip-10-136-75-201 bin]# telnet 184.72.22.87 7000
> Trying 184.72.22.87...
> Connected to 184.72.22.87.
> Escape character is '^]'.
>
>
>
> -----Dave Viner wrote: -----
> To: *user@cassandra.apache.org* <us...@cassandra.apache.org>
> From: Dave Viner <*daveviner@gmail.com* <da...@gmail.com>>
> Date: 02/24/2011 11:59AM
> cc: Himanshi Sharma <*himanshi.sharma@tcs.com* <hi...@tcs.com>>
>
> Subject: Re: Cassandra nodes on EC2 in two different regions not
> communicating
>
> Try using the private ipv4 address in the rpc_address field, and the public
> ipv4 (NOT the elastic ip) in the listen_address.
>
> If that fails, go back to rpc_address empty, and start up cassandra.
>
> Then from the other node, please telnet to port 7000 on the first node.
>  And show the output of that session in your reply.
>
> I haven't actually constructed a cross-region cluster nor have I used v0.7,
> but this really sounds like it should be easy.
>
> On Wed, Feb 23, 2011 at 10:22 PM, Himanshi Sharma < *himanshi.sharma@tcs.com
> * <hi...@tcs.com>> wrote:
> Hi Dave,
>
> I tried with the public ips. If i mention the public ip in rpc address
> field, Cassandra gives the same exception but if leave it blank then
> Cassandra runs but again in the nodetool command with ring option it does'nt
> show the node in another region.
>
> Thanks,
> Himanshi
>
>
> -----Dave Viner wrote: -----
> To: *user@cassandra.apache.org * <us...@cassandra.apache.org>
> From: Dave Viner < *daveviner@gmail.com * <da...@gmail.com>>
> Date: 02/24/2011 10:43AM
>
> Subject: Re: Cassandra nodes on EC2 in two different regions not
> communicating
>
> That looks like it's not an issue of communicating between nodes.  It
> appears that the node can not bind to the address on the localhost that
> you're asking for.
>
> " java.net.BindException: Cannot assign requested address  "
>
> I think the issue is that the Elastic IP address is not actually an IP
> address that's on the localhost.  So the daemon can not bind to that IP.
>  Instead of using the EIP, use the local IP address for the rpc_address (i
> think that's what you need since that is what Thrift will bind to).  Then
> for the listen_address should be the ip address that is routable from the
> other node.  I would first try with the actual public IP address (not the
> Elastic IP).  Once you get that to work, then shutdown the cluster, change
> the listen_address to the EIP, boot up and try again.
>
> Dave Viner
>
>
> On Wed, Feb 23, 2011 at 8:54 PM, Himanshi Sharma < *himanshi.sharma@tcs.com
> * <hi...@tcs.com>> wrote:
>
> Hey Dave,
>
> Sorry i forgot to mention the Non-seed configuration.
>
> for first node in us-west its as below....i.e its own elastic ip
>
> listen_address: 50.18.60.117
> rpc_address: 50.18.60.117
>
> and for second node in ap-southeast-1 its as below....i.e again its own
> elastic ip
>
> listen_address: 175.41.143.192
> rpc_address: 175.41.143.192
>
> Thanks,
> Himanshi
>
>
>
>
>   From: Dave Viner < *daveviner@gmail.com * <da...@gmail.com>>  To: *user@cassandra.apache.org
> * <us...@cassandra.apache.org> Date: 02/23/2011 11:01 PM  Subject: Re:
> Cassandra nodes on EC2 in two different regions not communicating
>
>  ------------------------------
>
>
>
> internal EC2 ips (10.xxx.xxx.xxx) work across availability zones (e.g.,
> from us-east-1a to us-east-1b) but do not work across regions (e.g., us-east
> to us-west).  To do regions, you must use the public ip address assigned by
> amazon.
>
> Himanshi, when you log into 1 node, and telnet to port 7000 on the other
> node, which IP address did you use - the 10.x address or the public ip
> address?
> And what is the seed/non-seed configuration in both cassandra.yaml files?
>
> Dave Viner
>
>
> On Wed, Feb 23, 2011 at 8:12 AM, Frank LoVecchio < *frank@isidorey.com *<fr...@isidorey.com>>
> wrote:
> The internal Amazon IP address is what you will want to use so you don't
> have to go through DNS anyways; not sure if this works from US-East to
> US-West, but it does make things quicker in between zones, e.g. us-east-1a
> to us-east-1b.
>
>
> On Wed, Feb 23, 2011 at 9:09 AM, Dave Viner < *daveviner@gmail.com *<da...@gmail.com>>
> wrote:
> Try using the IP address, not the dns name in the cassandra.yaml.
>
> If you can telnet from one to the other on port 7000, and both nodes have
> the other node in their config, it should work.
>
> Dave Viner
>
>
> On Wed, Feb 23, 2011 at 1:43 AM, Himanshi Sharma < *himanshi.sharma@tcs.com
> * <hi...@tcs.com>> wrote:
>
> Ya they do. Have specified Public DNS in seed field of each node in
> Cassandra.yaml...nt able to figure out what the problem is ???
>
>
>   From: Sasha Dolgy < *sdolgy@gmail.com * <sd...@gmail.com>>  To: *user@cassandra.apache.org
> * <us...@cassandra.apache.org> Date: 02/23/2011 02:56 PM  Subject: Re:
> Cassandra nodes on EC2 in two different regions not communicating
>
>
>  ------------------------------
>
>
>
> did you define the other host in the cassandra.yaml ?  on both servers ....
> they need to know about each other
>
> On Wed, Feb 23, 2011 at 10:16 AM, Himanshi Sharma < *himanshi.sharma@tcs.com
> * <hi...@tcs.com>> wrote:
>
> Thanks Dave but I am able to telnet to other instances on port 7000
> and when i run  ./nodetool --host *ec2-50-18-60-117.us-west-1.compute.amazonaws.com
> * <http://ec2-50-18-60-117.us-west-1.compute.amazonaws.com/> ring... I can
> see only one node.
>
> Do we need to configure anything else in Cassandra.yaml or Cassandra-env.sh
> ???
>
>
>
>
>   From: Dave Viner < *daveviner@gmail.com * <da...@gmail.com>>  To: *user@cassandra.apache.org
> * <us...@cassandra.apache.org> Cc: Himanshi Sharma < *himanshi.sharma@tcs.com
> * <hi...@tcs.com>>  Date: 02/23/2011 11:36 AM  Subject: Re:
> Cassandra nodes on EC2 in two different regions not communicating
>
>
>
>  ------------------------------
>
>
>
> If you login to one of the nodes, can you telnet to port 7000 on the other
> node?
>
> If not, then almost certainly it's a firewall/Security Group issue.
>
> You can find out the security groups for any node by logging in, and then
> running:
>
> % curl " *http://169.254.169.254/latest/meta-data/security-groups *<http://169.254.169.254/latest/meta-data/security-groups>"
>
>
> Assuming that both nodes are in the same security group, ensure that the SG
> is configured to allow other members of the SG to communicate on port 7000
> to each other.
>
> HTH,
> Dave Viner
>
>
> On Tue, Feb 22, 2011 at 8:59 PM, Himanshi Sharma < *himanshi.sharma@tcs.com
> * <hi...@tcs.com>> wrote:
>
> Hi,
>
> I am new to Cassandra. I m running Cassandra on EC2. I configured Cassandra
> cluster on two instances in different regions.
> But when I am trying the nodetool command with ring option, I am getting
> only single node.
>
> How to make these two nodes communicate with each other. I have already
> opened required ports. i.e 7000, 8080, 9160 in respective
> security groups. Plz help me with this.
>
> Regards,
> Himanshi Sharma
>
>
> =====-----=====-----=====
> Notice: The information contained in this e-mail
> message and/or attachments to it may contain
> confidential or privileged information. If you are
>
> not the intended recipient, any dissemination, use,
> review, distribution, printing or copying of the
> information contained in this e-mail message
> and/or attachments to it are strictly prohibited. If
> you have received this communication in error,
>
> please notify us by reply e-mail or telephone and
> immediately and permanently delete the message
> and any attachments. Thank you
>
>
>
>
> =====-----=====-----=====
>
>
> Notice: The information contained in this e-mail
> message and/or attachments to it may contain
> confidential or privileged information. If you are
> not the intended recipient, any dissemination, use,
> review, distribution, printing or copying of the
>
>
> information contained in this e-mail message
> and/or attachments to it are strictly prohibited. If
> you have received this communication in error,
> please notify us by reply e-mail or telephone and
> immediately and permanently delete the message
>
>
> and any attachments. Thank you
>
>
>
>
>
> --
> Sasha Dolgy *
> **sasha.dolgy@gmail.com * <sa...@gmail.com>
>
> =====-----=====-----=====
> Notice: The information contained in this e-mail
> message and/or attachments to it may contain
> confidential or privileged information. If you are
>
>
>
> not the intended recipient, any dissemination, use,
> review, distribution, printing or copying of the
> information contained in this e-mail message
> and/or attachments to it are strictly prohibited. If
> you have received this communication in error,
>
>
>
> please notify us by reply e-mail or telephone and
> immediately and permanently delete the message
> and any attachments. Thank you
>
>
>
>
>
>
> --
> Frank LoVecchio
> Senior Software Engineer | Isidorey, LLC
> Google Voice +1.720.295.9179 *
> **isidorey.com * <http://isidorey.com/>| *facebook.com/franklovecchio *<http://facebook.com/franklovecchio>|
> *franklovecchio.com * <http://franklovecchio.com/>
>
>
>
> =====-----=====-----=====
>
> Notice: The information contained in this e-mail
>
> message and/or attachments to it may contain
>
> confidential or privileged information. If you are
>
>
> not the intended recipient, any dissemination, use,
>
> review, distribution, printing or copying of the
>
> information contained in this e-mail message
>
> and/or attachments to it are strictly prohibited. If
>
> you have received this communication in error,
>
>
> please notify us by reply e-mail or telephone and
>
> immediately and permanently delete the message
>
> and any attachments. Thank you
>
>
>
>
> =====-----=====-----=====
>
> Notice: The information contained in this e-mail
>
> message and/or attachments to it may contain
>
> confidential or privileged information. If you are
>
>
> not the intended recipient, any dissemination, use,
>
> review, distribution, printing or copying of the
>
> information contained in this e-mail message
>
> and/or attachments to it are strictly prohibited. If
>
> you have received this communication in error,
>
>
> please notify us by reply e-mail or telephone and
>
> immediately and permanently delete the message
>
> and any attachments. Thank you
>
>
>
>
> =====-----=====-----=====
>
> Notice: The information contained in this e-mail
> message and/or attachments to it may contain
> confidential or privileged information. If you are
>
>
> not the intended recipient, any dissemination, use,
> review, distribution, printing or copying of the
> information contained in this e-mail message
> and/or attachments to it are strictly prohibited. If
> you have received this communication in error,
>
>
> please notify us by reply e-mail or telephone and
> immediately and permanently delete the message
> and any attachments. Thank you
>
>
>
>
> =====-----=====-----=====
>
> Notice: The information contained in this e-mail
> message and/or attachments to it may contain
> confidential or privileged information. If you are
>
> not the intended recipient, any dissemination, use,
> review, distribution, printing or copying of the
> information contained in this e-mail message
> and/or attachments to it are strictly prohibited. If
> you have received this communication in error,
>
> please notify us by reply e-mail or telephone and
> immediately and permanently delete the message
> and any attachments. Thank you
>
>
>

Cassandra nodes on EC2 in two different regions not communicating

Posted by Himanshi Sharma <hi...@tcs.com>.
Hi All,

I am trying to configure a cassandra cluster of 2 nodes in different 
regions of amazon ec2. 

Nodes are running fine but when i try nodetool command with ring option i 
get single node.

And  both the nodes are able to ping each other, telnet each other. Not 
able to figure out what is the problem.

Plz help

Thanks,
Himanshi Sharma

=====-----=====-----=====
Notice: The information contained in this e-mail
message and/or attachments to it may contain 
confidential or privileged information. If you are 
not the intended recipient, any dissemination, use, 
review, distribution, printing or copying of the 
information contained in this e-mail message 
and/or attachments to it are strictly prohibited. If 
you have received this communication in error, 
please notify us by reply e-mail or telephone and 
immediately and permanently delete the message 
and any attachments. Thank you



Re: Cassandra nodes on EC2 in two different regions not communicating

Posted by Himanshi Sharma <hi...@tcs.com>.
Thanks Daniel.

But SNAT command is not working and when i try tcpdump it gives 

[root@ip-10-136-75-201 ~]# tcpdump -i 50.18.60.117 -n port 7000
tcpdump: Invalid adapter index

Not able to figure out wats this ??

Thanks,
Himanshi




From:
Daniel van Ham Colchete <da...@gmail.com>
To:
user@cassandra.apache.org
Date:
02/24/2011 04:27 PM
Subject:
Re: Cassandra nodes on EC2 in two different regions not communicating



Himanshi,

you could try adding your public IP address to an internal interface and 
DNAT the packets to it. This shouldn't give you any problems with your 
normal traffic. Tell Cassandra on listen on the public IPs and it should 
work.

Linux commands would be:

# Create an internal interface using bridge-utils
brctl addbr cassth0

# add the ip
ip addr add dev cassth0 50.18.60.117/32

# DNAT incoming connections
iptables -t nat -A PREROUTING -p tcp --dport 7000 -d INTERNALIP -j DNAT 
--to-destination 50.18.60.117

# SNAT outgoing connections
iptables -t nat -A OUTPUT -p tcp --dport 7000 -d 175.41.143.192 -j SNAT 
--to-source INTERNALIP

This should work since Amazon you re-SNAT your outgoing packets to your 
public IP again, so the other cassandra instance will see your public IP 
as your source address.

I didn't test this setup here but it should work unless I forgot some 
small detail. If you need to troubleshoot use the command "tcpdump -i 
INTERFACE -n port 7000" where INTERFACE should be your public interface or 
your cassth0.

Please let me know if it worked.

Best regards,
Daniel Colchete

On Thu, Feb 24, 2011 at 4:04 AM, Himanshi Sharma <hi...@tcs.com> 
wrote:
giving private ip to rpc address gives the same exception
and the keeping it blank and providing public to listen also fails. I 
tried keeping both blank and did telnet on 7000 so i get following o/p
 
[root@ip-10-166-223-150 bin]# telnet 122.248.193.37 7000
Trying 122.248.193.37...
Connected to 122.248.193.37.
Escape character is '^]'.
 
Similarly from another achine
 
[root@ip-10-136-75-201 bin]# telnet 184.72.22.87 7000
Trying 184.72.22.87...
Connected to 184.72.22.87.
Escape character is '^]'.
 


-----Dave Viner wrote: ----- 
To: user@cassandra.apache.org
From: Dave Viner <da...@gmail.com>
Date: 02/24/2011 11:59AM
cc: Himanshi Sharma <hi...@tcs.com>

Subject: Re: Cassandra nodes on EC2 in two different regions not 
communicating

Try using the private ipv4 address in the rpc_address field, and the 
public ipv4 (NOT the elastic ip) in the listen_address. 

If that fails, go back to rpc_address empty, and start up cassandra. 

Then from the other node, please telnet to port 7000 on the first node. 
 And show the output of that session in your reply. 

I haven't actually constructed a cross-region cluster nor have I used 
v0.7, but this really sounds like it should be easy. 

On Wed, Feb 23, 2011 at 10:22 PM, Himanshi Sharma < 
himanshi.sharma@tcs.com > wrote: 
Hi Dave, 
  
I tried with the public ips. If i mention the public ip in rpc address 
field, Cassandra gives the same exception but if leave it blank then 
Cassandra runs but again in the nodetool command with ring option it 
does'nt show the node in another region. 
  
Thanks, 
Himanshi 


-----Dave Viner wrote: ----- 
To: user@cassandra.apache.org 
From: Dave Viner < daveviner@gmail.com > 
Date: 02/24/2011 10:43AM 

Subject: Re: Cassandra nodes on EC2 in two different regions not 
communicating 

That looks like it's not an issue of communicating between nodes.  It 
appears that the node can not bind to the address on the localhost that 
you're asking for. 

" java.net.BindException: Cannot assign requested address  " 

I think the issue is that the Elastic IP address is not actually an IP 
address that's on the localhost.  So the daemon can not bind to that IP. 
 Instead of using the EIP, use the local IP address for the rpc_address (i 
think that's what you need since that is what Thrift will bind to).  Then 
for the listen_address should be the ip address that is routable from the 
other node.  I would first try with the actual public IP address (not the 
Elastic IP).  Once you get that to work, then shutdown the cluster, change 
the listen_address to the EIP, boot up and try again. 

Dave Viner 


On Wed, Feb 23, 2011 at 8:54 PM, Himanshi Sharma < himanshi.sharma@tcs.com 
> wrote: 

Hey Dave, 

Sorry i forgot to mention the Non-seed configuration. 

for first node in us-west its as below....i.e its own elastic ip 

listen_address: 50.18.60.117 
rpc_address: 50.18.60.117 

and for second node in ap-southeast-1 its as below....i.e again its own 
elastic ip 

listen_address: 175.41.143.192 
rpc_address: 175.41.143.192 

Thanks, 
Himanshi 





From: 
Dave Viner < daveviner@gmail.com > 
To: 
user@cassandra.apache.org 
Date: 
02/23/2011 11:01 PM 
Subject: 
Re: Cassandra nodes on EC2 in two different regions not communicating 




internal EC2 ips (10.xxx.xxx.xxx) work across availability zones (e.g., 
from us-east-1a to us-east-1b) but do not work across regions (e.g., 
us-east to us-west).  To do regions, you must use the public ip address 
assigned by amazon. 

Himanshi, when you log into 1 node, and telnet to port 7000 on the other 
node, which IP address did you use - the 10.x address or the public ip 
address? 
And what is the seed/non-seed configuration in both cassandra.yaml files? 

Dave Viner 


On Wed, Feb 23, 2011 at 8:12 AM, Frank LoVecchio < frank@isidorey.com > 
wrote: 
The internal Amazon IP address is what you will want to use so you don't 
have to go through DNS anyways; not sure if this works from US-East to 
US-West, but it does make things quicker in between zones, e.g. us-east-1a 
to us-east-1b. 


On Wed, Feb 23, 2011 at 9:09 AM, Dave Viner < daveviner@gmail.com > wrote: 

Try using the IP address, not the dns name in the cassandra.yaml. 

If you can telnet from one to the other on port 7000, and both nodes have 
the other node in their config, it should work. 

Dave Viner 


On Wed, Feb 23, 2011 at 1:43 AM, Himanshi Sharma < himanshi.sharma@tcs.com 
> wrote: 

Ya they do. Have specified Public DNS in seed field of each node in 
Cassandra.yaml...nt able to figure out what the problem is ??? 



From: 
Sasha Dolgy < sdolgy@gmail.com > 
To: 
user@cassandra.apache.org 
Date: 
02/23/2011 02:56 PM 
Subject: 
Re: Cassandra nodes on EC2 in two different regions not communicating 





did you define the other host in the cassandra.yaml ?  on both servers 
.... they need to know about each other 

On Wed, Feb 23, 2011 at 10:16 AM, Himanshi Sharma < 
himanshi.sharma@tcs.com > wrote: 

Thanks Dave but I am able to telnet to other instances on port 7000 
and when i run  ./nodetool --host 
ec2-50-18-60-117.us-west-1.compute.amazonaws.com  ring... I can see only 
one node. 

Do we need to configure anything else in Cassandra.yaml or 
Cassandra-env.sh ??? 





From: 
Dave Viner < daveviner@gmail.com > 
To: 
user@cassandra.apache.org 
Cc: 
Himanshi Sharma < himanshi.sharma@tcs.com > 
Date: 
02/23/2011 11:36 AM 
Subject: 
Re: Cassandra nodes on EC2 in two different regions not communicating 






If you login to one of the nodes, can you telnet to port 7000 on the other 
node? 

If not, then almost certainly it's a firewall/Security Group issue. 

You can find out the security groups for any node by logging in, and then 
running: 

% curl " http://169.254.169.254/latest/meta-data/security-groups " 

Assuming that both nodes are in the same security group, ensure that the 
SG is configured to allow other members of the SG to communicate on port 
7000 to each other. 

HTH, 
Dave Viner 


On Tue, Feb 22, 2011 at 8:59 PM, Himanshi Sharma < himanshi.sharma@tcs.com 
> wrote: 

Hi, 

I am new to Cassandra. I m running Cassandra on EC2. I configured 
Cassandra cluster on two instances in different regions. 
But when I am trying the nodetool command with ring option, I am getting 
only single node. 

How to make these two nodes communicate with each other. I have already 
opened required ports. i.e 7000, 8080, 9160 in respective 
security groups. Plz help me with this. 

Regards, 
Himanshi Sharma 


=====-----=====-----===== 
Notice: The information contained in this e-mail 
message and/or attachments to it may contain 
confidential or privileged information. If you are 

not the intended recipient, any dissemination, use, 
review, distribution, printing or copying of the 
information contained in this e-mail message 
and/or attachments to it are strictly prohibited. If 
you have received this communication in error, 

please notify us by reply e-mail or telephone and 
immediately and permanently delete the message 
and any attachments. Thank you 




=====-----=====-----===== 


Notice: The information contained in this e-mail 
message and/or attachments to it may contain 
confidential or privileged information. If you are 
not the intended recipient, any dissemination, use, 
review, distribution, printing or copying of the 


information contained in this e-mail message 
and/or attachments to it are strictly prohibited. If 
you have received this communication in error, 
please notify us by reply e-mail or telephone and 
immediately and permanently delete the message 


and any attachments. Thank you 





-- 
Sasha Dolgy 
sasha.dolgy@gmail.com 

=====-----=====-----===== 
Notice: The information contained in this e-mail 
message and/or attachments to it may contain 
confidential or privileged information. If you are 



not the intended recipient, any dissemination, use, 
review, distribution, printing or copying of the 
information contained in this e-mail message 
and/or attachments to it are strictly prohibited. If 
you have received this communication in error, 



please notify us by reply e-mail or telephone and 
immediately and permanently delete the message 
and any attachments. Thank you 






-- 
Frank LoVecchio 
Senior Software Engineer | Isidorey, LLC 
Google Voice +1.720.295.9179 
isidorey.com | facebook.com/franklovecchio | franklovecchio.com 



=====-----=====-----=====

Notice: The information contained in this e-mail

message and/or attachments to it may contain 

confidential or privileged information. If you are 


not the intended recipient, any dissemination, use, 

review, distribution, printing or copying of the 

information contained in this e-mail message 

and/or attachments to it are strictly prohibited. If 

you have received this communication in error, 


please notify us by reply e-mail or telephone and 

immediately and permanently delete the message 

and any attachments. Thank you




=====-----=====-----=====

Notice: The information contained in this e-mail

message and/or attachments to it may contain 

confidential or privileged information. If you are 


not the intended recipient, any dissemination, use, 

review, distribution, printing or copying of the 

information contained in this e-mail message 

and/or attachments to it are strictly prohibited. If 

you have received this communication in error, 


please notify us by reply e-mail or telephone and 

immediately and permanently delete the message 

and any attachments. Thank you




=====-----=====-----=====

Notice: The information contained in this e-mail
message and/or attachments to it may contain 
confidential or privileged information. If you are 


not the intended recipient, any dissemination, use, 
review, distribution, printing or copying of the 
information contained in this e-mail message 
and/or attachments to it are strictly prohibited. If 
you have received this communication in error, 


please notify us by reply e-mail or telephone and 
immediately and permanently delete the message 
and any attachments. Thank you




=====-----=====-----=====
Notice: The information contained in this e-mail
message and/or attachments to it may contain 
confidential or privileged information. If you are 
not the intended recipient, any dissemination, use, 
review, distribution, printing or copying of the 
information contained in this e-mail message 
and/or attachments to it are strictly prohibited. If 
you have received this communication in error, 
please notify us by reply e-mail or telephone and 
immediately and permanently delete the message 
and any attachments. Thank you



Re: Cassandra nodes on EC2 in two different regions not communicating

Posted by Daniel van Ham Colchete <da...@gmail.com>.
Himanshi,

you could try adding your public IP address to an internal interface and
DNAT the packets to it. This shouldn't give you any problems with your
normal traffic. Tell Cassandra on listen on the public IPs and it should
work.

Linux commands would be:

# Create an internal interface using bridge-utils
brctl addbr cassth0

# add the ip
ip addr add dev cassth0 50.18.60.117/32

# DNAT incoming connections
iptables -t nat -A PREROUTING -p tcp --dport 7000 -d INTERNALIP -j DNAT
--to-destination 50.18.60.117

# SNAT outgoing connections
iptables -t nat -A OUTPUT -p tcp --dport 7000 -d 175.41.143.192 -j SNAT
--to-source INTERNALIP

This should work since Amazon you re-SNAT your outgoing packets to your
public IP again, so the other cassandra instance will see your public IP as
your source address.

I didn't test this setup here but it should work unless I forgot some small
detail. If you need to troubleshoot use the command "tcpdump -i INTERFACE -n
port 7000" where INTERFACE should be your public interface or your cassth0.

Please let me know if it worked.

Best regards,
Daniel Colchete

On Thu, Feb 24, 2011 at 4:04 AM, Himanshi Sharma <hi...@tcs.com>wrote:

> giving private ip to rpc address gives the same exception
> and the keeping it blank and providing public to listen also fails. I tried
> keeping both blank and did telnet on 7000 so i get following o/p
>
> [root@ip-10-166-223-150 bin]# telnet 122.248.193.37 7000
> Trying 122.248.193.37...
> Connected to 122.248.193.37.
> Escape character is '^]'.
>
> Similarly from another achine
>
> [root@ip-10-136-75-201 bin]# telnet 184.72.22.87 7000
> Trying 184.72.22.87...
> Connected to 184.72.22.87.
> Escape character is '^]'.
>
>
>
> -----Dave Viner wrote: -----
>
> To: user@cassandra.apache.org
> From: Dave Viner <da...@gmail.com>
> Date: 02/24/2011 11:59AM
> cc: Himanshi Sharma <hi...@tcs.com>
>
> Subject: Re: Cassandra nodes on EC2 in two different regions not
> communicating
>
> Try using the private ipv4 address in the rpc_address field, and the public
> ipv4 (NOT the elastic ip) in the listen_address.
>
> If that fails, go back to rpc_address empty, and start up cassandra.
>
> Then from the other node, please telnet to port 7000 on the first node.
>  And show the output of that session in your reply.
>
> I haven't actually constructed a cross-region cluster nor have I used v0.7,
> but this really sounds like it should be easy.
>
> On Wed, Feb 23, 2011 at 10:22 PM, Himanshi Sharma < himanshi.sharma@tcs.com
> > wrote:
>
>> Hi Dave,
>>
>> I tried with the public ips. If i mention the public ip in rpc address
>> field, Cassandra gives the same exception but if leave it blank then
>> Cassandra runs but again in the nodetool command with ring option it does'nt
>> show the node in another region.
>>
>> Thanks,
>> Himanshi
>>
>>
>> -----Dave Viner wrote: -----
>>
>> To: user@cassandra.apache.org
>> From: Dave Viner < daveviner@gmail.com >
>> Date: 02/24/2011 10:43AM
>>
>> Subject: Re: Cassandra nodes on EC2 in two different regions not
>> communicating
>>
>> That looks like it's not an issue of communicating between nodes.  It
>> appears that the node can not bind to the address on the localhost that
>> you're asking for.
>>
>> " java.net.BindException: Cannot assign requested address  "
>>
>> I think the issue is that the Elastic IP address is not actually an IP
>> address that's on the localhost.  So the daemon can not bind to that IP.
>>  Instead of using the EIP, use the local IP address for the rpc_address (i
>> think that's what you need since that is what Thrift will bind to).  Then
>> for the listen_address should be the ip address that is routable from the
>> other node.  I would first try with the actual public IP address (not the
>> Elastic IP).  Once you get that to work, then shutdown the cluster, change
>> the listen_address to the EIP, boot up and try again.
>>
>> Dave Viner
>>
>>
>> On Wed, Feb 23, 2011 at 8:54 PM, Himanshi Sharma < himanshi.sharma@tcs.com
>> > wrote:
>>
>>>
>>> Hey Dave,
>>>
>>> Sorry i forgot to mention the Non-seed configuration.
>>>
>>> for first node in us-west its as below....i.e its own elastic ip
>>>
>>> listen_address: 50.18.60.117
>>> rpc_address: 50.18.60.117
>>>
>>> and for second node in ap-southeast-1 its as below....i.e again its own
>>> elastic ip
>>>
>>> listen_address: 175.41.143.192
>>> rpc_address: 175.41.143.192
>>>
>>> Thanks,
>>> Himanshi
>>>
>>>
>>>
>>>
>>>
>>>   From:
>>> Dave Viner < daveviner@gmail.com >
>>>  To: user@cassandra.apache.org  Date: 02/23/2011 11:01 PM  Subject: Re:
>>> Cassandra nodes on EC2 in two different regions not communicating
>>> ------------------------------
>>>
>>>
>>>
>>> internal EC2 ips (10.xxx.xxx.xxx) work across availability zones (e.g.,
>>> from us-east-1a to us-east-1b) but do not work across regions (e.g., us-east
>>> to us-west).  To do regions, you must use the public ip address assigned by
>>> amazon.
>>>
>>> Himanshi, when you log into 1 node, and telnet to port 7000 on the other
>>> node, which IP address did you use - the 10.x address or the public ip
>>> address?
>>> And what is the seed/non-seed configuration in both cassandra.yaml files?
>>>
>>>
>>> Dave Viner
>>>
>>>
>>> On Wed, Feb 23, 2011 at 8:12 AM, Frank LoVecchio < *frank@isidorey.com *<fr...@isidorey.com>>
>>> wrote:
>>> The internal Amazon IP address is what you will want to use so you don't
>>> have to go through DNS anyways; not sure if this works from US-East to
>>> US-West, but it does make things quicker in between zones, e.g. us-east-1a
>>> to us-east-1b.
>>>
>>>
>>> On Wed, Feb 23, 2011 at 9:09 AM, Dave Viner < *daveviner@gmail.com *<da...@gmail.com>>
>>> wrote:
>>> Try using the IP address, not the dns name in the cassandra.yaml.
>>>
>>> If you can telnet from one to the other on port 7000, and both nodes have
>>> the other node in their config, it should work.
>>>
>>> Dave Viner
>>>
>>>
>>> On Wed, Feb 23, 2011 at 1:43 AM, Himanshi Sharma < *himanshi.sharma@tcs.com
>>> * <hi...@tcs.com>> wrote:
>>>
>>> Ya they do. Have specified Public DNS in seed field of each node in
>>> Cassandra.yaml...nt able to figure out what the problem is ???
>>>
>>>
>>>
>>>   From: Sasha Dolgy < *sdolgy@gmail.com * <sd...@gmail.com>>  To: *user@cassandra.apache.org
>>> * <us...@cassandra.apache.org> Date: 02/23/2011 02:56 PM  Subject: Re:
>>> Cassandra nodes on EC2 in two different regions not communicating
>>>
>>> ------------------------------
>>>
>>>
>>>
>>> did you define the other host in the cassandra.yaml ?  on both servers
>>> .... they need to know about each other
>>>
>>> On Wed, Feb 23, 2011 at 10:16 AM, Himanshi Sharma < *himanshi.sharma@tcs.com
>>> * <hi...@tcs.com>> wrote:
>>>
>>> Thanks Dave but I am able to telnet to other instances on port 7000
>>> and when i run  ./nodetool --host *ec2-50-18-60-117.us-west-1.compute.amazonaws.com
>>> * <http://ec2-50-18-60-117.us-west-1.compute.amazonaws.com/> ring... I
>>> can see only one node.
>>>
>>> Do we need to configure anything else in Cassandra.yaml or
>>> Cassandra-env.sh ???
>>>
>>>
>>>
>>>
>>>
>>>   From: Dave Viner < *daveviner@gmail.com * <da...@gmail.com>>  To:
>>> *user@cassandra.apache.org * <us...@cassandra.apache.org> Cc: Himanshi
>>> Sharma < *himanshi.sharma@tcs.com * <hi...@tcs.com>>  Date: 02/23/2011
>>> 11:36 AM  Subject: Re: Cassandra nodes on EC2 in two different regions
>>> not communicating
>>>
>>>
>>> ------------------------------
>>>
>>>
>>>
>>> If you login to one of the nodes, can you telnet to port 7000 on the
>>> other node?
>>>
>>> If not, then almost certainly it's a firewall/Security Group issue.
>>>
>>> You can find out the security groups for any node by logging in, and then
>>> running:
>>>
>>> % curl " *http://169.254.169.254/latest/meta-data/security-groups *<http://169.254.169.254/latest/meta-data/security-groups>"
>>>
>>>
>>> Assuming that both nodes are in the same security group, ensure that the
>>> SG is configured to allow other members of the SG to communicate on port
>>> 7000 to each other.
>>>
>>> HTH,
>>> Dave Viner
>>>
>>>
>>> On Tue, Feb 22, 2011 at 8:59 PM, Himanshi Sharma < *himanshi.sharma@tcs.com
>>> * <hi...@tcs.com>> wrote:
>>>
>>> Hi,
>>>
>>> I am new to Cassandra. I m running Cassandra on EC2. I configured
>>> Cassandra cluster on two instances in different regions.
>>> But when I am trying the nodetool command with ring option, I am getting
>>> only single node.
>>>
>>> How to make these two nodes communicate with each other. I have already
>>> opened required ports. i.e 7000, 8080, 9160 in respective
>>> security groups. Plz help me with this.
>>>
>>> Regards,
>>> Himanshi Sharma
>>>
>>>
>>> =====-----=====-----=====
>>> Notice: The information contained in this e-mail
>>> message and/or attachments to it may contain
>>> confidential or privileged information. If you are
>>>
>>> not the intended recipient, any dissemination, use,
>>> review, distribution, printing or copying of the
>>> information contained in this e-mail message
>>> and/or attachments to it are strictly prohibited. If
>>> you have received this communication in error,
>>>
>>> please notify us by reply e-mail or telephone and
>>> immediately and permanently delete the message
>>> and any attachments. Thank you
>>>
>>>
>>>
>>>
>>> =====-----=====-----=====
>>>
>>>
>>> Notice: The information contained in this e-mail
>>> message and/or attachments to it may contain
>>> confidential or privileged information. If you are
>>> not the intended recipient, any dissemination, use,
>>> review, distribution, printing or copying of the
>>>
>>>
>>> information contained in this e-mail message
>>> and/or attachments to it are strictly prohibited. If
>>> you have received this communication in error,
>>> please notify us by reply e-mail or telephone and
>>> immediately and permanently delete the message
>>>
>>>
>>> and any attachments. Thank you
>>>
>>>
>>>
>>>
>>>
>>> --
>>> Sasha Dolgy *
>>> **sasha.dolgy@gmail.com * <sa...@gmail.com>
>>>
>>> =====-----=====-----=====
>>> Notice: The information contained in this e-mail
>>> message and/or attachments to it may contain
>>> confidential or privileged information. If you are
>>>
>>>
>>>
>>> not the intended recipient, any dissemination, use,
>>> review, distribution, printing or copying of the
>>> information contained in this e-mail message
>>> and/or attachments to it are strictly prohibited. If
>>> you have received this communication in error,
>>>
>>>
>>>
>>> please notify us by reply e-mail or telephone and
>>> immediately and permanently delete the message
>>> and any attachments. Thank you
>>>
>>>
>>>
>>>
>>>
>>>
>>> --
>>> Frank LoVecchio
>>> Senior Software Engineer | Isidorey, LLC
>>> Google Voice +1.720.295.9179
>>> *isidorey.com * <http://isidorey.com/>| *facebook.com/franklovecchio *<http://facebook.com/franklovecchio>|
>>> *franklovecchio.com * <http://franklovecchio.com/>
>>>
>>>
>>>
>>> =====-----=====-----=====
>>> Notice: The information contained in this e-mail
>>> message and/or attachments to it may contain
>>> confidential or privileged information. If you are
>>>
>>> not the intended recipient, any dissemination, use,
>>> review, distribution, printing or copying of the
>>> information contained in this e-mail message
>>> and/or attachments to it are strictly prohibited. If
>>> you have received this communication in error,
>>>
>>> please notify us by reply e-mail or telephone and
>>> immediately and permanently delete the message
>>> and any attachments. Thank you
>>>
>>>
>>>
>>   =====-----=====-----=====
>> Notice: The information contained in this e-mail
>> message and/or attachments to it may contain
>> confidential or privileged information. If you are
>>
>> not the intended recipient, any dissemination, use,
>> review, distribution, printing or copying of the
>> information contained in this e-mail message
>> and/or attachments to it are strictly prohibited. If
>> you have received this communication in error,
>>
>> please notify us by reply e-mail or telephone and
>> immediately and permanently delete the message
>> and any attachments. Thank you
>>
>>
>>
> =====-----=====-----=====
>
> Notice: The information contained in this e-mail
> message and/or attachments to it may contain
> confidential or privileged information. If you are
>
> not the intended recipient, any dissemination, use,
> review, distribution, printing or copying of the
> information contained in this e-mail message
> and/or attachments to it are strictly prohibited. If
> you have received this communication in error,
>
> please notify us by reply e-mail or telephone and
> immediately and permanently delete the message
> and any attachments. Thank you
>
>
>

Re: Cassandra nodes on EC2 in two different regions not communicating

Posted by Dave Viner <da...@gmail.com>.
Try using the private ipv4 address in the rpc_address field, and the public
ipv4 (NOT the elastic ip) in the listen_address.

If that fails, go back to rpc_address empty, and start up cassandra.

Then from the other node, please telnet to port 7000 on the first node.  And
show the output of that session in your reply.

I haven't actually constructed a cross-region cluster nor have I used v0.7,
but this really sounds like it should be easy.

On Wed, Feb 23, 2011 at 10:22 PM, Himanshi Sharma
<hi...@tcs.com>wrote:

> Hi Dave,
>
> I tried with the public ips. If i mention the public ip in rpc address
> field, Cassandra gives the same exception but if leave it blank then
> Cassandra runs but again in the nodetool command with ring option it does'nt
> show the node in another region.
>
> Thanks,
> Himanshi
>
>
> -----Dave Viner wrote: -----
>
> To: user@cassandra.apache.org
> From: Dave Viner <da...@gmail.com>
> Date: 02/24/2011 10:43AM
>
> Subject: Re: Cassandra nodes on EC2 in two different regions not
> communicating
>
> That looks like it's not an issue of communicating between nodes.  It
> appears that the node can not bind to the address on the localhost that
> you're asking for.
>
> " java.net.BindException: Cannot assign requested address  "
>
> I think the issue is that the Elastic IP address is not actually an IP
> address that's on the localhost.  So the daemon can not bind to that IP.
>  Instead of using the EIP, use the local IP address for the rpc_address (i
> think that's what you need since that is what Thrift will bind to).  Then
> for the listen_address should be the ip address that is routable from the
> other node.  I would first try with the actual public IP address (not the
> Elastic IP).  Once you get that to work, then shutdown the cluster, change
> the listen_address to the EIP, boot up and try again.
>
> Dave Viner
>
>
> On Wed, Feb 23, 2011 at 8:54 PM, Himanshi Sharma < himanshi.sharma@tcs.com
> > wrote:
>
>>
>> Hey Dave,
>>
>> Sorry i forgot to mention the Non-seed configuration.
>>
>> for first node in us-west its as below....i.e its own elastic ip
>>
>> listen_address: 50.18.60.117
>> rpc_address: 50.18.60.117
>>
>> and for second node in ap-southeast-1 its as below....i.e again its own
>> elastic ip
>>
>> listen_address: 175.41.143.192
>> rpc_address: 175.41.143.192
>>
>> Thanks,
>> Himanshi
>>
>>
>>
>>
>>
>>   From:
>> Dave Viner < daveviner@gmail.com >
>>  To: user@cassandra.apache.org  Date: 02/23/2011 11:01 PM  Subject: Re:
>> Cassandra nodes on EC2 in two different regions not communicating
>> ------------------------------
>>
>>
>>
>> internal EC2 ips (10.xxx.xxx.xxx) work across availability zones (e.g.,
>> from us-east-1a to us-east-1b) but do not work across regions (e.g., us-east
>> to us-west).  To do regions, you must use the public ip address assigned by
>> amazon.
>>
>> Himanshi, when you log into 1 node, and telnet to port 7000 on the other
>> node, which IP address did you use - the 10.x address or the public ip
>> address?
>> And what is the seed/non-seed configuration in both cassandra.yaml files?
>>
>> Dave Viner
>>
>>
>> On Wed, Feb 23, 2011 at 8:12 AM, Frank LoVecchio < *frank@isidorey.com *<fr...@isidorey.com>>
>> wrote:
>> The internal Amazon IP address is what you will want to use so you don't
>> have to go through DNS anyways; not sure if this works from US-East to
>> US-West, but it does make things quicker in between zones, e.g. us-east-1a
>> to us-east-1b.
>>
>>
>> On Wed, Feb 23, 2011 at 9:09 AM, Dave Viner < *daveviner@gmail.com *<da...@gmail.com>>
>> wrote:
>> Try using the IP address, not the dns name in the cassandra.yaml.
>>
>> If you can telnet from one to the other on port 7000, and both nodes have
>> the other node in their config, it should work.
>>
>> Dave Viner
>>
>>
>> On Wed, Feb 23, 2011 at 1:43 AM, Himanshi Sharma < *himanshi.sharma@tcs.com
>> * <hi...@tcs.com>> wrote:
>>
>> Ya they do. Have specified Public DNS in seed field of each node in
>> Cassandra.yaml...nt able to figure out what the problem is ???
>>
>>
>>
>>   From: Sasha Dolgy < *sdolgy@gmail.com * <sd...@gmail.com>>  To: *user@cassandra.apache.org
>> * <us...@cassandra.apache.org> Date: 02/23/2011 02:56 PM  Subject: Re:
>> Cassandra nodes on EC2 in two different regions not communicating
>>
>> ------------------------------
>>
>>
>>
>> did you define the other host in the cassandra.yaml ?  on both servers
>> .... they need to know about each other
>>
>> On Wed, Feb 23, 2011 at 10:16 AM, Himanshi Sharma < *himanshi.sharma@tcs.com
>> * <hi...@tcs.com>> wrote:
>>
>> Thanks Dave but I am able to telnet to other instances on port 7000
>> and when i run  ./nodetool --host *ec2-50-18-60-117.us-west-1.compute.amazonaws.com
>> * <http://ec2-50-18-60-117.us-west-1.compute.amazonaws.com/> ring... I
>> can see only one node.
>>
>> Do we need to configure anything else in Cassandra.yaml or
>> Cassandra-env.sh ???
>>
>>
>>
>>
>>
>>   From: Dave Viner < *daveviner@gmail.com * <da...@gmail.com>>  To: *user@cassandra.apache.org
>> * <us...@cassandra.apache.org> Cc: Himanshi Sharma < *himanshi.sharma@tcs.com
>> * <hi...@tcs.com>>  Date: 02/23/2011 11:36 AM  Subject: Re:
>> Cassandra nodes on EC2 in two different regions not communicating
>>
>>
>> ------------------------------
>>
>>
>>
>> If you login to one of the nodes, can you telnet to port 7000 on the other
>> node?
>>
>> If not, then almost certainly it's a firewall/Security Group issue.
>>
>> You can find out the security groups for any node by logging in, and then
>> running:
>>
>> % curl " *http://169.254.169.254/latest/meta-data/security-groups *<http://169.254.169.254/latest/meta-data/security-groups>"
>>
>>
>> Assuming that both nodes are in the same security group, ensure that the
>> SG is configured to allow other members of the SG to communicate on port
>> 7000 to each other.
>>
>> HTH,
>> Dave Viner
>>
>>
>> On Tue, Feb 22, 2011 at 8:59 PM, Himanshi Sharma < *himanshi.sharma@tcs.com
>> * <hi...@tcs.com>> wrote:
>>
>> Hi,
>>
>> I am new to Cassandra. I m running Cassandra on EC2. I configured
>> Cassandra cluster on two instances in different regions.
>> But when I am trying the nodetool command with ring option, I am getting
>> only single node.
>>
>> How to make these two nodes communicate with each other. I have already
>> opened required ports. i.e 7000, 8080, 9160 in respective
>> security groups. Plz help me with this.
>>
>> Regards,
>> Himanshi Sharma
>>
>>
>> =====-----=====-----=====
>> Notice: The information contained in this e-mail
>> message and/or attachments to it may contain
>> confidential or privileged information. If you are
>>
>> not the intended recipient, any dissemination, use,
>> review, distribution, printing or copying of the
>> information contained in this e-mail message
>> and/or attachments to it are strictly prohibited. If
>> you have received this communication in error,
>>
>> please notify us by reply e-mail or telephone and
>> immediately and permanently delete the message
>> and any attachments. Thank you
>>
>>
>>
>>
>> =====-----=====-----=====
>>
>>
>> Notice: The information contained in this e-mail
>> message and/or attachments to it may contain
>> confidential or privileged information. If you are
>> not the intended recipient, any dissemination, use,
>> review, distribution, printing or copying of the
>>
>>
>> information contained in this e-mail message
>> and/or attachments to it are strictly prohibited. If
>> you have received this communication in error,
>> please notify us by reply e-mail or telephone and
>> immediately and permanently delete the message
>>
>>
>> and any attachments. Thank you
>>
>>
>>
>>
>>
>> --
>> Sasha Dolgy *
>> **sasha.dolgy@gmail.com * <sa...@gmail.com>
>>
>> =====-----=====-----=====
>> Notice: The information contained in this e-mail
>> message and/or attachments to it may contain
>> confidential or privileged information. If you are
>>
>>
>>
>> not the intended recipient, any dissemination, use,
>> review, distribution, printing or copying of the
>> information contained in this e-mail message
>> and/or attachments to it are strictly prohibited. If
>> you have received this communication in error,
>>
>>
>>
>> please notify us by reply e-mail or telephone and
>> immediately and permanently delete the message
>> and any attachments. Thank you
>>
>>
>>
>>
>>
>>
>> --
>> Frank LoVecchio
>> Senior Software Engineer | Isidorey, LLC
>> Google Voice +1.720.295.9179
>> *isidorey.com * <http://isidorey.com/>| *facebook.com/franklovecchio *<http://facebook.com/franklovecchio>|
>> *franklovecchio.com * <http://franklovecchio.com/>
>>
>>
>>
>> =====-----=====-----=====
>> Notice: The information contained in this e-mail
>> message and/or attachments to it may contain
>> confidential or privileged information. If you are
>>
>> not the intended recipient, any dissemination, use,
>> review, distribution, printing or copying of the
>> information contained in this e-mail message
>> and/or attachments to it are strictly prohibited. If
>> you have received this communication in error,
>>
>> please notify us by reply e-mail or telephone and
>> immediately and permanently delete the message
>> and any attachments. Thank you
>>
>>
>>
> =====-----=====-----=====
> Notice: The information contained in this e-mail
> message and/or attachments to it may contain
> confidential or privileged information. If you are
> not the intended recipient, any dissemination, use,
> review, distribution, printing or copying of the
> information contained in this e-mail message
> and/or attachments to it are strictly prohibited. If
> you have received this communication in error,
> please notify us by reply e-mail or telephone and
> immediately and permanently delete the message
> and any attachments. Thank you
>
>
>

Re: Cassandra nodes on EC2 in two different regions not communicating

Posted by Dave Viner <da...@gmail.com>.
That looks like it's not an issue of communicating between nodes.  It
appears that the node can not bind to the address on the localhost that
you're asking for.

"java.net.BindException: Cannot assign requested address "

I think the issue is that the Elastic IP address is not actually an IP
address that's on the localhost.  So the daemon can not bind to that IP.
 Instead of using the EIP, use the local IP address for the rpc_address (i
think that's what you need since that is what Thrift will bind to).  Then
for the listen_address should be the ip address that is routable from the
other node.  I would first try with the actual public IP address (not the
Elastic IP).  Once you get that to work, then shutdown the cluster, change
the listen_address to the EIP, boot up and try again.

Dave Viner


On Wed, Feb 23, 2011 at 8:54 PM, Himanshi Sharma <hi...@tcs.com>wrote:

>
> Hey Dave,
>
> Sorry i forgot to mention the Non-seed configuration.
>
> for first node in us-west its as below....i.e its own elastic ip
>
> listen_address: 50.18.60.117
> rpc_address: 50.18.60.117
>
> and for second node in ap-southeast-1 its as below....i.e again its own
> elastic ip
>
> listen_address: 175.41.143.192
> rpc_address: 175.41.143.192
>
> Thanks,
> Himanshi
>
>
>
>
>
>  From:
> Dave Viner <da...@gmail.com>
> To: user@cassandra.apache.org Date: 02/23/2011 11:01 PM Subject: Re:
> Cassandra nodes on EC2 in two different regions not communicating
> ------------------------------
>
>
>
> internal EC2 ips (10.xxx.xxx.xxx) work across availability zones (e.g.,
> from us-east-1a to us-east-1b) but do not work across regions (e.g., us-east
> to us-west).  To do regions, you must use the public ip address assigned by
> amazon.
>
> Himanshi, when you log into 1 node, and telnet to port 7000 on the other
> node, which IP address did you use - the 10.x address or the public ip
> address?
> And what is the seed/non-seed configuration in both cassandra.yaml files?
>
> Dave Viner
>
>
> On Wed, Feb 23, 2011 at 8:12 AM, Frank LoVecchio <*f...@isidorey.com>>
> wrote:
> The internal Amazon IP address is what you will want to use so you don't
> have to go through DNS anyways; not sure if this works from US-East to
> US-West, but it does make things quicker in between zones, e.g. us-east-1a
> to us-east-1b.
>
>
> On Wed, Feb 23, 2011 at 9:09 AM, Dave Viner <*d...@gmail.com>>
> wrote:
> Try using the IP address, not the dns name in the cassandra.yaml.
>
> If you can telnet from one to the other on port 7000, and both nodes have
> the other node in their config, it should work.
>
> Dave Viner
>
>
> On Wed, Feb 23, 2011 at 1:43 AM, Himanshi Sharma <*himanshi.sharma@tcs.com
> * <hi...@tcs.com>> wrote:
>
> Ya they do. Have specified Public DNS in seed field of each node in
> Cassandra.yaml...nt able to figure out what the problem is ???
>
>
>
>   From: Sasha Dolgy <*sdolgy@gmail.com* <sd...@gmail.com>>  To: *
> user@cassandra.apache.org* <us...@cassandra.apache.org>  Date: 02/23/2011
> 02:56 PM  Subject: Re: Cassandra nodes on EC2 in two different regions not
> communicating
>
>  ------------------------------
>
>
>
> did you define the other host in the cassandra.yaml ?  on both servers ....
> they need to know about each other
>
> On Wed, Feb 23, 2011 at 10:16 AM, Himanshi Sharma <*
> himanshi.sharma@tcs.com* <hi...@tcs.com>> wrote:
>
> Thanks Dave but I am able to telnet to other instances on port 7000
> and when i run  ./nodetool --host *
> ec2-50-18-60-117.us-west-1.compute.amazonaws.com*<http://ec2-50-18-60-117.us-west-1.compute.amazonaws.com/> ring... I can see only one node.
>
> Do we need to configure anything else in Cassandra.yaml or Cassandra-env.sh
> ???
>
>
>
>
>
>   From: Dave Viner <*daveviner@gmail.com* <da...@gmail.com>>  To: *
> user@cassandra.apache.org* <us...@cassandra.apache.org>  Cc: Himanshi
> Sharma <*himanshi.sharma@tcs.com* <hi...@tcs.com>>  Date: 02/23/2011
> 11:36 AM  Subject: Re: Cassandra nodes on EC2 in two different regions not
> communicating
>
>
>  ------------------------------
>
>
>
> If you login to one of the nodes, can you telnet to port 7000 on the other
> node?
>
> If not, then almost certainly it's a firewall/Security Group issue.
>
> You can find out the security groups for any node by logging in, and then
> running:
>
> % curl "*http://169.254.169.254/latest/meta-data/security-groups*<http://169.254.169.254/latest/meta-data/security-groups>"
>
>
> Assuming that both nodes are in the same security group, ensure that the SG
> is configured to allow other members of the SG to communicate on port 7000
> to each other.
>
> HTH,
> Dave Viner
>
>
> On Tue, Feb 22, 2011 at 8:59 PM, Himanshi Sharma <*himanshi.sharma@tcs.com
> * <hi...@tcs.com>> wrote:
>
> Hi,
>
> I am new to Cassandra. I m running Cassandra on EC2. I configured Cassandra
> cluster on two instances in different regions.
> But when I am trying the nodetool command with ring option, I am getting
> only single node.
>
> How to make these two nodes communicate with each other. I have already
> opened required ports. i.e 7000, 8080, 9160 in respective
> security groups. Plz help me with this.
>
> Regards,
> Himanshi Sharma
>
>
> =====-----=====-----=====
> Notice: The information contained in this e-mail
> message and/or attachments to it may contain
> confidential or privileged information. If you are
>
> not the intended recipient, any dissemination, use,
> review, distribution, printing or copying of the
> information contained in this e-mail message
> and/or attachments to it are strictly prohibited. If
> you have received this communication in error,
>
> please notify us by reply e-mail or telephone and
> immediately and permanently delete the message
> and any attachments. Thank you
>
>
>
>
> =====-----=====-----=====
>
>
> Notice: The information contained in this e-mail
> message and/or attachments to it may contain
> confidential or privileged information. If you are
> not the intended recipient, any dissemination, use,
> review, distribution, printing or copying of the
>
>
> information contained in this e-mail message
> and/or attachments to it are strictly prohibited. If
> you have received this communication in error,
> please notify us by reply e-mail or telephone and
> immediately and permanently delete the message
>
>
> and any attachments. Thank you
>
>
>
>
>
> --
> Sasha Dolgy*
> **sasha.dolgy@gmail.com* <sa...@gmail.com>
>
> =====-----=====-----=====
> Notice: The information contained in this e-mail
> message and/or attachments to it may contain
> confidential or privileged information. If you are
>
>
>
> not the intended recipient, any dissemination, use,
> review, distribution, printing or copying of the
> information contained in this e-mail message
> and/or attachments to it are strictly prohibited. If
> you have received this communication in error,
>
>
>
> please notify us by reply e-mail or telephone and
> immediately and permanently delete the message
> and any attachments. Thank you
>
>
>
>
>
>
> --
> Frank LoVecchio
> Senior Software Engineer | Isidorey, LLC
> Google Voice +1.720.295.9179
> *isidorey.com* <http://isidorey.com/> | *facebook.com/franklovecchio*<http://facebook.com/franklovecchio>|
> *franklovecchio.com* <http://franklovecchio.com/>
>
>
>
> =====-----=====-----=====
> Notice: The information contained in this e-mail
> message and/or attachments to it may contain
> confidential or privileged information. If you are
> not the intended recipient, any dissemination, use,
> review, distribution, printing or copying of the
> information contained in this e-mail message
> and/or attachments to it are strictly prohibited. If
> you have received this communication in error,
> please notify us by reply e-mail or telephone and
> immediately and permanently delete the message
> and any attachments. Thank you
>
>
>

Re: Cassandra nodes on EC2 in two different regions not communicating

Posted by Himanshi Sharma <hi...@tcs.com>.
Hey Dave,

Sorry i forgot to mention the Non-seed configuration.

for first node in us-west its as below....i.e its own elastic ip

listen_address: 50.18.60.117
rpc_address: 50.18.60.117

and for second node in ap-southeast-1 its as below....i.e again its own 
elastic ip

listen_address: 175.41.143.192
rpc_address: 175.41.143.192

Thanks,
Himanshi






From:
Dave Viner <da...@gmail.com>
To:
user@cassandra.apache.org
Date:
02/23/2011 11:01 PM
Subject:
Re: Cassandra nodes on EC2 in two different regions not communicating



internal EC2 ips (10.xxx.xxx.xxx) work across availability zones (e.g., 
from us-east-1a to us-east-1b) but do not work across regions (e.g., 
us-east to us-west).  To do regions, you must use the public ip address 
assigned by amazon.

Himanshi, when you log into 1 node, and telnet to port 7000 on the other 
node, which IP address did you use - the 10.x address or the public ip 
address?
And what is the seed/non-seed configuration in both cassandra.yaml files?

Dave Viner


On Wed, Feb 23, 2011 at 8:12 AM, Frank LoVecchio <fr...@isidorey.com> 
wrote:
The internal Amazon IP address is what you will want to use so you don't 
have to go through DNS anyways; not sure if this works from US-East to 
US-West, but it does make things quicker in between zones, e.g. us-east-1a 
to us-east-1b.


On Wed, Feb 23, 2011 at 9:09 AM, Dave Viner <da...@gmail.com> wrote:
Try using the IP address, not the dns name in the cassandra.yaml.

If you can telnet from one to the other on port 7000, and both nodes have 
the other node in their config, it should work.

Dave Viner


On Wed, Feb 23, 2011 at 1:43 AM, Himanshi Sharma <hi...@tcs.com> 
wrote:

Ya they do. Have specified Public DNS in seed field of each node in 
Cassandra.yaml...nt able to figure out what the problem is ??? 




From: 
Sasha Dolgy <sd...@gmail.com> 
To: 
user@cassandra.apache.org 
Date: 
02/23/2011 02:56 PM 
Subject: 
Re: Cassandra nodes on EC2 in two different regions not communicating




did you define the other host in the cassandra.yaml ?  on both servers 
.... they need to know about each other 

On Wed, Feb 23, 2011 at 10:16 AM, Himanshi Sharma <himanshi.sharma@tcs.com
> wrote: 

Thanks Dave but I am able to telnet to other instances on port 7000 
and when i run  ./nodetool --host 
ec2-50-18-60-117.us-west-1.compute.amazonaws.com  ring... I can see only 
one node. 

Do we need to configure anything else in Cassandra.yaml or 
Cassandra-env.sh ??? 






From: 
Dave Viner <da...@gmail.com> 
To: 
user@cassandra.apache.org 
Cc: 
Himanshi Sharma <hi...@tcs.com> 
Date: 
02/23/2011 11:36 AM 
Subject: 
Re: Cassandra nodes on EC2 in two different regions not communicating





If you login to one of the nodes, can you telnet to port 7000 on the other 
node? 

If not, then almost certainly it's a firewall/Security Group issue. 

You can find out the security groups for any node by logging in, and then 
running: 

% curl "http://169.254.169.254/latest/meta-data/security-groups" 

Assuming that both nodes are in the same security group, ensure that the 
SG is configured to allow other members of the SG to communicate on port 
7000 to each other. 

HTH, 
Dave Viner 


On Tue, Feb 22, 2011 at 8:59 PM, Himanshi Sharma <hi...@tcs.com> 
wrote: 

Hi, 

I am new to Cassandra. I m running Cassandra on EC2. I configured 
Cassandra cluster on two instances in different regions. 
But when I am trying the nodetool command with ring option, I am getting 
only single node. 

How to make these two nodes communicate with each other. I have already 
opened required ports. i.e 7000, 8080, 9160 in respective 
security groups. Plz help me with this. 

Regards, 
Himanshi Sharma 


=====-----=====-----=====
Notice: The information contained in this e-mail
message and/or attachments to it may contain 
confidential or privileged information. If you are 

not the intended recipient, any dissemination, use, 
review, distribution, printing or copying of the 
information contained in this e-mail message 
and/or attachments to it are strictly prohibited. If 
you have received this communication in error, 

please notify us by reply e-mail or telephone and 
immediately and permanently delete the message 
and any attachments. Thank you




=====-----=====-----=====


Notice: The information contained in this e-mail
message and/or attachments to it may contain 
confidential or privileged information. If you are 
not the intended recipient, any dissemination, use, 
review, distribution, printing or copying of the 


information contained in this e-mail message 
and/or attachments to it are strictly prohibited. If 
you have received this communication in error, 
please notify us by reply e-mail or telephone and 
immediately and permanently delete the message 


and any attachments. Thank you





-- 
Sasha Dolgy
sasha.dolgy@gmail.com 

=====-----=====-----=====
Notice: The information contained in this e-mail
message and/or attachments to it may contain 
confidential or privileged information. If you are 



not the intended recipient, any dissemination, use, 
review, distribution, printing or copying of the 
information contained in this e-mail message 
and/or attachments to it are strictly prohibited. If 
you have received this communication in error, 



please notify us by reply e-mail or telephone and 
immediately and permanently delete the message 
and any attachments. Thank you






-- 
Frank LoVecchio
Senior Software Engineer | Isidorey, LLC
Google Voice +1.720.295.9179
isidorey.com | facebook.com/franklovecchio | franklovecchio.com



=====-----=====-----=====
Notice: The information contained in this e-mail
message and/or attachments to it may contain 
confidential or privileged information. If you are 
not the intended recipient, any dissemination, use, 
review, distribution, printing or copying of the 
information contained in this e-mail message 
and/or attachments to it are strictly prohibited. If 
you have received this communication in error, 
please notify us by reply e-mail or telephone and 
immediately and permanently delete the message 
and any attachments. Thank you



Re: Cassandra nodes on EC2 in two different regions not communicating

Posted by Peter Fales <Pe...@alcatel-lucent.com>.
I posted on this topic last September.   (See
http://www.mail-archive.com/user@cassandra.apache.org/msg05692.html)

I was able to use Cassandra across EC2regions.  However, the trick is 
that you have must use the "external" addresses in your storage-conf.xml, 
but since you don't have a NIC that can actually bind to those addresses, you
need to listen on the "internal" addresses (or, more simply, all interfaces)

At the time, I was  not able to get the cross-region cluster to work
without making changes to the Cassandra code.  Perhaps things have
evolved so that there are other ways to do it now.

On Wed, Feb 23, 2011 at 11:31:05AM -0600, Dave Viner wrote:
> 
>    internal EC2 ips (10.xxx.xxx.xxx) work across availability zones
>    (e.g., from us-east-1a to us-east-1b) but do not work across regions
>    (e.g., us-east to us-west).  To do regions, you must use the public ip
>    address assigned by amazon.
> 
>    Himanshi, when you log into 1 node, and telnet to port 7000 on the
>    other node, which IP address did you use - the 10.x address or the
>    public ip address?
> 
>    And what is the seed/non-seed configuration in both cassandra.yaml
>    files?
> 
>    Dave Viner
> 
>    On Wed, Feb 23, 2011 at 8:12 AM, Frank LoVecchio
>    <[1...@isidorey.com> wrote:
> 
>      The internal Amazon IP address is what you will want to use so you
>      don't have to go through DNS anyways; not sure if this works from
>      US-East to US-West, but it does make things quicker in between
>      zones, e.g. us-east-1a to us-east-1b.
> 
>    On Wed, Feb 23, 2011 at 9:09 AM, Dave Viner <[2...@gmail.com>
>    wrote:
> 
>      Try using the IP address, not the dns name in the cassandra.yaml.
> 
>    If you can telnet from one to the other on port 7000, and both nodes
>    have the other node in their config, it should work.
> 
>    Dave Viner
> 
>    On Wed, Feb 23, 2011 at 1:43 AM, Himanshi Sharma
>    <[3...@tcs.com> wrote:
> 
>      Ya they do. Have specified Public DNS in seed field of each node in
>      Cassandra.yaml...nt able to figure out what the problem is ???
> 
>    From: Sasha Dolgy <[4...@gmail.com>
>    To: [5]user@cassandra.apache.org
>    Date: 02/23/2011 02:56 PM
>    Subject: Re: Cassandra nodes on EC2 in two different regions not
>    communicating
>        ______________________________________________________________
> 
>      did you define the other host in the cassandra.yaml ?  on both
>      servers .... they need to know about each other
>      On Wed, Feb 23, 2011 at 10:16 AM, Himanshi Sharma
>      <[6...@tcs.com> wrote:
>      Thanks Dave but I am able to telnet to other instances on port 7000
>      and when i run  ./nodetool --host
>      [7]ec2-50-18-60-117.us-west-1.compute.amazonaws.com  ring... I can
>      see only one node.
>      Do we need to configure anything else in Cassandra.yaml or
>      Cassandra-env.sh ???
> 
>    From: Dave Viner <[8...@gmail.com>
>    To: [9]user@cassandra.apache.org
>    Cc: Himanshi Sharma <[1...@tcs.com>
>    Date: 02/23/2011 11:36 AM
>    Subject: Re: Cassandra nodes on EC2 in two different regions not
>    communicating
>        ______________________________________________________________
> 
>      If you login to one of the nodes, can you telnet to port 7000 on
>      the other node?
>      If not, then almost certainly it's a firewall/Security Group issue.
>      You can find out the security groups for any node by logging in,
>      and then running:
>      % curl
>      "[11]http://169.254.169.254/latest/meta-data/security-groups"
>      Assuming that both nodes are in the same security group, ensure
>      that the SG is configured to allow other members of the SG to
>      communicate on port 7000 to each other.
>      HTH,
>      Dave Viner
>      On Tue, Feb 22, 2011 at 8:59 PM, Himanshi Sharma
>      <[1...@tcs.com> wrote:
>      Hi,
>      I am new to Cassandra. I m running Cassandra on EC2. I configured
>      Cassandra cluster on two instances in different regions.
>      But when I am trying the nodetool command with ring option, I am
>      getting only single node.
>      How to make these two nodes communicate with each other. I have
>      already opened required ports. i.e 7000, 8080, 9160 in respective
>      security groups. Plz help me with this.
>      Regards,
>      Himanshi Sharma
>      =====-----=====-----=====
>      Notice: The information contained in this e-mail
>      message and/or attachments to it may contain
>      confidential or privileged information. If you are
>      not the intended recipient, any dissemination, use,
>      review, distribution, printing or copying of the
>      information contained in this e-mail message
>      and/or attachments to it are strictly prohibited. If
>      you have received this communication in error,
>      please notify us by reply e-mail or telephone and
>      immediately and permanently delete the message
>      and any attachments. Thank you
>      =====-----=====-----=====
>      Notice: The information contained in this e-mail
>      message and/or attachments to it may contain
>      confidential or privileged information. If you are
>      not the intended recipient, any dissemination, use,
>      review, distribution, printing or copying of the
>      information contained in this e-mail message
>      and/or attachments to it are strictly prohibited. If
>      you have received this communication in error,
>      please notify us by reply e-mail or telephone and
>      immediately and permanently delete the message
>      and any attachments. Thank you
>      --
>      Sasha Dolgy
>      [13]sasha.dolgy@gmail.com
> =====-----=====-----=====
> Notice: The information contained in this e-mail
> message and/or attachments to it may contain
> confidential or privileged information. If you are
> 
> 
> 
> not the intended recipient, any dissemination, use,
> review, distribution, printing or copying of the
> information contained in this e-mail message
> and/or attachments to it are strictly prohibited. If
> you have received this communication in error,
> 
> 
> 
> please notify us by reply e-mail or telephone and
> immediately and permanently delete the message
> and any attachments. Thank you
> 
>      --
> 
>    Frank LoVecchio
> 
>    Senior Software Engineer | Isidorey, LLC
> 
>    Google Voice +1.720.295.9179
> 
>    [14]isidorey.com | [15]facebook.com/franklovecchio |
>    [16]franklovecchio.com
> 
> References
> 
>    1. mailto:frank@isidorey.com
>    2. mailto:daveviner@gmail.com
>    3. mailto:himanshi.sharma@tcs.com
>    4. mailto:sdolgy@gmail.com
>    5. mailto:user@cassandra.apache.org
>    6. mailto:himanshi.sharma@tcs.com
>    7. http://ec2-50-18-60-117.us-west-1.compute.amazonaws.com/
>    8. mailto:daveviner@gmail.com
>    9. mailto:user@cassandra.apache.org
>   10. mailto:himanshi.sharma@tcs.com
>   11. http://169.254.169.254/latest/meta-data/security-groups
>   12. mailto:himanshi.sharma@tcs.com
>   13. mailto:sasha.dolgy@gmail.com
>   14. http://isidorey.com/
>   15. http://facebook.com/franklovecchio
>   16. http://franklovecchio.com/

-- 
Peter Fales
Alcatel-Lucent
Member of Technical Staff
1960 Lucent Lane
Room: 9H-505
Naperville, IL 60566-7033
Email: Peter.Fales@alcatel-lucent.com
Phone: 630 979 8031

Re: Cassandra nodes on EC2 in two different regions not communicating

Posted by Dave Viner <da...@gmail.com>.
internal EC2 ips (10.xxx.xxx.xxx) work across availability zones (e.g., from
us-east-1a to us-east-1b) but do not work across regions (e.g., us-east to
us-west).  To do regions, you must use the public ip address assigned by
amazon.

Himanshi, when you log into 1 node, and telnet to port 7000 on the other
node, which IP address did you use - the 10.x address or the public ip
address?
And what is the seed/non-seed configuration in both cassandra.yaml files?

Dave Viner


On Wed, Feb 23, 2011 at 8:12 AM, Frank LoVecchio <fr...@isidorey.com> wrote:

> The internal Amazon IP address is what you will want to use so you don't
> have to go through DNS anyways; not sure if this works from US-East to
> US-West, but it does make things quicker in between zones, e.g. us-east-1a
> to us-east-1b.
>
>
> On Wed, Feb 23, 2011 at 9:09 AM, Dave Viner <da...@gmail.com> wrote:
>
>> Try using the IP address, not the dns name in the cassandra.yaml.
>>
>> If you can telnet from one to the other on port 7000, and both nodes have
>> the other node in their config, it should work.
>>
>>  Dave Viner
>>
>>
>> On Wed, Feb 23, 2011 at 1:43 AM, Himanshi Sharma <himanshi.sharma@tcs.com
>> > wrote:
>>
>>>
>>> Ya they do. Have specified Public DNS in seed field of each node in
>>> Cassandra.yaml...nt able to figure out what the problem is ???
>>>
>>>
>>>
>>>
>>>  From: Sasha Dolgy <sd...@gmail.com> To: user@cassandra.apache.org
>>> Date: 02/23/2011 02:56 PM Subject: Re: Cassandra nodes on EC2 in two
>>> different regions not communicating
>>> ------------------------------
>>>
>>>
>>>
>>> did you define the other host in the cassandra.yaml ?  on both servers
>>> .... they need to know about each other
>>>
>>> On Wed, Feb 23, 2011 at 10:16 AM, Himanshi Sharma <*
>>> himanshi.sharma@tcs.com* <hi...@tcs.com>> wrote:
>>>
>>> Thanks Dave but I am able to telnet to other instances on port 7000
>>> and when i run  ./nodetool --host *
>>> ec2-50-18-60-117.us-west-1.compute.amazonaws.com*<http://ec2-50-18-60-117.us-west-1.compute.amazonaws.com/> ring... I can see only one node.
>>>
>>> Do we need to configure anything else in Cassandra.yaml or
>>> Cassandra-env.sh ???
>>>
>>>
>>>
>>>
>>>
>>>
>>>   From: Dave Viner <*daveviner@gmail.com* <da...@gmail.com>>  To: *
>>> user@cassandra.apache.org* <us...@cassandra.apache.org>  Cc: Himanshi
>>> Sharma <*himanshi.sharma@tcs.com* <hi...@tcs.com>>  Date: 02/23/2011
>>> 11:36 AM  Subject: Re: Cassandra nodes on EC2 in two different regions
>>> not communicating
>>>
>>>  ------------------------------
>>>
>>>
>>>
>>> If you login to one of the nodes, can you telnet to port 7000 on the
>>> other node?
>>>
>>> If not, then almost certainly it's a firewall/Security Group issue.
>>>
>>> You can find out the security groups for any node by logging in, and then
>>> running:
>>>
>>> % curl "*http://169.254.169.254/latest/meta-data/security-groups*<http://169.254.169.254/latest/meta-data/security-groups>"
>>>
>>>
>>> Assuming that both nodes are in the same security group, ensure that the
>>> SG is configured to allow other members of the SG to communicate on port
>>> 7000 to each other.
>>>
>>> HTH,
>>> Dave Viner
>>>
>>>
>>> On Tue, Feb 22, 2011 at 8:59 PM, Himanshi Sharma <*
>>> himanshi.sharma@tcs.com* <hi...@tcs.com>> wrote:
>>>
>>> Hi,
>>>
>>> I am new to Cassandra. I m running Cassandra on EC2. I configured
>>> Cassandra cluster on two instances in different regions.
>>> But when I am trying the nodetool command with ring option, I am getting
>>> only single node.
>>>
>>> How to make these two nodes communicate with each other. I have already
>>> opened required ports. i.e 7000, 8080, 9160 in respective
>>> security groups. Plz help me with this.
>>>
>>> Regards,
>>> Himanshi Sharma
>>>
>>>
>>> =====-----=====-----=====
>>> Notice: The information contained in this e-mail
>>> message and/or attachments to it may contain
>>> confidential or privileged information. If you are
>>>
>>> not the intended recipient, any dissemination, use,
>>> review, distribution, printing or copying of the
>>> information contained in this e-mail message
>>> and/or attachments to it are strictly prohibited. If
>>> you have received this communication in error,
>>>
>>> please notify us by reply e-mail or telephone and
>>> immediately and permanently delete the message
>>> and any attachments. Thank you
>>>
>>>
>>>
>>>
>>> =====-----=====-----=====
>>>
>>>
>>> Notice: The information contained in this e-mail
>>> message and/or attachments to it may contain
>>> confidential or privileged information. If you are
>>> not the intended recipient, any dissemination, use,
>>> review, distribution, printing or copying of the
>>>
>>>
>>> information contained in this e-mail message
>>> and/or attachments to it are strictly prohibited. If
>>> you have received this communication in error,
>>> please notify us by reply e-mail or telephone and
>>> immediately and permanently delete the message
>>>
>>>
>>> and any attachments. Thank you
>>>
>>>
>>>
>>>
>>>
>>> --
>>> Sasha Dolgy*
>>> **sasha.dolgy@gmail.com* <sa...@gmail.com>
>>>
>>> =====-----=====-----=====
>>> Notice: The information contained in this e-mail
>>> message and/or attachments to it may contain
>>> confidential or privileged information. If you are
>>>
>>>
>>> not the intended recipient, any dissemination, use,
>>> review, distribution, printing or copying of the
>>> information contained in this e-mail message
>>> and/or attachments to it are strictly prohibited. If
>>> you have received this communication in error,
>>>
>>>
>>> please notify us by reply e-mail or telephone and
>>> immediately and permanently delete the message
>>> and any attachments. Thank you
>>>
>>>
>>>
>>
>
>
> --
> Frank LoVecchio
> Senior Software Engineer | Isidorey, LLC
> Google Voice +1.720.295.9179
> isidorey.com | facebook.com/franklovecchio | franklovecchio.com
>
>

Re: Cassandra nodes on EC2 in two different regions not communicating

Posted by Frank LoVecchio <fr...@isidorey.com>.
The internal Amazon IP address is what you will want to use so you don't
have to go through DNS anyways; not sure if this works from US-East to
US-West, but it does make things quicker in between zones, e.g. us-east-1a
to us-east-1b.

On Wed, Feb 23, 2011 at 9:09 AM, Dave Viner <da...@gmail.com> wrote:

> Try using the IP address, not the dns name in the cassandra.yaml.
>
> If you can telnet from one to the other on port 7000, and both nodes have
> the other node in their config, it should work.
>
> Dave Viner
>
>
> On Wed, Feb 23, 2011 at 1:43 AM, Himanshi Sharma <hi...@tcs.com>wrote:
>
>>
>> Ya they do. Have specified Public DNS in seed field of each node in
>> Cassandra.yaml...nt able to figure out what the problem is ???
>>
>>
>>
>>
>>  From: Sasha Dolgy <sd...@gmail.com> To: user@cassandra.apache.org Date: 02/23/2011
>> 02:56 PM Subject: Re: Cassandra nodes on EC2 in two different regions not
>> communicating
>> ------------------------------
>>
>>
>>
>> did you define the other host in the cassandra.yaml ?  on both servers
>> .... they need to know about each other
>>
>> On Wed, Feb 23, 2011 at 10:16 AM, Himanshi Sharma <*
>> himanshi.sharma@tcs.com* <hi...@tcs.com>> wrote:
>>
>> Thanks Dave but I am able to telnet to other instances on port 7000
>> and when i run  ./nodetool --host *
>> ec2-50-18-60-117.us-west-1.compute.amazonaws.com*<http://ec2-50-18-60-117.us-west-1.compute.amazonaws.com/> ring... I can see only one node.
>>
>> Do we need to configure anything else in Cassandra.yaml or
>> Cassandra-env.sh ???
>>
>>
>>
>>
>>
>>
>>   From: Dave Viner <*daveviner@gmail.com* <da...@gmail.com>>  To: *
>> user@cassandra.apache.org* <us...@cassandra.apache.org>  Cc: Himanshi
>> Sharma <*himanshi.sharma@tcs.com* <hi...@tcs.com>>  Date: 02/23/2011
>> 11:36 AM  Subject: Re: Cassandra nodes on EC2 in two different regions
>> not communicating
>>
>>  ------------------------------
>>
>>
>>
>> If you login to one of the nodes, can you telnet to port 7000 on the other
>> node?
>>
>> If not, then almost certainly it's a firewall/Security Group issue.
>>
>> You can find out the security groups for any node by logging in, and then
>> running:
>>
>> % curl "*http://169.254.169.254/latest/meta-data/security-groups*<http://169.254.169.254/latest/meta-data/security-groups>"
>>
>>
>> Assuming that both nodes are in the same security group, ensure that the
>> SG is configured to allow other members of the SG to communicate on port
>> 7000 to each other.
>>
>> HTH,
>> Dave Viner
>>
>>
>> On Tue, Feb 22, 2011 at 8:59 PM, Himanshi Sharma <*
>> himanshi.sharma@tcs.com* <hi...@tcs.com>> wrote:
>>
>> Hi,
>>
>> I am new to Cassandra. I m running Cassandra on EC2. I configured
>> Cassandra cluster on two instances in different regions.
>> But when I am trying the nodetool command with ring option, I am getting
>> only single node.
>>
>> How to make these two nodes communicate with each other. I have already
>> opened required ports. i.e 7000, 8080, 9160 in respective
>> security groups. Plz help me with this.
>>
>> Regards,
>> Himanshi Sharma
>>
>>
>> =====-----=====-----=====
>> Notice: The information contained in this e-mail
>> message and/or attachments to it may contain
>> confidential or privileged information. If you are
>>
>> not the intended recipient, any dissemination, use,
>> review, distribution, printing or copying of the
>> information contained in this e-mail message
>> and/or attachments to it are strictly prohibited. If
>> you have received this communication in error,
>>
>> please notify us by reply e-mail or telephone and
>> immediately and permanently delete the message
>> and any attachments. Thank you
>>
>>
>>
>>
>> =====-----=====-----=====
>>
>>
>> Notice: The information contained in this e-mail
>> message and/or attachments to it may contain
>> confidential or privileged information. If you are
>> not the intended recipient, any dissemination, use,
>> review, distribution, printing or copying of the
>>
>>
>> information contained in this e-mail message
>> and/or attachments to it are strictly prohibited. If
>> you have received this communication in error,
>> please notify us by reply e-mail or telephone and
>> immediately and permanently delete the message
>>
>>
>> and any attachments. Thank you
>>
>>
>>
>>
>>
>> --
>> Sasha Dolgy*
>> **sasha.dolgy@gmail.com* <sa...@gmail.com>
>>
>> =====-----=====-----=====
>> Notice: The information contained in this e-mail
>> message and/or attachments to it may contain
>> confidential or privileged information. If you are
>>
>> not the intended recipient, any dissemination, use,
>> review, distribution, printing or copying of the
>> information contained in this e-mail message
>> and/or attachments to it are strictly prohibited. If
>> you have received this communication in error,
>>
>> please notify us by reply e-mail or telephone and
>> immediately and permanently delete the message
>> and any attachments. Thank you
>>
>>
>>
>


-- 
Frank LoVecchio
Senior Software Engineer | Isidorey, LLC
Google Voice +1.720.295.9179
isidorey.com | facebook.com/franklovecchio | franklovecchio.com

Re: Cassandra nodes on EC2 in two different regions not communicating

Posted by Dave Viner <da...@gmail.com>.
Try using the IP address, not the dns name in the cassandra.yaml.

If you can telnet from one to the other on port 7000, and both nodes have
the other node in their config, it should work.

Dave Viner


On Wed, Feb 23, 2011 at 1:43 AM, Himanshi Sharma <hi...@tcs.com>wrote:

>
> Ya they do. Have specified Public DNS in seed field of each node in
> Cassandra.yaml...nt able to figure out what the problem is ???
>
>
>
>
>  From: Sasha Dolgy <sd...@gmail.com> To: user@cassandra.apache.org Date: 02/23/2011
> 02:56 PM Subject: Re: Cassandra nodes on EC2 in two different regions not
> communicating
> ------------------------------
>
>
>
> did you define the other host in the cassandra.yaml ?  on both servers ....
> they need to know about each other
>
> On Wed, Feb 23, 2011 at 10:16 AM, Himanshi Sharma <*
> himanshi.sharma@tcs.com* <hi...@tcs.com>> wrote:
>
> Thanks Dave but I am able to telnet to other instances on port 7000
> and when i run  ./nodetool --host *
> ec2-50-18-60-117.us-west-1.compute.amazonaws.com*<http://ec2-50-18-60-117.us-west-1.compute.amazonaws.com/> ring... I can see only one node.
>
> Do we need to configure anything else in Cassandra.yaml or Cassandra-env.sh
> ???
>
>
>
>
>
>
>   From: Dave Viner <*daveviner@gmail.com* <da...@gmail.com>>  To: *
> user@cassandra.apache.org* <us...@cassandra.apache.org>  Cc: Himanshi
> Sharma <*himanshi.sharma@tcs.com* <hi...@tcs.com>>  Date: 02/23/2011
> 11:36 AM  Subject: Re: Cassandra nodes on EC2 in two different regions not
> communicating
>
>  ------------------------------
>
>
>
> If you login to one of the nodes, can you telnet to port 7000 on the other
> node?
>
> If not, then almost certainly it's a firewall/Security Group issue.
>
> You can find out the security groups for any node by logging in, and then
> running:
>
> % curl "*http://169.254.169.254/latest/meta-data/security-groups*<http://169.254.169.254/latest/meta-data/security-groups>"
>
>
> Assuming that both nodes are in the same security group, ensure that the SG
> is configured to allow other members of the SG to communicate on port 7000
> to each other.
>
> HTH,
> Dave Viner
>
>
> On Tue, Feb 22, 2011 at 8:59 PM, Himanshi Sharma <*himanshi.sharma@tcs.com
> * <hi...@tcs.com>> wrote:
>
> Hi,
>
> I am new to Cassandra. I m running Cassandra on EC2. I configured Cassandra
> cluster on two instances in different regions.
> But when I am trying the nodetool command with ring option, I am getting
> only single node.
>
> How to make these two nodes communicate with each other. I have already
> opened required ports. i.e 7000, 8080, 9160 in respective
> security groups. Plz help me with this.
>
> Regards,
> Himanshi Sharma
>
>
> =====-----=====-----=====
> Notice: The information contained in this e-mail
> message and/or attachments to it may contain
> confidential or privileged information. If you are
>
> not the intended recipient, any dissemination, use,
> review, distribution, printing or copying of the
> information contained in this e-mail message
> and/or attachments to it are strictly prohibited. If
> you have received this communication in error,
>
> please notify us by reply e-mail or telephone and
> immediately and permanently delete the message
> and any attachments. Thank you
>
>
>
>
> =====-----=====-----=====
>
>
> Notice: The information contained in this e-mail
> message and/or attachments to it may contain
> confidential or privileged information. If you are
> not the intended recipient, any dissemination, use,
> review, distribution, printing or copying of the
>
>
> information contained in this e-mail message
> and/or attachments to it are strictly prohibited. If
> you have received this communication in error,
> please notify us by reply e-mail or telephone and
> immediately and permanently delete the message
>
>
> and any attachments. Thank you
>
>
>
>
>
> --
> Sasha Dolgy*
> **sasha.dolgy@gmail.com* <sa...@gmail.com>
>
> =====-----=====-----=====
> Notice: The information contained in this e-mail
> message and/or attachments to it may contain
> confidential or privileged information. If you are
> not the intended recipient, any dissemination, use,
> review, distribution, printing or copying of the
> information contained in this e-mail message
> and/or attachments to it are strictly prohibited. If
> you have received this communication in error,
> please notify us by reply e-mail or telephone and
> immediately and permanently delete the message
> and any attachments. Thank you
>
>
>

Re: Cassandra nodes on EC2 in two different regions not communicating

Posted by Himanshi Sharma <hi...@tcs.com>.
Ya they do. Have specified Public DNS in seed field of each node in 
Cassandra.yaml...nt able to figure out what the problem is ???





From:
Sasha Dolgy <sd...@gmail.com>
To:
user@cassandra.apache.org
Date:
02/23/2011 02:56 PM
Subject:
Re: Cassandra nodes on EC2 in two different regions not communicating



did you define the other host in the cassandra.yaml ?  on both servers 
.... they need to know about each other 

On Wed, Feb 23, 2011 at 10:16 AM, Himanshi Sharma <himanshi.sharma@tcs.com
> wrote:

Thanks Dave but I am able to telnet to other instances on port 7000 
and when i run  ./nodetool --host 
ec2-50-18-60-117.us-west-1.compute.amazonaws.com  ring... I can see only 
one node. 

Do we need to configure anything else in Cassandra.yaml or 
Cassandra-env.sh ??? 







From: 
Dave Viner <da...@gmail.com> 
To: 
user@cassandra.apache.org 
Cc: 
Himanshi Sharma <hi...@tcs.com> 
Date: 
02/23/2011 11:36 AM 
Subject: 
Re: Cassandra nodes on EC2 in two different regions not communicating




If you login to one of the nodes, can you telnet to port 7000 on the other 
node? 

If not, then almost certainly it's a firewall/Security Group issue. 

You can find out the security groups for any node by logging in, and then 
running: 

% curl "http://169.254.169.254/latest/meta-data/security-groups" 

Assuming that both nodes are in the same security group, ensure that the 
SG is configured to allow other members of the SG to communicate on port 
7000 to each other. 

HTH, 
Dave Viner 


On Tue, Feb 22, 2011 at 8:59 PM, Himanshi Sharma <hi...@tcs.com> 
wrote: 

Hi, 

I am new to Cassandra. I m running Cassandra on EC2. I configured 
Cassandra cluster on two instances in different regions. 
But when I am trying the nodetool command with ring option, I am getting 
only single node. 

How to make these two nodes communicate with each other. I have already 
opened required ports. i.e 7000, 8080, 9160 in respective 
security groups. Plz help me with this. 

Regards, 
Himanshi Sharma 


=====-----=====-----=====
Notice: The information contained in this e-mail
message and/or attachments to it may contain 
confidential or privileged information. If you are 

not the intended recipient, any dissemination, use, 
review, distribution, printing or copying of the 
information contained in this e-mail message 
and/or attachments to it are strictly prohibited. If 
you have received this communication in error, 

please notify us by reply e-mail or telephone and 
immediately and permanently delete the message 
and any attachments. Thank you




=====-----=====-----=====


Notice: The information contained in this e-mail
message and/or attachments to it may contain 
confidential or privileged information. If you are 
not the intended recipient, any dissemination, use, 
review, distribution, printing or copying of the 


information contained in this e-mail message 
and/or attachments to it are strictly prohibited. If 
you have received this communication in error, 
please notify us by reply e-mail or telephone and 
immediately and permanently delete the message 


and any attachments. Thank you





-- 
Sasha Dolgy
sasha.dolgy@gmail.com

=====-----=====-----=====
Notice: The information contained in this e-mail
message and/or attachments to it may contain 
confidential or privileged information. If you are 
not the intended recipient, any dissemination, use, 
review, distribution, printing or copying of the 
information contained in this e-mail message 
and/or attachments to it are strictly prohibited. If 
you have received this communication in error, 
please notify us by reply e-mail or telephone and 
immediately and permanently delete the message 
and any attachments. Thank you



Re: Cassandra nodes on EC2 in two different regions not communicating

Posted by Sasha Dolgy <sd...@gmail.com>.
did you define the other host in the cassandra.yaml ?  on both servers ....
they need to know about each other

On Wed, Feb 23, 2011 at 10:16 AM, Himanshi Sharma
<hi...@tcs.com>wrote:

>
> Thanks Dave but I am able to telnet to other instances on port 7000
> and when i run  ./nodetool --host
> ec2-50-18-60-117.us-west-1.compute.amazonaws.com  ring... I can see only
> one node.
>
> Do we need to configure anything else in Cassandra.yaml or Cassandra-env.sh
> ???
>
>
>
>
>
>
>
>   From: Dave Viner <da...@gmail.com> To: user@cassandra.apache.org Cc: Himanshi
> Sharma <hi...@tcs.com> Date: 02/23/2011 11:36 AM Subject: Re:
> Cassandra nodes on EC2 in two different regions not communicating
> ------------------------------
>
>
>
> If you login to one of the nodes, can you telnet to port 7000 on the other
> node?
>
> If not, then almost certainly it's a firewall/Security Group issue.
>
> You can find out the security groups for any node by logging in, and then
> running:
>
> % curl "*http://169.254.169.254/latest/meta-data/security-groups*<http://169.254.169.254/latest/meta-data/security-groups>
> "
>
> Assuming that both nodes are in the same security group, ensure that the SG
> is configured to allow other members of the SG to communicate on port 7000
> to each other.
>
> HTH,
> Dave Viner
>
>
> On Tue, Feb 22, 2011 at 8:59 PM, Himanshi Sharma <*himanshi.sharma@tcs.com
> * <hi...@tcs.com>> wrote:
>
> Hi,
>
> I am new to Cassandra. I m running Cassandra on EC2. I configured Cassandra
> cluster on two instances in different regions.
> But when I am trying the nodetool command with ring option, I am getting
> only single node.
>
> How to make these two nodes communicate with each other. I have already
> opened required ports. i.e 7000, 8080, 9160 in respective
> security groups. Plz help me with this.
>
> Regards,
> Himanshi Sharma
>
>
> =====-----=====-----=====
> Notice: The information contained in this e-mail
> message and/or attachments to it may contain
> confidential or privileged information. If you are
>
> not the intended recipient, any dissemination, use,
> review, distribution, printing or copying of the
> information contained in this e-mail message
> and/or attachments to it are strictly prohibited. If
> you have received this communication in error,
>
> please notify us by reply e-mail or telephone and
> immediately and permanently delete the message
> and any attachments. Thank you
>
>
>
>
> =====-----=====-----=====
>
> Notice: The information contained in this e-mail
> message and/or attachments to it may contain
> confidential or privileged information. If you are
> not the intended recipient, any dissemination, use,
> review, distribution, printing or copying of the
>
> information contained in this e-mail message
> and/or attachments to it are strictly prohibited. If
> you have received this communication in error,
> please notify us by reply e-mail or telephone and
> immediately and permanently delete the message
>
> and any attachments. Thank you
>
>
>


-- 
Sasha Dolgy
sasha.dolgy@gmail.com

Re: Cassandra nodes on EC2 in two different regions not communicating

Posted by Himanshi Sharma <hi...@tcs.com>.
Thanks Dave but I am able to telnet to other instances on port 7000 
and when i run  ./nodetool --host 
ec2-50-18-60-117.us-west-1.compute.amazonaws.com  ring... I can see only 
one node.

Do we need to configure anything else in Cassandra.yaml or 
Cassandra-env.sh ???








From:
Dave Viner <da...@gmail.com>
To:
user@cassandra.apache.org
Cc:
Himanshi Sharma <hi...@tcs.com>
Date:
02/23/2011 11:36 AM
Subject:
Re: Cassandra nodes on EC2 in two different regions not communicating



If you login to one of the nodes, can you telnet to port 7000 on the other 
node?

If not, then almost certainly it's a firewall/Security Group issue.

You can find out the security groups for any node by logging in, and then 
running:

% curl "http://169.254.169.254/latest/meta-data/security-groups"

Assuming that both nodes are in the same security group, ensure that the 
SG is configured to allow other members of the SG to communicate on port 
7000 to each other.

HTH,
Dave Viner


On Tue, Feb 22, 2011 at 8:59 PM, Himanshi Sharma <hi...@tcs.com> 
wrote:

Hi, 

I am new to Cassandra. I m running Cassandra on EC2. I configured 
Cassandra cluster on two instances in different regions. 
But when I am trying the nodetool command with ring option, I am getting 
only single node. 

How to make these two nodes communicate with each other. I have already 
opened required ports. i.e 7000, 8080, 9160 in respective 
security groups. Plz help me with this. 

Regards, 
Himanshi Sharma 


=====-----=====-----=====
Notice: The information contained in this e-mail
message and/or attachments to it may contain 
confidential or privileged information. If you are 

not the intended recipient, any dissemination, use, 
review, distribution, printing or copying of the 
information contained in this e-mail message 
and/or attachments to it are strictly prohibited. If 
you have received this communication in error, 

please notify us by reply e-mail or telephone and 
immediately and permanently delete the message 
and any attachments. Thank you




=====-----=====-----=====
Notice: The information contained in this e-mail
message and/or attachments to it may contain 
confidential or privileged information. If you are 
not the intended recipient, any dissemination, use, 
review, distribution, printing or copying of the 
information contained in this e-mail message 
and/or attachments to it are strictly prohibited. If 
you have received this communication in error, 
please notify us by reply e-mail or telephone and 
immediately and permanently delete the message 
and any attachments. Thank you