Grails Webapp failure to deploy to AWS elasticsearch issue -


i using grails 2.4.4 , amazon web service free tier

i used tutorial , able deploy working grails app elastic beanstalk.

i installed weceem plugin. able cms run locally, connecting local running sql database.

my aws instance running : 32bit amazon linux 2014.03 v1.1.0 running tomcat 7 java 7 default rds mysql 5.6.22

below aws log shows stacktrace:

at org.apache.catalina.util.lifecyclebase.start(lifecyclebase.java:150) @ org.apache.catalina.core.containerbase.addchildinternal(containerbase.java:901) @ org.apache.catalina.core.containerbase.addchild(containerbase.java:877) @ org.apache.catalina.core.standardhost.addchild(standardhost.java:649) @ org.apache.catalina.startup.hostconfig.deploydirectory(hostconfig.java:1247) @ org.apache.catalina.startup.hostconfig$deploydirectory.run(hostconfig.java:1898) @ java.util.concurrent.executors$runnableadapter.call(executors.java:471) @ java.util.concurrent.futuretask.run(futuretask.java:262) @ java.util.concurrent.threadpoolexecutor.runworker(threadpoolexecutor.java:1145) @ java.util.concurrent.threadpoolexecutor$worker.run(threadpoolexecutor.java:615) @ java.lang.thread.run(thread.java:745) caused by: org.elasticsearch.discovery.masternotdiscoveredexception: waited [30s] @ org.elasticsearch.action.support.master.transportmasternodeoperationaction$4.ontimeout(transportmasternodeoperationaction.java:164) @ org.elasticsearch.cluster.clusterstateobserver$observerclusterstatelistener.ontimeout(clusterstateobserver.java:239) @ org.elasticsearch.cluster.service.internalclusterservice$notifytimeout.run(internalclusterservice.java:497) ... 3 more 2015-05-14 21:33:31,750 [localhost-startstop-1] error stacktrace  - full stack trace: org.elasticsearch.discovery.masternotdiscoveredexception: waited [30s] @ org.elasticsearch.action.support.master.transportmasternodeoperationaction$4.ontimeout(transportmasternodeoperationaction.java:164) @ org.elasticsearch.cluster.clusterstateobserver$observerclusterstatelistener.ontimeout(clusterstateobserver.java:239) @ org.elasticsearch.cluster.service.internalclusterservice$notifytimeout.run(internalclusterservice.java:497) @ java.util.concurrent.threadpoolexecutor.runworker(threadpoolexecutor.java:1145) @ java.util.concurrent.threadpoolexecutor$worker.run(threadpoolexecutor.java:615) @ java.lang.thread.run(thread.java:745) 2015-05-14 21:33:31,750 [localhost-startstop-1] error stacktrace  - full stack trace: org.springframework.beans.factory.beancreationexception: error creating bean name 'searchableclassmappingconfigurator': invocation of init method failed; nested exception org.elasticsearch.discovery.masternotdiscoveredexception: waited [30s] @ java.util.concurrent.executors$runnableadapter.call(executors.java:471) @ java.util.concurrent.futuretask.run(futuretask.java:262) @ java.util.concurrent.threadpoolexecutor.runworker(threadpoolexecutor.java:1145) @ java.util.concurrent.threadpoolexecutor$worker.run(threadpoolexecutor.java:615) @ java.lang.thread.run(thread.java:745) caused by: org.elasticsearch.discovery.masternotdiscoveredexception: waited [30s] @ org.elasticsearch.action.support.master.transportmasternodeoperationaction$4.ontimeout(transportmasternodeoperationaction.java:164) @ org.elasticsearch.cluster.clusterstateobserver$observerclusterstatelistener.ontimeout(clusterstateobserver.java:239) @ org.elasticsearch.cluster.service.internalclusterservice$notifytimeout.run(internalclusterservice.java:497) ... 3 more 2015-05-14 21:33:31,750 [localhost-startstop-1] error stacktrace  - full stack trace: org.springframework.beans.factory.beancreationexception: error creating bean name 'searchableclassmappingconfigurator': invocation of init method failed; nested exception org.elasticsearch.discovery.masternotdiscoveredexception: waited [30s] @ java.util.concurrent.executors$runnableadapter.call(executors.java:471) @ java.util.concurrent.futuretask.run(futuretask.java:262) @ java.util.concurrent.threadpoolexecutor.runworker(threadpoolexecutor.java:1145) @ java.util.concurrent.threadpoolexecutor$worker.run(threadpoolexecutor.java:615) @ java.lang.thread.run(thread.java:745) caused by: org.elasticsearch.discovery.masternotdiscoveredexception: waited [30s] @ org.elasticsearch.action.support.master.transportmasternodeoperationaction$4.ontimeout(transportmasternodeoperationaction.java:164) @ org.elasticsearch.cluster.clusterstateobserver$observerclusterstatelistener.ontimeout(clusterstateobserver.java:239) @ org.elasticsearch.cluster.service.internalclusterservice$notifytimeout.run(internalclusterservice.java:497) ... 3 more 2015-05-14 21:33:31,750 [localhost-startstop-1] error stacktrace  - full stack trace: org.elasticsearch.discovery.masternotdiscoveredexception: waited [30s] @ org.elasticsearch.action.support.master.transportmasternodeoperationaction$4.ontimeout(transportmasternodeoperationaction.java:164) @ org.elasticsearch.cluster.clusterstateobserver$observerclusterstatelistener.ontimeout(clusterstateobserver.java:239) @ org.elasticsearch.cluster.service.internalclusterservice$notifytimeout.run(internalclusterservice.java:497) @ java.util.concurrent.threadpoolexecutor.runworker(threadpoolexecutor.java:1145) @ java.util.concurrent.threadpoolexecutor$worker.run(threadpoolexecutor.java:615) @ java.lang.thread.run(thread.java:745) 2015-05-14 21:33:31,750 [localhost-startstop-1] error stacktrace  - full stack trace: org.springframework.beans.factory.beancreationexception: error creating bean name 'searchableclassmappingconfigurator': invocation of init method failed; nested exception org.elasticsearch.discovery.masternotdiscoveredexception: waited [30s] @ java.util.concurrent.executors$runnableadapter.call(executors.java:471) @ java.util.concurrent.futuretask.run(futuretask.java:262) @ java.util.concurrent.threadpoolexecutor.runworker(threadpoolexecutor.java:1145) @ java.util.concurrent.threadpoolexecutor$worker.run(threadpoolexecutor.java:615) @ java.lang.thread.run(thread.java:745) caused by: org.elasticsearch.discovery.masternotdiscoveredexception: waited [30s] @ org.elasticsearch.action.support.master.transportmasternodeoperationaction$4.ontimeout(transportmasternodeoperationaction.java:164) @ org.elasticsearch.cluster.clusterstateobserver$observerclusterstatelistener.ontimeout(clusterstateobserver.java:239) @ org.elasticsearch.cluster.service.internalclusterservice$notifytimeout.run(internalclusterservice.java:497) ... 3 more 2015-05-14 21:33:31,751 [localhost-startstop-1] error stacktrace  - full stack trace: org.springframework.beans.factory.beancreationexception: error creating bean name 'searchableclassmappingconfigurator': invocation of init method failed; nested exception org.elasticsearch.discovery.masternotdiscoveredexception: waited [30s] @ java.util.concurrent.executors$runnableadapter.call(executors.java:471) @ java.util.concurrent.futuretask.run(futuretask.java:262) @ java.util.concurrent.threadpoolexecutor.runworker(threadpoolexecutor.java:1145) @ java.util.concurrent.threadpoolexecutor$worker.run(threadpoolexecutor.java:615) @ java.lang.thread.run(thread.java:745) caused by: org.elasticsearch.discovery.masternotdiscoveredexception: waited [30s] @ org.elasticsearch.action.support.master.transportmasternodeoperationaction$4.ontimeout(transportmasternodeoperationaction.java:164) @ org.elasticsearch.cluster.clusterstateobserver$observerclusterstatelistener.ontimeout(clusterstateobserver.java:239) @ org.elasticsearch.cluster.service.internalclusterservice$notifytimeout.run(internalclusterservice.java:497) ... 3 more 2015-05-14 21:33:31,751 [localhost-startstop-1] error stacktrace  - full stack trace: org.elasticsearch.discovery.masternotdiscoveredexception: waited [30s] @ org.elasticsearch.action.support.master.transportmasternodeoperationaction$4.ontimeout(transportmasternodeoperationaction.java:164) @ org.elasticsearch.cluster.clusterstateobserver$observerclusterstatelistener.ontimeout(clusterstateobserver.java:239) @ org.elasticsearch.cluster.service.internalclusterservice$notifytimeout.run(internalclusterservice.java:497) @ java.util.concurrent.threadpoolexecutor.runworker(threadpoolexecutor.java:1145) @ java.util.concurrent.threadpoolexecutor$worker.run(threadpoolexecutor.java:615) @ java.lang.thread.run(thread.java:745) 2015-05-14 21:33:31,751 [localhost-startstop-1] error stacktrace  - full stack trace: org.springframework.beans.factory.beancreationexception: error creating bean name 'searchableclassmappingconfigurator': invocation of init method failed; nested exception org.elasticsearch.discovery.masternotdiscoveredexception: waited [30s] @ java.util.concurrent.executors$runnableadapter.call(executors.java:471) @ java.util.concurrent.futuretask.run(futuretask.java:262) @ java.util.concurrent.threadpoolexecutor.runworker(threadpoolexecutor.java:1145) @ java.util.concurrent.threadpoolexecutor$worker.run(threadpoolexecutor.java:615) @ java.lang.thread.run(thread.java:745) caused by: org.elasticsearch.discovery.masternotdiscoveredexception: waited [30s] @ org.elasticsearch.action.support.master.transportmasternodeoperationaction$4.ontimeout(transportmasternodeoperationaction.java:164) @ org.elasticsearch.cluster.clusterstateobserver$observerclusterstatelistener.ontimeout(clusterstateobserver.java:239) @ org.elasticsearch.cluster.service.internalclusterservice$notifytimeout.run(internalclusterservice.java:497) ... 3 more 

build config:

grails.servlet.version = "3.0" // change depending on target container compliance (2.5 or 3.0) grails.project.class.dir = "target/classes" grails.project.test.class.dir = "target/test-classes" grails.project.test.reports.dir = "target/test-reports" grails.project.work.dir = "target/work" grails.project.target.level = 1.6 grails.project.source.level = 1.6 //grails.project.war.file = "target/${appname}-${appversion}.war"  grails.project.fork = [     // configure settings compilation jvm, note if alter groovy version forked compilation required     //  compile: [maxmemory: 256, minmemory: 64, debug: false, maxperm: 256, daemon:true],      // configure settings test-app jvm, uses daemon default    // test: [maxmemory: 768, minmemory: 64, debug: false, maxperm: 256, daemon:true],     // configure settings run-app jvm     run: [maxmemory: 768, minmemory: 64, debug: false, maxperm: 256, forkreserve:false],     // configure settings run-war jvm     war: [maxmemory: 768, minmemory: 64, debug: false, maxperm: 256, forkreserve:false],     // configure settings console ui jvm     console: [maxmemory: 768, minmemory: 64, debug: false, maxperm: 256] ]  grails.project.dependency.resolver = "maven" // or ivy grails.project.dependency.resolution = {     // inherit grails' default dependencies     inherits("global") {         // specify dependency exclusions here; example, uncomment disable ehcache:         // excludes 'ehcache'     }     log "error" // log level of ivy resolver, either 'error', 'warn', 'info', 'debug' or 'verbose'     checksums true // whether verify checksums on resolve     legacyresolve false // whether secondary resolve on plugin installation, not advised , here backwards compatibility      repositories {         inherits true // whether inherit repository definitions plugins          grailsplugins()         grailshome()         mavenlocal()         grailscentral()         mavencentral()         // uncomment these (or add new ones) enable remote dependency resolution public maven repositories         //mavenrepo "http://repository.codehaus.org"         //mavenrepo "http://download.java.net/maven/2/"         //mavenrepo "http://repository.jboss.com/maven2/"     }      dependencies {         // specify dependencies here under either 'build', 'compile', 'runtime', 'test' or 'provided' scopes e.g.          runtime 'mysql:mysql-connector-java:5.1.29'         // runtime 'org.postgresql:postgresql:9.3-1101-jdbc41'         test "org.grails:grails-datastore-test-support:1.0.2-grails-2.4"     }      plugins {         // plugins build system         build ":tomcat:7.0.55"          // plugins compile step         compile ":scaffolding:2.1.2"         compile ':cache:1.1.8'         compile ":asset-pipeline:1.9.9"         compile ':weceem:1.3'          // plugins needed @ runtime not compilation         runtime ":hibernate4:4.3.6.1" // or ":hibernate:3.6.10.18"         runtime ":database-migration:1.4.0"         runtime ":jquery:1.11.1"          // uncomment these enable additional asset-pipeline capabilities         //compile ":sass-asset-pipeline:1.9.0"         //compile ":less-asset-pipeline:1.10.0"         //compile ":coffee-asset-pipeline:1.8.0"         //compile ":handlebars-asset-pipeline:1.3.0.3"     } } 

datasource(with user/pass removed)

datasource {     pooled = true     //jmxexport = true     driverclassname = "com.mysql.jdbc.driver"     username = "user"     password = "pass"     dialect = org.hibenate.dialect.mysql5innodbdialect } hibernate {     cache.use_second_level_cache = true     cache.use_query_cache = false //    cache.region.factory_class = 'net.sf.ehcache.hibernate.ehcacheregionfactory' // hibernate 3     cache.region.factory_class = 'org.hibernate.cache.ehcache.ehcacheregionfactory' // hibernate 4     singlesession = true // configure osiv singlesession mode     flush.mode = 'manual' // osiv session flush mode outside of transactional context }  // environment specific settings environments {     development {         datasource {             dbcreate = "create"             url = "jdbc:mysql://localhost:3306/awscms"             username = "user"             password = "pass"         }     }      test {         datasource {             dbcreate = "create-drop"             url = "jdbc:mysql://localhost:3306/awscms"             username = "user"             password = "pass"         }     }     production {         datasource {             username = "user"             password = "pass"             pooled = true             dbcreate = "update"             driverclassname = "com.mysql.jdbc.driver"             url = "jdbc:mysql://aapshm8qd9vgr5.cwahcflovjur.us-east-1.rds.amazonaws.com:3306/ebdb?user=user&password=pass"             dialect = org.hibernate.dialect.mysql5innodbdialect             properties {                 validationquery = "select 1"                 testonborrow = true                 testonreturn = true                 testwhileidle = true                 timebetweenevictionrunsmillis = 1800000                 numtestsperevictionrun = 3                 minevictableidletimemillis = 1800000             }         }     } } 

weceem uses elasticsearch plugin need add some settings in grails config file in order configure local elasticsearch node, similar (but matching environment , needs)

elasticsearch.datastoreimpl = 'hibernatedatastore' elasticsearch.bulkindexonstartup = true elasticsearch.disableautoindex = false elasticsearch.client.mode = 'local' elasticsearch.index.store.type = 'memory' // store local node in memory , not on disk 

Comments

Popular posts from this blog

c++ - Difference between pre and post decrement in recursive function argument -

php - Nothing but 'run(); ' when browsing to my local project, how do I fix this? -

php - How can I echo out this array? -