2

I have setup Apache Usergrid on our local windows machine but on startup tomcat shows errors in the log. Due to this we are also not able to access the usergrid application. Below is the error log for the reference. Thanks!

connectionpool.impl.Slf4jConnectionPoolMonitorImpl.incOperationFailure(31)<RingDescribeAutoDiscovery>- BadRequestException: [host=127.0.0.1(127.0.0.1):9160, latency=2(2), attempts=1]InvalidRequestException(why:Keyspace 'Usergrid_Applications' does not exist)

2015-11-29 12:45:04 ERROR cassandra.io.AbstractSearch.getQueueBounds(272)<JobSchedulerService RUNNING>- Error getting oldest queue message ID
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
SnareChops
  • 13,175
  • 9
  • 69
  • 91
Sanjeev
  • 21
  • 3

2 Answers2

1

Looks like you didn't do the Usergrid Database & Super User Setup as outlined in the Deploying to Tomcat steps.

You can use http://dbeaver.jkiss.org to access C* and see if Usergrid is able to successfully setup the keyspaces when you run through the steps.

  • Thanks! Brock!, I have tried to setup database using URL 'http://localhost:8080/system/database/setup' but it was throwing an error message '{"error":"uncaught","timestamp":1448900949907,"duration":1,"error_description":"Internal Server Error","exception":"org.apache.usergrid.rest.exceptions.UncaughtException","error_id":"7bd511a5-977f-11e5-a802-047d7bee26f8"}', I think i have mistaken in setting up values in property file (usergrid-deployment.properties). but not sure what exactly it is. Please suggest. Thanks! – Sanjeev Nov 30 '15 at 16:41
  • @Sanjeev try localhost:8080/status and see what things look like. Keep your Usergrid properties file as simple as possible in the beginning so that you can troubleshoot easier. It would also be helpful if you post what version of Usergrid you are using. – Brock Freeman Dec 01 '15 at 16:55
  • I am using following usergrid-master branch cassanda: 2.2.3 elasticsearch: 2.1.0 – Sanjeev Dec 05 '15 at 14:50
  • 1
    just an update: we have used the lower version of cassandra (1.2.1) and elasticsearc (1.4.4) and now it is working. – Sanjeev Dec 30 '15 at 08:19
0

After struggling with this problem for very long, i realized that in my case elasticsearch 1.7.6 as well as 2.x does not start without an additional config in /etc/default/elasticsearch. Just adding this line START_DAEMON=true in the file and restarting elasticsearch worked for me on Ubuntu 16.04.

Now able to connect to setup usergrid successfully. Had searched for the answer everywhere but could not find any reference till now. Hence thought of posting. The stack I am using is 1. apache-usergrid-2.1.0 2. cassandra 3.7 3. tomcat8 4. elasticsearch 2.4.4

I had almost given up on using usergrid due to this issue.

ganaraj
  • 420
  • 3
  • 13
  • As per documentation it says ES should be either 1.4.x or 1.7.x. How did you managed the 2.4.4 version to work? The same for Apache Cassandra 1.2.x or 2.x and you used 3.7? No problems? – Estevex May 26 '17 at 14:35