Hi again --

All right, making slow progress, but I'm stuck again. Attempting to curl status fails after a pretty long timeout:

root@vmu-psulonen2:/var/log/tomcat7# curl http://localhost:8080/status
{"error":"uncaught","timestamp":1465195897823,"duration":0,"error_description":"Internal Server Error","exception":"org.apache.usergrid.rest.exceptions.UncaughtException","error_id":"1daa4fe9-2bb3-11e6-9b84-08002798df4e"}

The catalina.out log has quite a lot of stuff in it. From the relevant time:

08:51:37,823 ERROR AbstractExceptionMapper:106 - Server Error (500):
{"error":"uncaught","timestamp":1465195897823,"duration":0,"error_description":"Internal Server Error","exception":"org.apache.usergrid.rest.exceptions.UncaughtException","error_id":"1daa4fe9-2bb3-11e6-9b84-08002798df4e"} 08:51:37,828 INFO UsergridSystemMonitor:103 - TimerThreshold triggered on duration: 30009
{"path":"/status","applicationId":null}
----------------
08:51:39,588 WARN unicast:460 - [default] failed to send ping to [[#zen_unicast_1#][vmu-psulonen2][inet[/127.0.0.1:9200]]] org.elasticsearch.transport.ReceiveTimeoutTransportException: [][inet[/127.0.0.1:9200]][internal:discovery/zen/unicast_gte_1_4] request_id [267] timed out after [3751ms] at org.elasticsearch.transport.TransportService$TimeoutHandler.run(TransportService.java:366) 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)
08:51:42,076  INFO JobSchedulerService:97 - Running one check iteration ...
08:51:42,077 INFO CassandraMQUtils:249 - QueueManagerFactoryImpl.getFromQueue: /jobs/ 08:51:42,145 ERROR AbstractSearch:272 - 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)

I figure the "Keyspace 'Usergrid_Applications' does not exist" errors are because the database isn't initialised. However curl'ing the DB init URL from the config doc results in a similar error as my status call above. Additionally, there are those failed pings to elasticsearch; I did telnet to 127.0.0.1 9200 and the port does connect.

There's more stuff in the log from the startup but I'm not sure how relevant it is.

Your help is again much appreciated,

Petteri

On 03/06/16 15:35, Dave wrote:
The root cause of the problem appears to be this:

me.prettyprint.hector.api.exceptions.HectorException: All host pools marked down.

That exception means that Hector (one of the Cassandra clients we use) cannot contact Cassandra. Usually this means that you have the wrong value in one of the Cassandra-related configuration properties (hostname or port is wrong), Cassandra is not running or some network issue is preventing connection to Cassandra.

By default we have this:
   cassandra.url=localhost:9160

Usergrid will connect to Cassandra and expects Thrift protocol on port 9160. I wonder: do you have to explicitly enable Thrift on that port in Cassandra 3.x?

Dave



On Fri, Jun 3, 2016 at 8:49 AM Petteri Sulonen <[email protected] <mailto:[email protected]>> wrote:

    Hi, folks --

    I'm evaluating Usergrid as a candidate for our cloud service backend,
    and am attempting to set up a simple, single-node, single-server
    installation of it, but can't get it to respond;
    http://localhost:8080/status comes back with a blank 404.

    I'm following the instructions here:
    https://usergrid.apache.org/docs/installation/deployment-guide.html.

    OS: Ubuntu 16.04 (server)

    Java version: 1.8.0_91 (Oracle)

    Cassandra:

    $ cqlsh

    Connected to Test Cluster at 127.0.0.1:9042 <http://127.0.0.1:9042>.
    [cqlsh 5.0.1 | Cassandra 3.0.6 | CQL spec 3.4.0 | Native protocol v4]
    Use HELP for help.

    Elasticsearch:

    $ curl http://localhost:9200
    {
       "name" : "Devos the Devastator",
       "cluster_name" : "elasticsearch",
       "version" : {
         "number" : "2.3.3",
         "build_hash" : "218bdf10790eef486ff2c41a3df5cfa32dadcfde",
         "build_timestamp" : "2016-05-17T15:40:04Z",
         "build_snapshot" : false,
         "lucene_version" : "5.5.0"
       },
       "tagline" : "You Know, for Search"
    }

    ROOT.war is in /var/lib/tomcat7/webapps.

    When I start Tomcat7, I get the following in
    /var/log/tomcat7/catalina.out:

    14:22:50,304  INFO AbstractLockManager:70 - HLockManagerConfigurator
    [keyspaceName=Locks, lockManagerCF=HLocks, rowsCacheEnabled=true,
    locksTTLInMillis=2000, backOffRetryDelayInMillis=100, replicationFac
    tor=1, numberOfLockObserverThreads=1, maxSelectSize=10]
    14:22:50,339  WARN XmlWebApplicationContext:486 - Exception
    encountered
    during context initialization - cancelling refresh attempt
    org.springframework.beans.factory.BeanCreationException: Error
    creating
    bean with name 'shiroFilter' defined in class path resource
    [usergrid-rest-context.xml]: BeanPostProcessor before instantiation of
    bean failed; nested exception is
    org.springframework.beans.factory.BeanCreationException: Error
    creating
    bean with name
    
'org.apache.shiro.spring.security.interceptor.AuthorizationAttributeSourceAdvisor#0
    ' defined in class path resource [usergrid-rest-context.xml]: Cannot
    resolve reference to bean 'securityManager' while setting bean
    property
    'securityManager'; nested exception is org.springframework.bea
    ns.factory.BeanCreationException: Error creating bean with name
    'securityManager' defined in class path resource
    [usergrid-rest-context.xml]: Cannot resolve reference to bean 'realm'
    while setting bean p
    roperty 'realm'; nested exception is
    org.springframework.beans.factory.BeanCreationException: Error
    creating
    bean with name 'realm': Injection of autowired dependencies failed;
    nested exception is org.sp
    ringframework.beans.factory.BeanCreationException: Could not autowire
    method: public void
    
org.apache.usergrid.security.shiro.Realm.setEntityManagerFactory(org.apache.usergrid.persistence.EntityManagerFac
    tory); nested exception is
    org.springframework.beans.factory.BeanCreationException: Error
    creating
    bean with name 'entityManagerFactory' defined in class path resource
    [usergrid-core-context.xml]: Cannot
      resolve reference to bean 'cassandraService' while setting
    constructor
    argument; nested exception is
    org.springframework.beans.factory.BeanCreationException: Error
    creating
    bean with name 'cassandraServ
    ice' defined in class path resource [usergrid-core-context.xml]:
    Cannot
    resolve reference to bean 'lockManager' while setting constructor
    argument; nested exception is org.springframework.beans.factory.B
    eanCreationException: Error creating bean with name 'lockManager':
    Invocation of init method failed; nested exception is
    me.prettyprint.hector.api.exceptions.HectorException: All host pools
    marked down.
    Retry burden pushed out to client.
    Related cause:
    org.springframework.beans.factory.BeanCurrentlyInCreationException:
    Error creating bean with name 'shiroFilter': Requested bean is
    currently
    in creation: Is there an unresolvable circular
    reference?

    I'm kind of stuck and would appreciate any help.

    With best regards,

    Petteri Sulonen



Attachment: smime.p7s
Description: S/MIME Cryptographic Signature

Reply via email to