I am trying to sstableloader and I do not want to access Cassandra on the same 
node. I haved edited my Cassandra.yaml to with appropriate values for the 
listen_address and rpc_address but I keep getting the error below. The 
Cassandra-cli tool, nodetool etc. works find when trying to connect to my 
Cassandra cluster, but sstableloader does not. Any suggestions?

[tdavidson@nadevsan06 ~]$ sstableloader --debug -v Demo
Starting client (and waiting 30 seconds for gossip) ...
org.apache.cassandra.config.ConfigurationException: Unable to bind to address 
nadevsan04/10.168.121.57:7000. Set listen_address in cassandra.yaml to an 
interface you can bind to, e.g., your private IP address on EC2
java.lang.RuntimeException: org.apache.cassandra.config.ConfigurationException: 
Unable to bind to address nadevsan04/10.168.121.57:7000. Set listen_address in 
cassandra.yaml to an interface you can bind to, e.g., your private IP address 
on EC2
        at 
org.apache.cassandra.tools.BulkLoader$ExternalClient.init(BulkLoader.java:225)
        at 
org.apache.cassandra.io.sstable.SSTableLoader.stream(SSTableLoader.java:104)
        at org.apache.cassandra.tools.BulkLoader.main(BulkLoader.java:61)
Caused by: org.apache.cassandra.config.ConfigurationException: Unable to bind 
to address nadevsan04/10.168.121.57:7000. Set listen_address in cassandra.yaml 
to an interface you can bind to, e.g., your private IP address on EC2
        at 
org.apache.cassandra.net.MessagingService.getServerSocket(MessagingService.java:220)
        at 
org.apache.cassandra.net.MessagingService.listen(MessagingService.java:191)
        at 
org.apache.cassandra.service.StorageService.initClient(StorageService.java:350)
        at 
org.apache.cassandra.tools.BulkLoader$ExternalClient.init(BulkLoader.java:182)
        ... 2 more

From: John Conwell [mailto:j...@iamjohn.me]
Sent: Tuesday, July 26, 2011 12:11 PM
To: user@cassandra.apache.org
Subject: Re: sstableloader throws storage_port error

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 
<j...@iamjohn.me<mailto:j...@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 
<jbel...@gmail.com<mailto:jbel...@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 
<j...@iamjohn.me<mailto:j...@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<http://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

Reply via email to