You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@cassandra.apache.org by Jose Martinez <jm...@yahoo.com> on 2015/03/09 03:24:07 UTC

getting Cassandra to listen to eth0 for port 9042

Hello,
I installed version 2.1.3 on my AWS EC2.  I installed by downloading the tar and copying it to /opt/ dir and then just ran the bin/cassandra executable.  I am trying to access this instance from a Java client.  But the problem I am having is that I can only get port 9042 to listen to the loopback interface (127.0.0.1).  Regardless of what value I use for "listen_address:" or "listen_interface:".  It seems like those properties do not affect port 9042, only port 7000 I think.  Is there anyway I can get Cassandra to listen on the interface I want for port 9042? thanks jose

Re: getting Cassandra to listen to eth0 for port 9042

Posted by Jose Martinez <jm...@yahoo.com>.
Ali,
Your script (https://gist.github.com/aliakhtar/3649e412787034156cbb) worked.  Also, I notice what my problem was... didn't read the two lines above the "listen_address" property in the yaml file...
# Please note that the address on which the native transport is bound is the# same as the rpc_address. The port however is different and specified below.
When I set rpc_address to 0.0.0/0 it worked.  Thank you for your help!! 
jose
      From: Jose Martinez <jm...@yahoo.com>
 To: Ali Akhtar <al...@gmail.com>; "user@cassandra.apache.org" <us...@cassandra.apache.org> 
 Sent: Sunday, March 8, 2015 10:43 PM
 Subject: Re: getting Cassandra to listen to eth0 for port 9042
   
Yeah I used the private IP, which is the IP configured on eth0.  
...listen_address: 10.x.x.x

...ifconfig | grep inet          inet addr:10.x.x.x  Bcast:10.146.160.255  Mask:255.255.255.0
....tcp        0      0 10.x.x.x:7000     0.0.0.0:*               LISTENtcp6       0      0 127.0.0.1:9042          :::*                    LISTEN
 jose
 

     From: Ali Akhtar <al...@gmail.com>
 To: user@cassandra.apache.org; Jose Martinez <jm...@yahoo.com> 
 Sent: Sunday, March 8, 2015 10:36 PM
 Subject: Re: getting Cassandra to listen to eth0 for port 9042
   
On AWS, I've had to use the 'private IP' of the ec2 instance as the listen_address in order to get things to work.
In your EC2 dashboard, there will be a private ip as well as public ip for the instance. Try using the private ip for the listen_address.
Also, you might have more luck installing via one of the packages than via the tar.gz . 


On Mon, Mar 9, 2015 at 7:24 AM, Jose Martinez <jm...@yahoo.com> wrote:

Hello,
I installed version 2.1.3 on my AWS EC2.  I installed by downloading the tar and copying it to /opt/ dir and then just ran the bin/cassandra executable.  I am trying to access this instance from a Java client.  But the problem I am having is that I can only get port 9042 to listen to the loopback interface (127.0.0.1).  Regardless of what value I use for "listen_address:" or "listen_interface:".  It seems like those properties do not affect port 9042, only port 7000 I think.  Is there anyway I can get Cassandra to listen on the interface I want for port 9042? thanks jose



   

  

Re: getting Cassandra to listen to eth0 for port 9042

Posted by Jose Martinez <jm...@yahoo.com>.
Yeah I used the private IP, which is the IP configured on eth0.  
...listen_address: 10.x.x.x

...ifconfig | grep inet          inet addr:10.x.x.x  Bcast:10.146.160.255  Mask:255.255.255.0
....tcp        0      0 10.x.x.x:7000     0.0.0.0:*               LISTENtcp6       0      0 127.0.0.1:9042          :::*                    LISTEN
 jose
      From: Ali Akhtar <al...@gmail.com>
 To: user@cassandra.apache.org; Jose Martinez <jm...@yahoo.com> 
 Sent: Sunday, March 8, 2015 10:36 PM
 Subject: Re: getting Cassandra to listen to eth0 for port 9042
   
On AWS, I've had to use the 'private IP' of the ec2 instance as the listen_address in order to get things to work.
In your EC2 dashboard, there will be a private ip as well as public ip for the instance. Try using the private ip for the listen_address.
Also, you might have more luck installing via one of the packages than via the tar.gz . 


On Mon, Mar 9, 2015 at 7:24 AM, Jose Martinez <jm...@yahoo.com> wrote:

Hello,
I installed version 2.1.3 on my AWS EC2.  I installed by downloading the tar and copying it to /opt/ dir and then just ran the bin/cassandra executable.  I am trying to access this instance from a Java client.  But the problem I am having is that I can only get port 9042 to listen to the loopback interface (127.0.0.1).  Regardless of what value I use for "listen_address:" or "listen_interface:".  It seems like those properties do not affect port 9042, only port 7000 I think.  Is there anyway I can get Cassandra to listen on the interface I want for port 9042? thanks jose



  

Re: getting Cassandra to listen to eth0 for port 9042

Posted by Ali Akhtar <al...@gmail.com>.
Other settings on AWS:

rpc_address : 0.0.0.0
snitch: Ec2Snitch
seeds, listen_address, broadcast_address: private ip

On Mon, Mar 9, 2015 at 7:36 AM, Ali Akhtar <al...@gmail.com> wrote:

> On AWS, I've had to use the 'private IP' of the ec2 instance as the
> listen_address in order to get things to work.
>
> In your EC2 dashboard, there will be a private ip as well as public ip for
> the instance. Try using the private ip for the listen_address.
>
> Also, you might have more luck installing via one of the packages than via
> the tar.gz .
>
> On Mon, Mar 9, 2015 at 7:24 AM, Jose Martinez <jm...@yahoo.com> wrote:
>
>> Hello,
>>
>> I installed version 2.1.3 on my AWS EC2.  I installed by downloading the
>> tar and copying it to /opt/ dir and then just ran the bin/cassandra
>> executable.  I am trying to access this instance from a Java client.  But
>> the problem I am having is that I can only get port 9042 to listen to the
>> loopback interface (127.0.0.1).  Regardless of what value I use for
>> "listen_address:" or "listen_interface:".  It seems like those properties
>> do not affect port 9042, only port 7000 I think.  Is there anyway I can get
>> Cassandra to listen on the interface I want for port 9042?
>>
>> thanks
>> jose
>>
>
>

Re: getting Cassandra to listen to eth0 for port 9042

Posted by Ali Akhtar <al...@gmail.com>.
On AWS, I've had to use the 'private IP' of the ec2 instance as the
listen_address in order to get things to work.

In your EC2 dashboard, there will be a private ip as well as public ip for
the instance. Try using the private ip for the listen_address.

Also, you might have more luck installing via one of the packages than via
the tar.gz .

On Mon, Mar 9, 2015 at 7:24 AM, Jose Martinez <jm...@yahoo.com> wrote:

> Hello,
>
> I installed version 2.1.3 on my AWS EC2.  I installed by downloading the
> tar and copying it to /opt/ dir and then just ran the bin/cassandra
> executable.  I am trying to access this instance from a Java client.  But
> the problem I am having is that I can only get port 9042 to listen to the
> loopback interface (127.0.0.1).  Regardless of what value I use for
> "listen_address:" or "listen_interface:".  It seems like those properties
> do not affect port 9042, only port 7000 I think.  Is there anyway I can get
> Cassandra to listen on the interface I want for port 9042?
>
> thanks
> jose
>