incubator-cassandra-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Tyler Hobbs <ty...@datastax.com>
Subject Re: Not enough replicas???
Date Mon, 04 Feb 2013 18:42:40 GMT
Sorry, to be more precise, the name of the datacenter is just the string
"28", not "DC28".


On Mon, Feb 4, 2013 at 12:07 PM, <Stephen.M.Thompson@wellsfargo.com> wrote:

> Thanks Tyler … so I created my keyspace to explicitly indicate the
> datacenter and replication, as follows:****
>
> ** **
>
> create *keyspace* KEYSPACE_NAME****
>
>   with placement_strategy =
> 'org.apache.cassandra.locator.NetworkTopologyStrategy'****
>
>   and strategy_options={DC28:2};****
>
> ** **
>
> And yet I still get the exact same error message:****
>
> ** **
>
> *me.prettyprint.hector.api.exceptions.HUnavailableException*: : May not
> be enough replicas present to handle consistency level.****
>
> ** **
>
> It certainly is showing that it took my change:****
>
> ** **
>
> [default@KEYSPACE_NAME] describe;****
>
> Keyspace: KEYSPACE_NAME:****
>
>   Replication Strategy:
> org.apache.cassandra.locator.NetworkTopologyStrategy****
>
>   Durable Writes: true****
>
>     Options: [DC28:2]****
>
> ** **
>
> Looking at the ring ….****
>
> ** **
>
> [root@Config3482VM1 apache-cassandra-1.2.0]# bin/nodetool -h localhost
> ring****
>
> ** **
>
> Datacenter: 28****
>
> ==========****
>
> Replicas: 0****
>
> ** **
>
> Address         Rack        Status State   Load
> Owns                Token****
>
>
> 9187343239835811839****
>
> 10.28.205.126   205         Up     Normal  95.89 KB
> 0.00%               -9187343239835811840****
>
> 10.28.205.126   205         Up     Normal  95.89 KB
> 0.00%               -9151314442816847872****
>
> 10.28.205.126   205         Up     Normal  95.89 KB
> 0.00%               -9115285645797883904****
>
> ** **
>
> ( HUGE SNIP )****
>
> ** **
>
> 10.28.205.127   205         Up     Normal  84.63 KB
> 0.00%               9115285645797883903****
>
> 10.28.205.127   205         Up     Normal  84.63 KB
> 0.00%               9151314442816847871****
>
> 10.28.205.127   205         Up     Normal  84.63 KB
> 0.00%               9187343239835811839****
>
> ** **
>
> So both boxes are showing up in the ring.  ****
>
> ** **
>
> *Thank you guys SO MUCH for helping me figure this stuff out.*
>
> ** **
>
> ** **
>
> *From:* Tyler Hobbs [mailto:tyler@datastax.com]
> *Sent:* Monday, February 04, 2013 11:17 AM
>
> *To:* user@cassandra.apache.org
> *Subject:* Re: Not enough replicas???****
>
> ** **
>
> RackInferringSnitch determines each node's DC and rack by looking at the
> second and third octets in its IP address (
> http://www.datastax.com/docs/1.0/cluster_architecture/replication#rackinferringsnitch),
> so your nodes are in DC "28".
>
> Your replication strategy says to put one replica in DC "datacenter1", but
> doesn't mention DC "28" at all, so you don't have any replicas for your
> keyspace.****
>
> ** **
>
> On Mon, Feb 4, 2013 at 7:55 AM, <Stephen.M.Thompson@wellsfargo.com> wrote:
> ****
>
> Hi Edward - thanks for responding.   The keyspace could not have been
> created more simply:****
>
>  ****
>
> create keyspace KEYSPACE_NAME;****
>
>  ****
>
> According to the help, this should have created a replication factor of 1:
> ****
>
>  ****
>
> Keyspace Attributes (all are optional):****
>
> - placement_strategy: Class used to determine how replicas****
>
>   are distributed among nodes. Defaults to NetworkTopologyStrategy with***
> *
>
>   one datacenter defined with a replication factor of 1
> ("[datacenter1:1]").****
>
>  ****
>
> Steve****
>
>  ****
>
> -----Original Message-----
> From: Edward Capriolo [mailto:edlinuxguru@gmail.com]
> Sent: Friday, February 01, 2013 5:49 PM
> To: user@cassandra.apache.org
> Subject: Re: Not enough replicas???****
>
>  ****
>
> Please include the information on how your keyspace was created. This may
> indicate you set the replication factor to 3, when you only have 1 node, or
> some similar condition.****
>
>  ****
>
> On Fri, Feb 1, 2013 at 4:57 PM,  <Stephen.M.Thompson@wellsfargo.com>
> wrote:****
>
> > I need to offer my profound thanks to this community which has been so *
> ***
>
> > helpful in trying to figure this system out.****
>
> > ****
>
> > ****
>
> > ****
>
> > I’ve setup a simple ring with two nodes and I’m trying to insert data **
> **
>
> > to them.  I get failures 100% with this error:****
>
> > ****
>
> > ****
>
> > ****
>
> > me.prettyprint.hector.api.exceptions.HUnavailableException: : May not **
> **
>
> > be enough replicas present to handle consistency level.****
>
> > ****
>
> > ****
>
> > ****
>
> > I’m not doing anything fancy – this is just from setting up the ****
>
> > cluster following the basic instructions from datastax for a simple ****
>
> > one data center cluster.  My config is basically the default except ****
>
> > for the changes they discuss (except that I have configured for my IP **
> **
>
> > addresses… my two boxes are****
>
> > .126 and .127)****
>
> > ****
>
> > ****
>
> > ****
>
> > cluster_name: 'MyDemoCluster'****
>
> > ****
>
> > num_tokens: 256****
>
> > ****
>
> > seed_provider:****
>
> > ****
>
> >   - class_name: org.apache.cassandra.locator.SimpleSeedProvider****
>
> > ****
>
> >     parameters:****
>
> > ****
>
> >          - seeds: "10.28.205.126"****
>
> > ****
>
> > listen_address: 10.28.205.126****
>
> > ****
>
> > rpc_address: 0.0.0.0****
>
> > ****
>
> > endpoint_snitch: RackInferringSnitch****
>
> > ****
>
> > ****
>
> > ****
>
> > Nodetool shows both nodes active in the ring, status = up, state =
> normal.****
>
> > ****
>
> > ****
>
> > ****
>
> > For the CF:****
>
> > ****
>
> > ****
>
> > ****
>
> >    ColumnFamily: SystemEvent****
>
> > ****
>
> >      Key Validation Class: org.apache.cassandra.db.marshal.UTF8Type****
>
> > ****
>
> >      Default column value validator:****
>
> > org.apache.cassandra.db.marshal.UTF8Type****
>
> > ****
>
> >      Columns sorted by: org.apache.cassandra.db.marshal.UTF8Type****
>
> > ****
>
> >      GC grace seconds: 864000****
>
> > ****
>
> >      Compaction min/max thresholds: 4/32****
>
> > ****
>
> >      Read repair chance: 0.1****
>
> > ****
>
> >      DC Local Read repair chance: 0.0****
>
> > ****
>
> >      Replicate on write: true****
>
> > ****
>
> >      Caching: KEYS_ONLY****
>
> > ****
>
> >      Bloom Filter FP chance: default****
>
> > ****
>
> >      Built indexes: [SystemEvent.IdxName]****
>
> > ****
>
> >      Column Metadata:****
>
> > ****
>
> >        Column Name: eventTimeStamp****
>
> > ****
>
> >          Validation Class: org.apache.cassandra.db.marshal.DateType****
>
> > ****
>
> >        Column Name: name****
>
> > ****
>
> >          Validation Class: org.apache.cassandra.db.marshal.UTF8Type****
>
> > ****
>
> >          Index Name: IdxName****
>
> > ****
>
> >          Index Type: KEYS****
>
> > ****
>
> >      Compaction Strategy:****
>
> > org.apache.cassandra.db.compaction.SizeTieredCompactionStrategy****
>
> > ****
>
> >      Compression Options:****
>
> > ****
>
> >        sstable_compression:****
>
> > org.apache.cassandra.io.compress.SnappyCompressor****
>
> > ****
>
> > ****
>
> > ****
>
> > Any ideas?****
>
>
>
>
> --
> Tyler Hobbs
> DataStax <http://datastax.com/>****
>



-- 
Tyler Hobbs
DataStax <http://datastax.com/>

Mime
View raw message