incubator-cassandra-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From John Conwell <j...@iamjohn.me>
Subject Re: sstableloader throws storage_port error
Date Tue, 26 Jul 2011 19:11:00 GMT
After much research and experimentation, I figured out how to get
sstableloader running on the same machine as a live cassandra node instance.

The key, as Jonathan stated is to configure sstableloader to use a different
ipaddress than the running cassandra instance is using.  To do this, I ran
this command, which created the loopback address for 127.0.0.2

   sudo ifconfig lo0 alias 127.0.0.2

No you can have cassandra configured to listen to 127.0.0.1, and
sstableloader configured to listen to 127.0.0.2

By the way, to remove this ipaddress, run

sudo ifconfig lo0 -alias 127.0.0.2

But thats not really all.  Because sstableloader reads the cassandra.yaml
file to get the gossip ipaddress, you need to make a copy of the cassandra
install directory (or at least the bin and conf folders).  Basically one
folder with yaml configured for Cassandra, the other folder with yaml
configured for sstableloader.

Hope this helps people. I've written an in depth description of how to do
all this, and can post it if people want, but I'm not sure the etiquette of
posting blog links in the email list.

Thanks,
John

On Tue, Jul 26, 2011 at 7:40 AM, John Conwell <john@iamjohn.me> wrote:

> If I have Cassandra already running on my machine, how do I configure
> sstableloader to run on a different IP (127.0.0.2).  Also, does that mean in
> order to use sstableloader on the same machine as an running Cassandra node,
> I have to have two NIC cards?
>
> I looked around for any info about how to configure and run sstableloader,
> but other than what the cmdline spits out I cant find anything.  Are there
> any examples or best practices?  Is it designed to be run on a machine that
> isn't running a cassandra node?
>
>
> On Mon, Jul 25, 2011 at 8:24 PM, Jonathan Ellis <jbellis@gmail.com> wrote:
>
>> sstableloader uses gossip to discover the Cassandra ring, so you'll
>> need to run it on a different IP (127.0.0.2 is fine).
>>
>> On Mon, Jul 25, 2011 at 2:41 PM, John Conwell <john@iamjohn.me> wrote:
>> > I'm trying to figure out how to use the sstableloader tool.  For my test
>> I
>> > have a single node cassandra instance running on my local machine.  I
>> have
>> > cassandra running, and validate this by connecting to it with
>> cassandra-cli.
>> > I run sstableloader using the following command:
>> > bin/sstableloader /Users/someuser/cassandra/mykeyspace
>> > and I get the following error:
>> > org.apache.cassandra.config.ConfigurationException: localhost/
>> 127.0.0.1:7000
>> > is in use by another process.  Change listen_address:storage_port in
>> > cassandra.yaml to values that do not conflict with other services
>> >
>> > I've played around with different ports, but nothing works.  It it
>> because
>> > I'm trying to run sstableloader on the same machine that cassandra is
>> > running on?  It would be odd I think, but cant thing of another reason I
>> > would get that eror.
>> > Thanks,
>> > John
>>
>>
>>
>> --
>> Jonathan Ellis
>> Project Chair, Apache Cassandra
>> co-founder of DataStax, the source for professional Cassandra support
>> http://www.datastax.com
>>
>
>
>
> --
>
> Thanks,
> John C
>
>


-- 

Thanks,
John C

Mime
View raw message