You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@cassandra.apache.org by Shariq <ms...@gmail.com> on 2011/04/13 07:38:32 UTC

Error while startup - latest trunk build

Hi,

I am getting the following exception while starting Cassandra trunk build,
am I missing any configuration options, please help ?

Thanks,
Shariq.

Stack track
----------------
~/work/cassandra-trunk$ ./bin/cassandra -f
 INFO 11:04:07,864 Logging initialized
 INFO 11:04:07,877 Heap size: 1893728256/1893728256
 INFO 11:04:07,878 JNA not found. Native methods will be disabled.
 INFO 11:04:07,885 Loading settings from
file:/home/shariq/work/cassandra-trunk/conf/cassandra.yaml
 INFO 11:04:08,003 DiskAccessMode 'auto' determined to be mmap,
indexAccessMode is mmap
 INFO 11:04:08,083 Global memtable threshold is enabled at 602MB
 INFO 11:04:08,136 reading saved cache
/var/lib/cassandra/saved_caches/system-IndexInfo-KeyCache
 INFO 11:04:08,145 Opening /var/lib/cassandra/data/system/IndexInfo-f-5
 INFO 11:04:08,163 reading saved cache
/var/lib/cassandra/saved_caches/system-Schema-KeyCache
 INFO 11:04:08,165 Opening /var/lib/cassandra/data/system/Schema-f-57
 INFO 11:04:08,169 Opening /var/lib/cassandra/data/system/Schema-f-59
 INFO 11:04:08,171 Opening /var/lib/cassandra/data/system/Schema-f-58
 INFO 11:04:08,176 Opening /var/lib/cassandra/data/system/Migrations-f-58
 INFO 11:04:08,177 Opening /var/lib/cassandra/data/system/Migrations-f-57
 INFO 11:04:08,178 Opening /var/lib/cassandra/data/system/Migrations-f-59
 INFO 11:04:08,182 reading saved cache
/var/lib/cassandra/saved_caches/system-LocationInfo-KeyCache
 INFO 11:04:08,185 Opening /var/lib/cassandra/data/system/LocationInfo-f-46
 INFO 11:04:08,188 Opening /var/lib/cassandra/data/system/LocationInfo-f-47
 INFO 11:04:08,191 Opening /var/lib/cassandra/data/system/LocationInfo-f-45
 INFO 11:04:08,236 Loading schema version
33ac001b-60fc-11e0-8f89-e700f669bcfc
ERROR 11:04:08,463 Exception encountered during startup.
java.lang.RuntimeException:
org.apache.cassandra.config.ConfigurationException: SimpleStrategy requires
a replication_factor strategy option.
    at org.apache.cassandra.db.Table.<init>(Table.java:277)
    at org.apache.cassandra.db.Table.open(Table.java:109)
    at
org.apache.cassandra.service.AbstractCassandraDaemon.setup(AbstractCassandraDaemon.java:160)
    at
org.apache.cassandra.service.AbstractCassandraDaemon.activate(AbstractCassandraDaemon.java:314)
    at
org.apache.cassandra.thrift.CassandraDaemon.main(CassandraDaemon.java:80)
Caused by: org.apache.cassandra.config.ConfigurationException:
SimpleStrategy requires a replication_factor strategy option.
    at
org.apache.cassandra.locator.SimpleStrategy.validateOptions(SimpleStrategy.java:75)
    at
org.apache.cassandra.locator.AbstractReplicationStrategy.createReplicationStrategy(AbstractReplicationStrategy.java:262)
    at
org.apache.cassandra.db.Table.createReplicationStrategy(Table.java:327)
    at org.apache.cassandra.db.Table.<init>(Table.java:273)
    ... 4 more
Exception encountered during startup.
java.lang.RuntimeException:
org.apache.cassandra.config.ConfigurationException: SimpleStrategy requires
a replication_factor strategy option.
    at org.apache.cassandra.db.Table.<init>(Table.java:277)
    at org.apache.cassandra.db.Table.open(Table.java:109)
    at
org.apache.cassandra.service.AbstractCassandraDaemon.setup(AbstractCassandraDaemon.java:160)
    at
org.apache.cassandra.service.AbstractCassandraDaemon.activate(AbstractCassandraDaemon.java:314)
    at
org.apache.cassandra.thrift.CassandraDaemon.main(CassandraDaemon.java:80)
Caused by: org.apache.cassandra.config.ConfigurationException:
SimpleStrategy requires a replication_factor strategy option.
    at
org.apache.cassandra.locator.SimpleStrategy.validateOptions(SimpleStrategy.java:75)
    at
org.apache.cassandra.locator.AbstractReplicationStrategy.createReplicationStrategy(AbstractReplicationStrategy.java:262)
    at
org.apache.cassandra.db.Table.createReplicationStrategy(Table.java:327)
    at org.apache.cassandra.db.Table.<init>(Table.java:273)
    ... 4 more

Re: Error while startup - latest trunk build

Posted by Shariq <ms...@gmail.com>.
Hi again,

Small update on the issue,

*KeyspaceDefinition keyspaceDefinition =
                HFactory.createKeyspaceDefinition(KEYSPACE_NAME,
"org.apache.cassandra.locator.SimpleStrategy", 1, Arrays.asList(cfDef));*

works fine with cassandra-0.7.4/thrift-19.4.0.

But when I am running the same piece of code with cassandra-0.8.0-SNAPSHOT
and thrift-20.1.0 i get the following error,

Exception in thread "main"
me.prettyprint.hector.api.exceptions.HCassandraInternalException: Cassandra
encountered an internal error processing this request: TApplicationError
type: 7 message:Required field 'cf_defs' was not present! Struct:
KsDef(name:Facebook_KS,
strategy_class:org.apache.cassandra.locator.SimpleStrategy, cf_defs:null)
    at
me.prettyprint.cassandra.service.ExceptionsTranslatorImpl.translate(ExceptionsTranslatorImpl.java:28)
    at
me.prettyprint.cassandra.service.ThriftCluster$5.execute(ThriftCluster.java:103)
    at
me.prettyprint.cassandra.service.ThriftCluster$5.execute(ThriftCluster.java:97)
    at
me.prettyprint.cassandra.service.Operation.executeAndSetResult(Operation.java:101)
    at
me.prettyprint.cassandra.connection.HConnectionManager.operateWithFailover(HConnectionManager.java:155)
    at
me.prettyprint.cassandra.service.ThriftCluster.addKeyspace(ThriftCluster.java:107)
    at cassandra.test.TestClient.main(TestClient.java:138)


Is this issue a backward compatibility issue or am I doing something wrong,
please help.

Thanks,
Shariq.



On Wed, Apr 13, 2011 at 11:08 AM, Shariq <ms...@gmail.com> wrote:

> Hi,
>
> I am getting the following exception while starting Cassandra trunk build,
> am I missing any configuration options, please help ?
>
> Thanks,
> Shariq.
>
> Stack track
> ----------------
> ~/work/cassandra-trunk$ ./bin/cassandra -f
>  INFO 11:04:07,864 Logging initialized
>  INFO 11:04:07,877 Heap size: 1893728256/1893728256
>  INFO 11:04:07,878 JNA not found. Native methods will be disabled.
>  INFO 11:04:07,885 Loading settings from
> file:/home/shariq/work/cassandra-trunk/conf/cassandra.yaml
>  INFO 11:04:08,003 DiskAccessMode 'auto' determined to be mmap,
> indexAccessMode is mmap
>  INFO 11:04:08,083 Global memtable threshold is enabled at 602MB
>  INFO 11:04:08,136 reading saved cache
> /var/lib/cassandra/saved_caches/system-IndexInfo-KeyCache
>  INFO 11:04:08,145 Opening /var/lib/cassandra/data/system/IndexInfo-f-5
>  INFO 11:04:08,163 reading saved cache
> /var/lib/cassandra/saved_caches/system-Schema-KeyCache
>  INFO 11:04:08,165 Opening /var/lib/cassandra/data/system/Schema-f-57
>  INFO 11:04:08,169 Opening /var/lib/cassandra/data/system/Schema-f-59
>  INFO 11:04:08,171 Opening /var/lib/cassandra/data/system/Schema-f-58
>  INFO 11:04:08,176 Opening /var/lib/cassandra/data/system/Migrations-f-58
>  INFO 11:04:08,177 Opening /var/lib/cassandra/data/system/Migrations-f-57
>  INFO 11:04:08,178 Opening /var/lib/cassandra/data/system/Migrations-f-59
>  INFO 11:04:08,182 reading saved cache
> /var/lib/cassandra/saved_caches/system-LocationInfo-KeyCache
>  INFO 11:04:08,185 Opening /var/lib/cassandra/data/system/LocationInfo-f-46
>  INFO 11:04:08,188 Opening /var/lib/cassandra/data/system/LocationInfo-f-47
>  INFO 11:04:08,191 Opening /var/lib/cassandra/data/system/LocationInfo-f-45
>  INFO 11:04:08,236 Loading schema version
> 33ac001b-60fc-11e0-8f89-e700f669bcfc
> ERROR 11:04:08,463 Exception encountered during startup.
> java.lang.RuntimeException:
> org.apache.cassandra.config.ConfigurationException: SimpleStrategy requires
> a replication_factor strategy option.
>     at org.apache.cassandra.db.Table.<init>(Table.java:277)
>     at org.apache.cassandra.db.Table.open(Table.java:109)
>     at
> org.apache.cassandra.service.AbstractCassandraDaemon.setup(AbstractCassandraDaemon.java:160)
>     at
> org.apache.cassandra.service.AbstractCassandraDaemon.activate(AbstractCassandraDaemon.java:314)
>     at
> org.apache.cassandra.thrift.CassandraDaemon.main(CassandraDaemon.java:80)
> Caused by: org.apache.cassandra.config.ConfigurationException:
> SimpleStrategy requires a replication_factor strategy option.
>     at
> org.apache.cassandra.locator.SimpleStrategy.validateOptions(SimpleStrategy.java:75)
>     at
> org.apache.cassandra.locator.AbstractReplicationStrategy.createReplicationStrategy(AbstractReplicationStrategy.java:262)
>     at
> org.apache.cassandra.db.Table.createReplicationStrategy(Table.java:327)
>     at org.apache.cassandra.db.Table.<init>(Table.java:273)
>     ... 4 more
> Exception encountered during startup.
> java.lang.RuntimeException:
> org.apache.cassandra.config.ConfigurationException: SimpleStrategy requires
> a replication_factor strategy option.
>     at org.apache.cassandra.db.Table.<init>(Table.java:277)
>     at org.apache.cassandra.db.Table.open(Table.java:109)
>     at
> org.apache.cassandra.service.AbstractCassandraDaemon.setup(AbstractCassandraDaemon.java:160)
>     at
> org.apache.cassandra.service.AbstractCassandraDaemon.activate(AbstractCassandraDaemon.java:314)
>     at
> org.apache.cassandra.thrift.CassandraDaemon.main(CassandraDaemon.java:80)
> Caused by: org.apache.cassandra.config.ConfigurationException:
> SimpleStrategy requires a replication_factor strategy option.
>     at
> org.apache.cassandra.locator.SimpleStrategy.validateOptions(SimpleStrategy.java:75)
>     at
> org.apache.cassandra.locator.AbstractReplicationStrategy.createReplicationStrategy(AbstractReplicationStrategy.java:262)
>     at
> org.apache.cassandra.db.Table.createReplicationStrategy(Table.java:327)
>     at org.apache.cassandra.db.Table.<init>(Table.java:273)
>     ... 4 more
>