You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@cassandra.apache.org by "Boole.Z.Guo (mis.cnsh04.Newegg) 41442" <Bo...@newegg.com> on 2013/11/12 06:16:39 UTC

How to configure linux service for Cassandra?

How to configure linux service for Cassandra or start multiple Cassandra nodes from a single node?

Thanks very muh!

Best Regards,
Boole Guo

Re: 答复: How to configure linux service for Cassandra?

Posted by Krishna Chaitanya <bn...@gmail.com>.
Hey why dont you try Datastax Opscenter?  Its a cool Gui tool to
start/stop/manage your cluster(even remotely) . It also provides
administrative tools fr checking on the performance with vital statistics.
Definitely worth it.
On Dec 3, 2013 3:14 AM, "Kumar Ranjan" <wi...@gmail.com> wrote:

> Hey Folks,
>
> I have been using ccm for some time and it's pretty awesome tool to test
> out admin stuff. Now, I really want to test modeling data by trying to
> access ccm running cassandra using Thrift based pycassaShell client from
> remote hosts (not locally). My setup is like this:
>
> Lets say, private IP of this machine is: 10.11.12.13 (Just an example)
>
> lo        Link encap:Local Loopback
>
>           inet addr:127.0.0.1  Mask:255.0.0.0
>
>           inet6 addr: ::1/128 Scope:Host
>
>           UP LOOPBACK RUNNING  MTU:16436  Metric:1
>
>           RX packets:67392708 errors:0 dropped:0 overruns:0 frame:0
>
>           TX packets:67392708 errors:0 dropped:0 overruns:0 carrier:0
>
>           collisions:0 txqueuelen:0
>
>           RX bytes:7398829042 (6.8 GiB)  TX bytes:7398829042 (6.8 GiB)
>
>
> lo:1      Link encap:Local Loopback
>
>           inet addr:127.0.0.2  Mask:255.255.255.0
>
>           UP LOOPBACK RUNNING  MTU:16436  Metric:1
>
>
> lo:2      Link encap:Local Loopback
>
>           inet addr:127.0.0.3  Mask:255.0.0.0
>
>           UP LOOPBACK RUNNING  MTU:16436  Metric:1
>
>
> lo:3      Link encap:Local Loopback
>
>           inet addr:127.0.0.4  Mask:255.0.0.0
>
>           UP LOOPBACK RUNNING  MTU:16436  Metric:1
>
>
> and 127.0.0.1 (node1), 127.0.0.2 (node2), 127.0.0.3 (node3), 127.0.0.4
> (node4)
>
>
> $ ccm status
>
> node1: UP
>
> node3: UP
>
> node2: UP
>
> node4: UP
>
>
> How to connect to any of the instance from non-local hosts? When I do:
>
> pycassaShell --host 10.11.12.13 --port 9160, it throws an exception,
>
>
> thrift.transport.TTransport.TTransportException: Could not connect to
> 10.11.12.13:9160
>
>
> Is there a way to make it work?
>
>
>
> On Tue, Nov 12, 2013 at 4:19 AM, Boole.Z.Guo (mis.cnsh04.Newegg) 41442 <
> Boole.Z.Guo@newegg.com> wrote:
>
>>  Thanks very much. I will try.
>>
>>
>>
>> The goal of ccm and ccmlib is to make is easy to create, manage and
>> destroy a
>>
>> small cluster on a local box. It is meant for testing of a Cassandra
>> cluster.
>>
>> Best Regards,
>>
>> *Boole Guo*
>>
>> *Software Engineer, NESC-SH.MIS*
>>
>> *+86-021-51530666 <%2B86-021-51530666>*41442*
>>
>> *Floor 19, KaiKai Plaza, 888, Wanhangdu Rd, Shanghai (200042)*
>>
>>
>>
>> *发件人:* Christopher Wirt [mailto:chris.wirt@struq.com]
>> *发送时间:* 2013年11月12日 16:53
>> *收件人:* user@cassandra.apache.org
>> *主题:* RE: How to configure linux service for Cassandra?
>>
>>
>>
>> Starting multiple Cassandra nodes on the same machine involves setting
>> loop back aliases and some configuration fiddling.
>>
>>
>>
>> Lucky for you Sylvain Lebresne made this handy tool in python which does
>> the job for you.
>>
>> https://github.com/pcmanus/ccm
>>
>>
>>
>> to run as a service you need a script like this
>> http://www.bajb.net/2012/01/cassandra-service-script/
>>
>> I haven’t tried this, I just run Cassandra in the foreground of a screen
>> session.
>>
>>
>>
>>
>>
>> *From:* Boole.Z.Guo (mis.cnsh04.Newegg) 41442 [
>> mailto:Boole.Z.Guo@newegg.com <Bo...@newegg.com>]
>> *Sent:* 12 November 2013 05:17
>> *To:* user@cassandra.apache.org
>> *Subject:* How to configure linux service for Cassandra?
>>
>>
>>
>> How to configure linux service for Cassandra or start multiple Cassandra
>> nodes from a single node?
>>
>>
>>
>> Thanks very muh!
>>
>>
>>
>> Best Regards,
>>
>> *Boole Guo*
>>
>
>

Re: 答复: How to configure linux service for Cassandra?

Posted by Michael Shuler <mi...@pbandjelly.org>.
On 12/02/2013 03:43 PM, Kumar Ranjan wrote:
> Hey Folks,
> 
> I have been using ccm for some time and it's pretty awesome tool to test
> out admin stuff. Now, I really want to test modeling data by trying to
> access ccm running cassandra using Thrift based pycassaShell client from
> remote hosts (not locally). My setup is like this:

In your case, since the ccm cluster nodes are bound to localhost
aliases, you would need to set up routing and port forwarding via
iptables from your public IP (10.11.12.13) to the respective localhost
aliases/ports.  ccm is great for local testing, but gets to be a pain if
you wish to do some real testing - not because of ccm, but because now
you want to do something that involves actual multi-host networking with
remote access.  Even easier, in my opinion; if you really want to begin
testing a real cluster with remote access, which will have a lot more
horsepower than everything on localhost via ccm, then spend $15/month on
3x $5/mo. digitalocean nodes.

> How to connect to any of the instance from non-local hosts? When I do:
> 
> pycassaShell --host 10.11.12.13 --port 9160, it throws an exception,
> 
> 
> thrift.transport.TTransport.TTransportException: Could not connect to
> 10.11.12.13:9160

Yup.  The nodes are not listening to anything but their localhost alias
IP addresses.

> Is there a way to make it work?

`man iptables`  ;)

-- 
Kind regards,
Michael

Re: 答复: How to configure linux service for Cassandra?

Posted by Kumar Ranjan <wi...@gmail.com>.
Hey Folks,

I have been using ccm for some time and it's pretty awesome tool to test
out admin stuff. Now, I really want to test modeling data by trying to
access ccm running cassandra using Thrift based pycassaShell client from
remote hosts (not locally). My setup is like this:

Lets say, private IP of this machine is: 10.11.12.13 (Just an example)

lo        Link encap:Local Loopback

          inet addr:127.0.0.1  Mask:255.0.0.0

          inet6 addr: ::1/128 Scope:Host

          UP LOOPBACK RUNNING  MTU:16436  Metric:1

          RX packets:67392708 errors:0 dropped:0 overruns:0 frame:0

          TX packets:67392708 errors:0 dropped:0 overruns:0 carrier:0

          collisions:0 txqueuelen:0

          RX bytes:7398829042 (6.8 GiB)  TX bytes:7398829042 (6.8 GiB)


lo:1      Link encap:Local Loopback

          inet addr:127.0.0.2  Mask:255.255.255.0

          UP LOOPBACK RUNNING  MTU:16436  Metric:1


lo:2      Link encap:Local Loopback

          inet addr:127.0.0.3  Mask:255.0.0.0

          UP LOOPBACK RUNNING  MTU:16436  Metric:1


lo:3      Link encap:Local Loopback

          inet addr:127.0.0.4  Mask:255.0.0.0

          UP LOOPBACK RUNNING  MTU:16436  Metric:1


and 127.0.0.1 (node1), 127.0.0.2 (node2), 127.0.0.3 (node3), 127.0.0.4
(node4)


$ ccm status

node1: UP

node3: UP

node2: UP

node4: UP


How to connect to any of the instance from non-local hosts? When I do:

pycassaShell --host 10.11.12.13 --port 9160, it throws an exception,


thrift.transport.TTransport.TTransportException: Could not connect to
10.11.12.13:9160


Is there a way to make it work?



On Tue, Nov 12, 2013 at 4:19 AM, Boole.Z.Guo (mis.cnsh04.Newegg) 41442 <
Boole.Z.Guo@newegg.com> wrote:

>  Thanks very much. I will try.
>
>
>
> The goal of ccm and ccmlib is to make is easy to create, manage and
> destroy a
>
> small cluster on a local box. It is meant for testing of a Cassandra
> cluster.
>
> Best Regards,
>
> *Boole Guo*
>
> *Software Engineer, NESC-SH.MIS*
>
> *+86-021-51530666 <%2B86-021-51530666>*41442*
>
> *Floor 19, KaiKai Plaza, 888, Wanhangdu Rd, Shanghai (200042)*
>
>
>
> *发件人:* Christopher Wirt [mailto:chris.wirt@struq.com]
> *发送时间:* 2013年11月12日 16:53
> *收件人:* user@cassandra.apache.org
> *主题:* RE: How to configure linux service for Cassandra?
>
>
>
> Starting multiple Cassandra nodes on the same machine involves setting
> loop back aliases and some configuration fiddling.
>
>
>
> Lucky for you Sylvain Lebresne made this handy tool in python which does
> the job for you.
>
> https://github.com/pcmanus/ccm
>
>
>
> to run as a service you need a script like this
> http://www.bajb.net/2012/01/cassandra-service-script/
>
> I haven’t tried this, I just run Cassandra in the foreground of a screen
> session.
>
>
>
>
>
> *From:* Boole.Z.Guo (mis.cnsh04.Newegg) 41442 [
> mailto:Boole.Z.Guo@newegg.com <Bo...@newegg.com>]
> *Sent:* 12 November 2013 05:17
> *To:* user@cassandra.apache.org
> *Subject:* How to configure linux service for Cassandra?
>
>
>
> How to configure linux service for Cassandra or start multiple Cassandra
> nodes from a single node?
>
>
>
> Thanks very muh!
>
>
>
> Best Regards,
>
> *Boole Guo*
>

答复: How to configure linux service for Cassandra?

Posted by "Boole.Z.Guo (mis.cnsh04.Newegg) 41442" <Bo...@newegg.com>.
Thanks very much. I will try.

The goal of ccm and ccmlib is to make is easy to create, manage and destroy a
small cluster on a local box. It is meant for testing of a Cassandra cluster.
Best Regards,
Boole Guo
Software Engineer, NESC-SH.MIS
+86-021-51530666*41442
Floor 19, KaiKai Plaza, 888, Wanhangdu Rd, Shanghai (200042)

发件人: Christopher Wirt [mailto:chris.wirt@struq.com]
发送时间: 2013年11月12日 16:53
收件人: user@cassandra.apache.org
主题: RE: How to configure linux service for Cassandra?

Starting multiple Cassandra nodes on the same machine involves setting loop back aliases and some configuration fiddling.

Lucky for you Sylvain Lebresne made this handy tool in python which does the job for you.
https://github.com/pcmanus/ccm

to run as a service you need a script like this http://www.bajb.net/2012/01/cassandra-service-script/
I haven’t tried this, I just run Cassandra in the foreground of a screen session.


From: Boole.Z.Guo (mis.cnsh04.Newegg) 41442 [mailto:Boole.Z.Guo@newegg.com]
Sent: 12 November 2013 05:17
To: user@cassandra.apache.org<ma...@cassandra.apache.org>
Subject: How to configure linux service for Cassandra?

How to configure linux service for Cassandra or start multiple Cassandra nodes from a single node?

Thanks very muh!

Best Regards,
Boole Guo

RE: How to configure linux service for Cassandra?

Posted by Christopher Wirt <ch...@struq.com>.
Starting multiple Cassandra nodes on the same machine involves setting loop
back aliases and some configuration fiddling.

 

Lucky for you Sylvain Lebresne made this handy tool in python which does the
job for you. 

https://github.com/pcmanus/ccm

 

to run as a service you need a script like this
http://www.bajb.net/2012/01/cassandra-service-script/

I haven't tried this, I just run Cassandra in the foreground of a screen
session.

 

 

From: Boole.Z.Guo (mis.cnsh04.Newegg) 41442 [mailto:Boole.Z.Guo@newegg.com] 
Sent: 12 November 2013 05:17
To: user@cassandra.apache.org
Subject: How to configure linux service for Cassandra?

 

How to configure linux service for Cassandra or start multiple Cassandra
nodes from a single node?

 

Thanks very muh!

 

Best Regards,

Boole Guo