Hi Jigar, I looked through your log file and it actually looks OK and expected the first time the application is running before the database schema has been setup. You're seeing those errors because there are threads that will start as soon as the application is starts and they try to access the database (the threads assume it's already been setup).
*What you should do --->* 1. Again start tomcat fresh 2. After few seconds run the below setup curl commands to initiate the database setup: curl -X PUT "http://localhost:8080/system/database/setup" -u superuser:test curl -X PUT "http://localhost:8080/system/database/bootstrap" -u superuser:test curl -X GET "http://localhost:8080/system/superuser/setup" -u superuser:test * note if you've changed the sysadmin username or password, then modify the above curl commands to replace superuser:test with <your username>:<your password> After you receive ok responses from these curl commands, you should see the errors disappear from the log file. Thanks. -Michael On Thu, Feb 11, 2016 at 10:41 AM, J Captain <[email protected]> wrote: > Hi Michael, > > I have attached full catalina.out logs for your reference. I am seeing > this error while starting tomcat first time after deploying war. Note: I > did not get chance to run those setup script as tomcat did not start > properly. I am using Usergrid-2.1.0-rc1, cassandra-1.2.19 and > elasticsearch-1.7. I also tried same with cassandra-2.2 > > here is snippet of error > > me.prettyprint.hector.api.exceptions.HInvalidRequestException: > InvalidRequestException(why:Keyspace 'Usergrid_Applications' does not exist) > at > me.prettyprint.cassandra.connection.client.HThriftClient.getCassandra(HThriftClient.java:112) > at > me.prettyprint.cassandra.connection.HConnectionManager.operateWithFailover(HConnectionManager.java:251) > at > me.prettyprint.cassandra.service.KeyspaceServiceImpl.operateWithFailover(KeyspaceServiceImpl.java:132) > at > me.prettyprint.cassandra.service.KeyspaceServiceImpl.getSlice(KeyspaceServiceImpl.java:290) > at > me.prettyprint.cassandra.service.VirtualKeyspaceServiceImpl.getSlice(VirtualKeyspaceServiceImpl.java:133) > at > me.prettyprint.cassandra.model.thrift.ThriftSliceQuery$1.doInKeyspace(ThriftSliceQuery.java:53) > at > me.prettyprint.cassandra.model.thrift.ThriftSliceQuery$1.doInKeyspace(ThriftSliceQuery.java:49) > at > me.prettyprint.cassandra.model.KeyspaceOperationCallback.doInKeyspaceAndMeasure(KeyspaceOperationCallback.java:20) > at > me.prettyprint.cassandra.model.ExecutingVirtualKeyspace.doExecute(ExecutingVirtualKeyspace.java:53) > at > me.prettyprint.cassandra.model.thrift.ThriftSliceQuery.execute(ThriftSliceQuery.java:48) > at > org.apache.usergrid.mq.cassandra.io.AbstractSearch.getQueueBounds(AbstractSearch.java:263) > at > org.apache.usergrid.mq.cassandra.io.ConsumerTransaction.getResults(ConsumerTransaction.java:213) > at > org.apache.usergrid.mq.cassandra.QueueManagerImpl.getFromQueue(QueueManagerImpl.java:412) > at > org.apache.usergrid.batch.service.SchedulerServiceImpl.getJobs(SchedulerServiceImpl.java:168) > at > org.apache.usergrid.batch.service.JobSchedulerService.runOneIteration(JobSchedulerService.java:118) > at > com.google.common.util.concurrent.AbstractScheduledService$1$1.run(AbstractScheduledService.java:174) > at com.google.common.util.concurrent.Callables$3.run(Callables.java:95) > at > java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511) > at java.util.concurrent.FutureTask.runAndReset(FutureTask.java:308) > at > java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$301(ScheduledThreadPoolExecutor.java:180) > at > java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:294) > at > java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142) > at > java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) > at java.lang.Thread.run(Thread.java:745) > Caused by: InvalidRequestException(why:Keyspace 'Usergrid_Applications' > does not exist) > at > org.apache.cassandra.thrift.Cassandra$set_keyspace_result.read(Cassandra.java:5540) > at org.apache.thrift.TServiceClient.receiveBase(TServiceClient.java:78) > at > org.apache.cassandra.thrift.Cassandra$Client.recv_set_keyspace(Cassandra.java:540) > at > org.apache.cassandra.thrift.Cassandra$Client.set_keyspace(Cassandra.java:527) > at > me.prettyprint.cassandra.connection.client.HThriftClient.getCassandra(HThriftClient.java:110) > ... 23 more > > Thanks, > Jigar > > > On Wed, Feb 10, 2016 at 2:09 AM, Michael Russo <[email protected]> > wrote: > >> Can you provide the full curl commands (omitting any password) that you >> executed on the tomcat server? Ensure that the following property is set >> as sysadmin privileges are required for the setup: >> *usergrid.sysadmin.login.allowed=true* >> >> What was the http response when running those commands? >> >> Did you notice anything in the catalina.out logs when you executed the >> request? There should be some information if this failed (aside from the >> errors containing "why: Keyspace 'Usergrid_Applications' does not exist >> "). >> >> Thanks. >> -Michael >> >> On Tue, Feb 9, 2016 at 11:11 AM, J Captain <[email protected]> >> wrote: >> >>> Hi, >>> >>> I am trying to run Usergrid 2.1 code with Cassandra 1.2 and >>> ElesticSearch 1.4. When I start tomcat with ROOT.war I get this error. >>> (why: Keyspace 'Usergrid_Applications' does not exist ) Every where I >>> checked, they are asking to executing three curl commands for setting up >>> the database, >>> >>> Setup calls: >>> PUT http://localhost:8080/system/database/setup >>> PUT http://localhost:8080/system/database/bootstrap >>> GET http://localhost:8080/system/superuser/setup >>> >>> but how can I run them when my tomcat does not start properly? I tried >>> Usergrid1.0 and it works fine. 1.0 does not try to access these keyspace on >>> tomcat start up. >>> >>> I am totally stuck with this issue. Obviously I am missing something. >>> Please help. >>> >>> Thanks, >>> Jigar >>> >> >> >
