cassandra-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jonathan Ellis <jbel...@gmail.com>
Subject Re: StorageService.initServer() fails
Date Wed, 31 Jul 2013 16:48:47 GMT
I'd suggest looking at CassandraDaemon to see what it does before
trying to start StorageService.

On Wed, Jul 31, 2013 at 4:34 AM, Nulik Nol <nuliknol@gmail.com> wrote:
> hi,
> when I execute this code:
>
> import org.apache.cassandra.service.
> StorageService;
>
> public class CasTest {
>
>     public void CasTest() {
>
>     }
>
>     public static void main(String args[]) throws Exception {
>         Class.forName("org.apache.cassandra.service.StorageService");
>         StorageService.instance.initServer();
>         Thread.sleep(10000L);
>
>     }
> }
>
>
> I get this error:
>
> Exception in thread "main" java.lang.RuntimeException:
> org.apache.cassandra.exceptions.ConfigurationException: Cannot add
> column family 'users' to non existing keyspace 'system_auth'.
>     at org.apache.cassandra.cql3.QueryProcessor.process(QueryProcessor.java:130)
>     at org.apache.cassandra.auth.Auth.setupUsersTable(Auth.java:192)
>     at org.apache.cassandra.auth.Auth.setup(Auth.java:126)
>     at org.apache.cassandra.service.StorageService.joinTokenRing(StorageService.java:810)
>     at org.apache.cassandra.service.StorageService.initServer(StorageService.java:554)
>     at org.apache.cassandra.service.StorageService.initServer(StorageService.java:451)
>     at CasTest.main(CasTest.java:13)
> Caused by: org.apache.cassandra.exceptions.ConfigurationException:
> Cannot add column family 'users' to non existing keyspace
> 'system_auth'.
>     at org.apache.cassandra.service.MigrationManager.announceNewColumnFamily(MigrationManager.java:221)
>     at org.apache.cassandra.cql3.statements.CreateColumnFamilyStatement.announceMigration(CreateColumnFamilyStatement.java:104)
>     at org.apache.cassandra.cql3.statements.SchemaAlteringStatement.execute(SchemaAlteringStatement.java:73)
>     at org.apache.cassandra.cql3.QueryProcessor.processStatement(QueryProcessor.java:104)
>     at org.apache.cassandra.cql3.QueryProcessor.process(QueryProcessor.java:114)
>     at org.apache.cassandra.cql3.QueryProcessor.process(QueryProcessor.java:122)
>     ... 6 more
>
>
> When I run cassandra's binary on the same config file it finds
> keyspace 'system_auth' just fine.
> Do I miss some initialization instructions before invoking StorageService code ?
> This is with 1.2.7
>
> Thanks in advance



-- 
Jonathan Ellis
Project Chair, Apache Cassandra
co-founder, http://www.datastax.com
@spyced

Mime
View raw message