mstein / elasticsearch-grails-plugin

ElasticSearch grails plugin
Based on Graeme Rocher initial stub. Note that it is still in early stage.
Other
62 stars 164 forks source link

No bean named 'elasticSearchClient' is defined #13

Open berinle opened 12 years ago

berinle commented 12 years ago

In my sample grails application (@ https://github.com/berinle/grails-search-app), if I deploy to a stand alone tomcat server and try to update the war (by copying a newly generated war file of the application) to webapp directory, I get the error above.

Here is a snippet of the stack trace:

2012-02-10 10:56:44,005 [pool-2-thread-2] ERROR context.GrailsContextLoader - Error occurred shutting down plug-in manager: No bean named 'elasticSearchClient' is defined org.springframework.beans.factory.NoSuchBeanDefinitionException: No bean named 'elasticSearchClient' is defined at ElasticsearchGrailsPlugin$_closure3.doCall(ElasticsearchGrailsPlugin.groovy:144) at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:441) at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303) at java.util.concurrent.FutureTask.run(FutureTask.java:138) at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908) at java.lang.Thread.run(Thread.java:680)

Seems the plugin can't handle re-deployments properly

smaldini commented 12 years ago

https://github.com/mstein/elasticsearch-grails-plugin/blob/master/ElasticsearchGrailsPlugin.groovy#L144 It looks like that shutdown hook doesn't support it... Maybe similar to issue #12.

berinle commented 12 years ago

Anyway the bean could have been destroyed before the shutdown hook event? Is this related to tomcat per-se or a version of it? Perhaps a slight modification to the shutdown hook will be checking if the bean exists at all before processing to invoke methods on it.

smaldini commented 12 years ago

Yes, the bean declares the shutdown method too. It's likely due to an 1.3.7 issue with this hook which allowed plugin to work at this time ! Now it seems the hook works in grails 2.0.0, anyway in both cases it's useless.

berinle commented 12 years ago

Here is the full stack trace with the logging for the es-plugin turned on.

I hope that gives you some insight as to what is going on.

INFO: Starting Servlet Engine: Apache Tomcat/7.0.25 Feb 14, 2012 11:14:15 AM org.apache.catalina.startup.HostConfig deployWAR INFO: Deploying web application archive /Users/berinle/devtools/server/apache-tomcat-7.0.25/webapps/search.war 2012-02-14 11:14:21,539 [pool-2-thread-1] DEBUG elasticsearch.ClientNodeFactoryBean - Local ElasticSearch client with default store type configured. 2012-02-14 11:14:22,762 [pool-2-thread-1] DEBUG mapping.SearchableClassMappingConfigurator - Retrieved index settings 2012-02-14 11:14:22,762 [pool-2-thread-1] DEBUG mapping.SearchableClassMappingConfigurator - Installing mappings... 2012-02-14 11:14:23,379 [pool-2-thread-1] DEBUG mapping.SearchableClassMappingConfigurator - Index com.mycompany.app1 already exists, skip index creation. 2012-02-14 11:14:23,379 [pool-2-thread-1] DEBUG mapping.SearchableClassMappingConfigurator - [foo] => {foo={properties={name={type=string, include_in_all=true, term_vector=with_positions_offsets}}}} 2012-02-14 11:14:23,384 [pool-2-thread-1] DEBUG mapping.SearchableClassMappingConfigurator - Cluster status: GREEN calling service method 2012-02-14 11:14:24,899 [pool-2-thread-1] DEBUG index.IndexRequestQueue - OperationBatchList cleaned 2012-02-14 11:14:24,901 [pool-2-thread-1] DEBUG index.IndexRequestQueue - OperationBatchList cleaned 2012-02-14 11:14:24,902 [pool-2-thread-1] DEBUG index.IndexRequestQueue - OperationBatchList cleaned 2012-02-14 11:14:24,904 [pool-2-thread-1] DEBUG index.IndexRequestQueue - OperationBatchList cleaned 2012-02-14 11:14:24,906 [pool-2-thread-1] DEBUG index.IndexRequestQueue - OperationBatchList cleaned 2012-02-14 11:14:24,907 [pool-2-thread-1] DEBUG index.IndexRequestQueue - OperationBatchList cleaned 2012-02-14 11:14:24,909 [pool-2-thread-1] DEBUG index.IndexRequestQueue - OperationBatchList cleaned 2012-02-14 11:14:24,911 [pool-2-thread-1] DEBUG index.IndexRequestQueue - OperationBatchList cleaned 2012-02-14 11:14:24,912 [pool-2-thread-1] DEBUG index.IndexRequestQueue - OperationBatchList cleaned 2012-02-14 11:14:24,914 [pool-2-thread-1] DEBUG index.IndexRequestQueue - OperationBatchList cleaned finished saving 10 foos 2012-02-14 11:14:24,914 [pool-2-thread-1] DEBUG index.IndexRequestQueue - OperationBatchList cleaned 2012-02-14 11:14:24,947 [pool-2-thread-1] DEBUG index.IndexRequestQueue - OperationBatchList cleaned 2012-02-14 11:14:24,948 [pool-2-thread-1] DEBUG index.IndexRequestQueue - Reattached entity to session 2012-02-14 11:14:24,991 [pool-2-thread-1] DEBUG index.IndexRequestQueue - Indexing class com.mycompany.app1.Foo(index:com.mycompany.app1,type:foo) of id 80 and source {"name":"some-name-Tue Feb 14 11:14:24 EST 2012"} 2012-02-14 11:14:24,991 [pool-2-thread-1] DEBUG index.IndexRequestQueue - Reattached entity to session 2012-02-14 11:14:24,992 [pool-2-thread-1] DEBUG index.IndexRequestQueue - Indexing class com.mycompany.app1.Foo(index:com.mycompany.app1,type:foo) of id 82 and source {"name":"some-name-Tue Feb 14 11:14:24 EST 2012"} 2012-02-14 11:14:24,992 [pool-2-thread-1] DEBUG index.IndexRequestQueue - Reattached entity to session 2012-02-14 11:14:24,993 [pool-2-thread-1] DEBUG index.IndexRequestQueue - Indexing class com.mycompany.app1.Foo(index:com.mycompany.app1,type:foo) of id 78 and source {"name":"some-name-Tue Feb 14 11:14:24 EST 2012"} 2012-02-14 11:14:24,993 [pool-2-thread-1] DEBUG index.IndexRequestQueue - Reattached entity to session 2012-02-14 11:14:24,993 [pool-2-thread-1] DEBUG index.IndexRequestQueue - Indexing class com.mycompany.app1.Foo(index:com.mycompany.app1,type:foo) of id 81 and source {"name":"some-name-Tue Feb 14 11:14:24 EST 2012"} 2012-02-14 11:14:24,994 [pool-2-thread-1] DEBUG index.IndexRequestQueue - Reattached entity to session 2012-02-14 11:14:24,994 [pool-2-thread-1] DEBUG index.IndexRequestQueue - Indexing class com.mycompany.app1.Foo(index:com.mycompany.app1,type:foo) of id 79 and source {"name":"some-name-Tue Feb 14 11:14:24 EST 2012"} 2012-02-14 11:14:24,995 [pool-2-thread-1] DEBUG index.IndexRequestQueue - Reattached entity to session 2012-02-14 11:14:24,995 [pool-2-thread-1] DEBUG index.IndexRequestQueue - Indexing class com.mycompany.app1.Foo(index:com.mycompany.app1,type:foo) of id 73 and source {"name":"some-name-Tue Feb 14 11:14:24 EST 2012"} 2012-02-14 11:14:24,996 [pool-2-thread-1] DEBUG index.IndexRequestQueue - Reattached entity to session 2012-02-14 11:14:24,996 [pool-2-thread-1] DEBUG index.IndexRequestQueue - Indexing class com.mycompany.app1.Foo(index:com.mycompany.app1,type:foo) of id 76 and source {"name":"some-name-Tue Feb 14 11:14:24 EST 2012"} 2012-02-14 11:14:24,996 [pool-2-thread-1] DEBUG index.IndexRequestQueue - Reattached entity to session 2012-02-14 11:14:24,998 [pool-2-thread-1] DEBUG index.IndexRequestQueue - Indexing class com.mycompany.app1.Foo(index:com.mycompany.app1,type:foo) of id 75 and source {"name":"some-name-Tue Feb 14 11:14:24 EST 2012"} 2012-02-14 11:14:24,998 [pool-2-thread-1] DEBUG index.IndexRequestQueue - Reattached entity to session 2012-02-14 11:14:24,999 [pool-2-thread-1] DEBUG index.IndexRequestQueue - Indexing class com.mycompany.app1.Foo(index:com.mycompany.app1,type:foo) of id 74 and source {"name":"some-name-Tue Feb 14 11:14:24 EST 2012"} 2012-02-14 11:14:24,999 [pool-2-thread-1] DEBUG index.IndexRequestQueue - Reattached entity to session 2012-02-14 11:14:25,000 [pool-2-thread-1] DEBUG index.IndexRequestQueue - Indexing class com.mycompany.app1.Foo(index:com.mycompany.app1,type:foo) of id 77 and source {"name":"some-name-Tue Feb 14 11:14:24 EST 2012"} 2012-02-14 11:14:25,007 [pool-2-thread-1] DEBUG index.IndexRequestQueue - OperationBatchList cleaned ending call! 2012-02-14 11:14:25,008 [pool-2-thread-1] DEBUG index.IndexRequestQueue - OperationBatchList cleaned 2012-02-14 11:14:25,106 [elasticsearch[index]-pool-11-thread-4] DEBUG index.IndexRequestQueue - Batch complete: 10 actions. Feb 14, 2012 11:14:25 AM org.apache.catalina.startup.HostConfig deployDirectory INFO: Deploying web application directory /Users/berinle/devtools/server/apache-tomcat-7.0.25/webapps/docs Feb 14, 2012 11:14:25 AM org.apache.catalina.startup.HostConfig deployDirectory INFO: Deploying web application directory /Users/berinle/devtools/server/apache-tomcat-7.0.25/webapps/examples Feb 14, 2012 11:14:25 AM org.apache.catalina.startup.HostConfig deployDirectory INFO: Deploying web application directory /Users/berinle/devtools/server/apache-tomcat-7.0.25/webapps/host-manager Feb 14, 2012 11:14:25 AM org.apache.catalina.startup.HostConfig deployDirectory INFO: Deploying web application directory /Users/berinle/devtools/server/apache-tomcat-7.0.25/webapps/manager Feb 14, 2012 11:14:25 AM org.apache.catalina.startup.HostConfig deployDirectory INFO: Deploying web application directory /Users/berinle/devtools/server/apache-tomcat-7.0.25/webapps/ROOT Feb 14, 2012 11:14:25 AM org.apache.coyote.AbstractProtocol start INFO: Starting ProtocolHandler ["http-bio-8080"] Feb 14, 2012 11:14:25 AM org.apache.coyote.AbstractProtocol start INFO: Starting ProtocolHandler ["ajp-bio-8009"] Feb 14, 2012 11:14:25 AM org.apache.catalina.startup.Catalina start INFO: Server startup in 9469 ms Feb 14, 2012 11:14:35 AM org.apache.catalina.startup.HostConfig checkResources INFO: Undeploying context [/search] 2012-02-14 11:14:35,384 [ContainerBackgroundProcessor[StandardEngine[Catalina]]] INFO elasticsearch.ClientNodeFactoryBean - Stopping embedded ElasticSearch. 2012-02-14 11:14:35,646 [ContainerBackgroundProcessor[StandardEngine[Catalina]]] DEBUG elasticsearch.ClientNodeFactoryBean - Local ElasticSearch client with default store type configured. Feb 14, 2012 11:14:35 AM org.apache.catalina.loader.WebappClassLoader clearReferencesThreads SEVERE: The web application [/search] appears to have started a thread named [org.elasticsearch.common.base.internal.Finalizer] but has failed to stop it. This is very likely to create a memory leak. Feb 14, 2012 11:14:35 AM org.apache.catalina.loader.WebappClassLoader clearReferencesThreads SEVERE: The web application [/search] appears to have started a thread named [Timer-1] but has failed to stop it. This is very likely to create a memory leak. Feb 14, 2012 11:14:35 AM org.apache.catalina.loader.WebappClassLoader clearReferencesThreads SEVERE: The web application [/search] appears to have started a thread named [elasticsearch[New Goblin][timer]] but has failed to stop it. This is very likely to create a memory leak. Feb 14, 2012 11:14:35 AM org.apache.catalina.loader.WebappClassLoader clearReferencesThreads SEVERE: The web application [/search] appears to have started a thread named [elasticsearch[New Goblin][scheduler]-pool-68-thread-1] but has failed to stop it. This is very likely to create a memory leak. Feb 14, 2012 11:14:35 AM org.apache.catalina.loader.WebappClassLoader clearReferencesThreads SEVERE: The web application [/search] appears to have started a thread named [elasticsearch[New Goblin][ttl_expire]] but has failed to stop it. This is very likely to create a memory leak. Feb 14, 2012 11:14:35 AM org.apache.catalina.loader.WebappClassLoader clearReferencesThreads SEVERE: The web application [/search] appears to have started a thread named [elasticsearch[New Goblin]clusterService#updateTask-pool-71-thread-1] but has failed to stop it. This is very likely to create a memory leak. Feb 14, 2012 11:14:35 AM org.apache.catalina.loader.WebappClassLoader clearReferencesThreads SEVERE: The web application [/search] appears to have started a thread named [elasticsearch[cached]-pool-61-thread-1] but has failed to stop it. This is very likely to create a memory leak. Feb 14, 2012 11:14:35 AM org.apache.catalina.loader.WebappClassLoader clearReferencesThreads SEVERE: The web application [/search] appears to have started a thread named [elasticsearch[New Goblin]riverClusterService#updateTask-pool-70-thread-1] but has failed to stop it. This is very likely to create a memory leak. Feb 14, 2012 11:14:35 AM org.apache.catalina.loader.WebappClassLoader clearReferencesThreads SEVERE: The web application [/search] appears to have started a thread named [New I/O server boss #2 ([id: 0x5c83413f, /0.0.0.0:9200])] but has failed to stop it. This is very likely to create a memory leak. Feb 14, 2012 11:14:35 AM org.apache.catalina.loader.WebappClassLoader checkThreadLocalMapForLeaks SEVERE: The web application [/search] created a ThreadLocal with key of type [org.elasticsearch.common.util.concurrent.jsr166y.ThreadLocalRandom$1](value [org.elasticsearch.common.util.concurrent.jsr166y.ThreadLocalRandom$1@41979448]) and a value of type [org.elasticsearch.common.util.concurrent.jsr166y.ThreadLocalRandom](value [org.elasticsearch.common.util.concurrent.jsr166y.ThreadLocalRandom@4688249c]) but failed to remove it when the web application was stopped. Threads are going to be renewed over time to try and avoid a probable memory leak. Feb 14, 2012 11:14:35 AM org.apache.catalina.loader.WebappClassLoader checkThreadLocalMapForLeaks SEVERE: The web application [/search] created a ThreadLocal with key of type [org.elasticsearch.common.Unicode$2](value [org.elasticsearch.common.Unicode$2@141ba1f1]) and a value of type [org.elasticsearch.common.thread.ThreadLocals.CleanableValue](value [org.elasticsearch.common.thread.ThreadLocals$CleanableValue@2224df87]) but failed to remove it when the web application was stopped. Threads are going to be renewed over time to try and avoid a probable memory leak. Feb 14, 2012 11:14:35 AM org.apache.catalina.loader.WebappClassLoader checkThreadLocalMapForLeaks SEVERE: The web application [/search] created a ThreadLocal with key of type [org.elasticsearch.common.Unicode$1](value [org.elasticsearch.common.Unicode$1@22cf2994]) and a value of type [org.elasticsearch.common.thread.ThreadLocals.CleanableValue](value [org.elasticsearch.common.thread.ThreadLocals$CleanableValue@4eb2c566]) but failed to remove it when the web application was stopped. Threads are going to be renewed over time to try and avoid a probable memory leak. Feb 14, 2012 11:14:35 AM org.apache.catalina.loader.WebappClassLoader checkThreadLocalMapForLeaks SEVERE: The web application [/search] created a ThreadLocal with key of type [org.elasticsearch.common.inject.InjectorImpl$1](value [org.elasticsearch.common.inject.InjectorImpl$1@3abdd3e7]) and a value of type [java.lang.Object[]](value [[Ljava.lang.Object;@4a300d2]) but failed to remove it when the web application was stopped. Threads are going to be renewed over time to try and avoid a probable memory leak. Feb 14, 2012 11:14:35 AM org.apache.catalina.loader.WebappClassLoader checkThreadLocalMapForLeaks SEVERE: The web application [/search] created a ThreadLocal with key of type [org.elasticsearch.common.inject.InjectorImpl$1](value [org.elasticsearch.common.inject.InjectorImpl$1@698add5e]) and a value of type [java.lang.Object[]](value [[Ljava.lang.Object;@1bcb7c74]) but failed to remove it when the web application was stopped. Threads are going to be renewed over time to try and avoid a probable memory leak. Feb 14, 2012 11:14:35 AM org.apache.catalina.loader.WebappClassLoader checkThreadLocalMapForLeaks SEVERE: The web application [/search] created a ThreadLocal with key of type [org.elasticsearch.common.util.concurrent.jsr166y.ThreadLocalRandom$1](value [org.elasticsearch.common.util.concurrent.jsr166y.ThreadLocalRandom$1@41979448]) and a value of type [org.elasticsearch.common.util.concurrent.jsr166y.ThreadLocalRandom](value [org.elasticsearch.common.util.concurrent.jsr166y.ThreadLocalRandom@50dec6da]) but failed to remove it when the web application was stopped. Threads are going to be renewed over time to try and avoid a probable memory leak. Feb 14, 2012 11:14:35 AM org.apache.catalina.loader.WebappClassLoader checkThreadLocalMapForLeaks SEVERE: The web application [/search] created a ThreadLocal with key of type [org.elasticsearch.common.inject.InjectorImpl$1](value [org.elasticsearch.common.inject.InjectorImpl$1@698add5e]) and a value of type [java.lang.Object[]](value [[Ljava.lang.Object;@74169390]) but failed to remove it when the web application was stopped. Threads are going to be renewed over time to try and avoid a probable memory leak. Feb 14, 2012 11:14:35 AM org.apache.catalina.loader.WebappClassLoader findResourceInternal INFO: Illegal access: this web application instance has been stopped already. Could not load default-mapping.json. The eventual following stack trace is caused by an error thrown for debugging purposes as well as to attempt to terminate the thread which caused the illegal access, and has no functional impact. Feb 14, 2012 11:14:35 AM org.apache.catalina.loader.WebappClassLoader findResourceInternal INFO: Illegal access: this web application instance has been stopped already. Could not load config/default-mapping.json. The eventual following stack trace is caused by an error thrown for debugging purposes as well as to attempt to terminate the thread which caused the illegal access, and has no functional impact. Feb 14, 2012 11:14:35 AM org.apache.catalina.loader.WebappClassLoader findResourceInternal INFO: Illegal access: this web application instance has been stopped already. Could not load org/elasticsearch/index/mapper/default-mapping.json. The eventual following stack trace is caused by an error thrown for debugging purposes as well as to attempt to terminate the thread which caused the illegal access, and has no functional impact. Feb 14, 2012 11:14:35 AM org.apache.catalina.loader.WebappClassLoader findResourceInternal INFO: Illegal access: this web application instance has been stopped already. Could not load default-mapping.json. The eventual following stack trace is caused by an error thrown for debugging purposes as well as to attempt to terminate the thread which caused the illegal access, and has no functional impact. Feb 14, 2012 11:14:35 AM org.apache.catalina.loader.WebappClassLoader findResourceInternal INFO: Illegal access: this web application instance has been stopped already. Could not load config/default-mapping.json. The eventual following stack trace is caused by an error thrown for debugging purposes as well as to attempt to terminate the thread which caused the illegal access, and has no functional impact. Feb 14, 2012 11:14:35 AM org.apache.catalina.loader.WebappClassLoader findResourceInternal INFO: Illegal access: this web application instance has been stopped already. Could not load org/elasticsearch/index/mapper/default-mapping.json. The eventual following stack trace is caused by an error thrown for debugging purposes as well as to attempt to terminate the thread which caused the illegal access, and has no functional impact. Feb 14, 2012 11:14:35 AM org.apache.catalina.loader.WebappClassLoader loadClass INFO: Illegal access: this web application instance has been stopped already. Could not load org.elasticsearch.common.inject.internal.MoreTypes$MemberImpl. The eventual following stack trace is caused by an error thrown for debugging purposes as well as to attempt to terminate the thread which caused the illegal access, and has no functional impact. java.lang.IllegalStateException at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1587) at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1546) at org.elasticsearch.common.inject.internal.MoreTypes.memberType(MoreTypes.java:319) at org.elasticsearch.common.inject.internal.MoreTypes.toString(MoreTypes.java:342) at org.elasticsearch.common.inject.spi.InjectionPoint.toString(InjectionPoint.java:170) at org.elasticsearch.common.inject.spi.Message.getSource(Message.java:67) at org.elasticsearch.common.inject.internal.Errors$1.compare(Errors.java:459) at org.elasticsearch.common.inject.internal.Errors$1.compare(Errors.java:457) at java.util.Arrays.mergeSort(Arrays.java:1270) at java.util.Arrays.sort(Arrays.java:1210) at java.util.Collections.sort(Collections.java:159) at org.elasticsearch.common.inject.internal.Errors.getMessages(Errors.java:457) at org.elasticsearch.common.inject.ProviderToInternalFactoryAdapter.get(ProviderToInternalFactoryAdapter.java:51) at org.elasticsearch.common.inject.Scopes$1$1.get(Scopes.java:56) at org.elasticsearch.common.inject.InternalFactoryToProviderAdapter.get(InternalFactoryToProviderAdapter.java:49) at org.elasticsearch.common.inject.SingleParameterInjector.inject(SingleParameterInjector.java:42) at org.elasticsearch.common.inject.SingleParameterInjector.getAll(SingleParameterInjector.java:66) at org.elasticsearch.common.inject.ConstructorInjector.construct(ConstructorInjector.java:85) at org.elasticsearch.common.inject.ConstructorBindingImpl$Factory.get(ConstructorBindingImpl.java:103) at org.elasticsearch.common.inject.ProviderToInternalFactoryAdapter$1.call(ProviderToInternalFactoryAdapter.java:45) at org.elasticsearch.common.inject.InjectorImpl.callInContext(InjectorImpl.java:823) at org.elasticsearch.common.inject.ProviderToInternalFactoryAdapter.get(ProviderToInternalFactoryAdapter.java:42) at org.elasticsearch.common.inject.Scopes$1$1.get(Scopes.java:56) at org.elasticsearch.common.inject.InternalFactoryToProviderAdapter.get(InternalFactoryToProviderAdapter.java:49) at org.elasticsearch.common.inject.SingleParameterInjector.inject(SingleParameterInjector.java:42) at org.elasticsearch.common.inject.SingleParameterInjector.getAll(SingleParameterInjector.java:66) at org.elasticsearch.common.inject.ConstructorInjector.construct(ConstructorInjector.java:85) at org.elasticsearch.common.inject.ConstructorBindingImpl$Factory.get(ConstructorBindingImpl.java:103) at org.elasticsearch.common.inject.FactoryProxy.get(FactoryProxy.java:56) at org.elasticsearch.common.inject.ProviderToInternalFactoryAdapter$1.call(ProviderToInternalFactoryAdapter.java:45) at org.elasticsearch.common.inject.InjectorImpl.callInContext(InjectorImpl.java:823) at org.elasticsearch.common.inject.ProviderToInternalFactoryAdapter.get(ProviderToInternalFactoryAdapter.java:42) at org.elasticsearch.common.inject.Scopes$1$1.get(Scopes.java:56) at org.elasticsearch.common.inject.InternalFactoryToProviderAdapter.get(InternalFactoryToProviderAdapter.java:49) at org.elasticsearch.common.inject.SingleParameterInjector.inject(SingleParameterInjector.java:42) at org.elasticsearch.common.inject.SingleParameterInjector.getAll(SingleParameterInjector.java:66) at org.elasticsearch.common.inject.ConstructorInjector.construct(ConstructorInjector.java:85) at org.elasticsearch.common.inject.ConstructorBindingImpl$Factory.get(ConstructorBindingImpl.java:103) at org.elasticsearch.common.inject.FactoryProxy.get(FactoryProxy.java:56) at org.elasticsearch.common.inject.ProviderToInternalFactoryAdapter$1.call(ProviderToInternalFactoryAdapter.java:45) at org.elasticsearch.common.inject.InjectorImpl.callInContext(InjectorImpl.java:823) at org.elasticsearch.common.inject.ProviderToInternalFactoryAdapter.get(ProviderToInternalFactoryAdapter.java:42) at org.elasticsearch.common.inject.Scopes$1$1.get(Scopes.java:56) at org.elasticsearch.common.inject.InternalFactoryToProviderAdapter.get(InternalFactoryToProviderAdapter.java:49) at org.elasticsearch.common.inject.InjectorBuilder$1.call(InjectorBuilder.java:204) at org.elasticsearch.common.inject.InjectorBuilder$1.call(InjectorBuilder.java:197) at org.elasticsearch.common.inject.InjectorImpl.callInContext(InjectorImpl.java:816) at org.elasticsearch.common.inject.InjectorBuilder.loadEagerSingletons(InjectorBuilder.java:197) at org.elasticsearch.common.inject.InjectorBuilder.injectDynamically(InjectorBuilder.java:179) at org.elasticsearch.common.inject.InjectorBuilder.build(InjectorBuilder.java:114) at org.elasticsearch.common.inject.InjectorImpl.createChildInjector(InjectorImpl.java:138) at org.elasticsearch.common.inject.ModulesBuilder.createChildInjector(ModulesBuilder.java:65) at org.elasticsearch.indices.InternalIndicesService.createIndex(InternalIndicesService.java:288) at org.elasticsearch.indices.cluster.IndicesClusterStateService.applyNewIndices(IndicesClusterStateService.java:304) at org.elasticsearch.indices.cluster.IndicesClusterStateService.clusterChanged(IndicesClusterStateService.java:170) at org.elasticsearch.cluster.service.InternalClusterService$2.run(InternalClusterService.java:271) at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908) at java.lang.Thread.run(Thread.java:680) Exception in thread "elasticsearch[New Goblin]clusterService#updateTask-pool-71-thread-1" java.lang.NoClassDefFoundError: org/elasticsearch/common/inject/internal/MoreTypes$MemberImpl at org.elasticsearch.common.inject.internal.MoreTypes.memberType(MoreTypes.java:319) at org.elasticsearch.common.inject.internal.MoreTypes.toString(MoreTypes.java:342) at org.elasticsearch.common.inject.spi.InjectionPoint.toString(InjectionPoint.java:170) at org.elasticsearch.common.inject.spi.Message.getSource(Message.java:67) at org.elasticsearch.common.inject.internal.Errors$1.compare(Errors.java:459) at org.elasticsearch.common.inject.internal.Errors$1.compare(Errors.java:457) at java.util.Arrays.mergeSort(Arrays.java:1270) at java.util.Arrays.sort(Arrays.java:1210) at java.util.Collections.sort(Collections.java:159) at org.elasticsearch.common.inject.internal.Errors.getMessages(Errors.java:457) at org.elasticsearch.common.inject.ProviderToInternalFactoryAdapter.get(ProviderToInternalFactoryAdapter.java:51) at org.elasticsearch.common.inject.Scopes$1$1.get(Scopes.java:56) at org.elasticsearch.common.inject.InternalFactoryToProviderAdapter.get(InternalFactoryToProviderAdapter.java:49) at org.elasticsearch.common.inject.SingleParameterInjector.inject(SingleParameterInjector.java:42) at org.elasticsearch.common.inject.SingleParameterInjector.getAll(SingleParameterInjector.java:66) at org.elasticsearch.common.inject.ConstructorInjector.construct(ConstructorInjector.java:85) at org.elasticsearch.common.inject.ConstructorBindingImpl$Factory.get(ConstructorBindingImpl.java:103) at org.elasticsearch.common.inject.ProviderToInternalFactoryAdapter$1.call(ProviderToInternalFactoryAdapter.java:45) at org.elasticsearch.common.inject.InjectorImpl.callInContext(InjectorImpl.java:823) at org.elasticsearch.common.inject.ProviderToInternalFactoryAdapter.get(ProviderToInternalFactoryAdapter.java:42) at org.elasticsearch.common.inject.Scopes$1$1.get(Scopes.java:56) at org.elasticsearch.common.inject.InternalFactoryToProviderAdapter.get(InternalFactoryToProviderAdapter.java:49) at org.elasticsearch.common.inject.SingleParameterInjector.inject(SingleParameterInjector.java:42) at org.elasticsearch.common.inject.SingleParameterInjector.getAll(SingleParameterInjector.java:66) at org.elasticsearch.common.inject.ConstructorInjector.construct(ConstructorInjector.java:85) at org.elasticsearch.common.inject.ConstructorBindingImpl$Factory.get(ConstructorBindingImpl.java:103) at org.elasticsearch.common.inject.FactoryProxy.get(FactoryProxy.java:56) at org.elasticsearch.common.inject.ProviderToInternalFactoryAdapter$1.call(ProviderToInternalFactoryAdapter.java:45) at org.elasticsearch.common.inject.InjectorImpl.callInContext(InjectorImpl.java:823) at org.elasticsearch.common.inject.ProviderToInternalFactoryAdapter.get(ProviderToInternalFactoryAdapter.java:42) at org.elasticsearch.common.inject.Scopes$1$1.get(Scopes.java:56) at org.elasticsearch.common.inject.InternalFactoryToProviderAdapter.get(InternalFactoryToProviderAdapter.java:49) at org.elasticsearch.common.inject.SingleParameterInjector.inject(SingleParameterInjector.java:42) at org.elasticsearch.common.inject.SingleParameterInjector.getAll(SingleParameterInjector.java:66) at org.elasticsearch.common.inject.ConstructorInjector.construct(ConstructorInjector.java:85) at org.elasticsearch.common.inject.ConstructorBindingImpl$Factory.get(ConstructorBindingImpl.java:103) at org.elasticsearch.common.inject.FactoryProxy.get(FactoryProxy.java:56) at org.elasticsearch.common.inject.ProviderToInternalFactoryAdapter$1.call(ProviderToInternalFactoryAdapter.java:45) at org.elasticsearch.common.inject.InjectorImpl.callInContext(InjectorImpl.java:823) at org.elasticsearch.common.inject.ProviderToInternalFactoryAdapter.get(ProviderToInternalFactoryAdapter.java:42) at org.elasticsearch.common.inject.Scopes$1$1.get(Scopes.java:56) at org.elasticsearch.common.inject.InternalFactoryToProviderAdapter.get(InternalFactoryToProviderAdapter.java:49) at org.elasticsearch.common.inject.InjectorBuilder$1.call(InjectorBuilder.java:204) at org.elasticsearch.common.inject.InjectorBuilder$1.call(InjectorBuilder.java:197) at org.elasticsearch.common.inject.InjectorImpl.callInContext(InjectorImpl.java:816) at org.elasticsearch.common.inject.InjectorBuilder.loadEagerSingletons(InjectorBuilder.java:197) at org.elasticsearch.common.inject.InjectorBuilder.injectDynamically(InjectorBuilder.java:179) at org.elasticsearch.common.inject.InjectorBuilder.build(InjectorBuilder.java:114) at org.elasticsearch.common.inject.InjectorImpl.createChildInjector(InjectorImpl.java:138) at org.elasticsearch.common.inject.ModulesBuilder.createChildInjector(ModulesBuilder.java:65) at org.elasticsearch.indices.InternalIndicesService.createIndex(InternalIndicesService.java:288) at org.elasticsearch.indices.cluster.IndicesClusterStateService.applyNewIndices(IndicesClusterStateService.java:304) at org.elasticsearch.indices.cluster.IndicesClusterStateService.clusterChanged(IndicesClusterStateService.java:170) at org.elasticsearch.cluster.service.InternalClusterService$2.run(InternalClusterService.java:271) at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908) at java.lang.Thread.run(Thread.java:680) Caused by: java.lang.ClassNotFoundException: org.elasticsearch.common.inject.internal.MoreTypes$MemberImpl at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1701) at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1546) ... 57 more Feb 14, 2012 11:14:35 AM org.apache.catalina.loader.WebappClassLoader findResourceInternal INFO: Illegal access: this web application instance has been stopped already. Could not load default-mapping.json. The eventual following stack trace is caused by an error thrown for debugging purposes as well as to attempt to terminate the thread which caused the illegal access, and has no functional impact. Feb 14, 2012 11:14:35 AM org.apache.catalina.loader.WebappClassLoader findResourceInternal INFO: Illegal access: this web application instance has been stopped already. Could not load config/default-mapping.json. The eventual following stack trace is caused by an error thrown for debugging purposes as well as to attempt to terminate the thread which caused the illegal access, and has no functional impact. Feb 14, 2012 11:14:35 AM org.apache.catalina.loader.WebappClassLoader findResourceInternal INFO: Illegal access: this web application instance has been stopped already. Could not load org/elasticsearch/index/mapper/default-mapping.json. The eventual following stack trace is caused by an error thrown for debugging purposes as well as to attempt to terminate the thread which caused the illegal access, and has no functional impact. Feb 14, 2012 11:14:35 AM org.apache.catalina.loader.WebappClassLoader findResourceInternal INFO: Illegal access: this web application instance has been stopped already. Could not load default-mapping.json. The eventual following stack trace is caused by an error thrown for debugging purposes as well as to attempt to terminate the thread which caused the illegal access, and has no functional impact. Feb 14, 2012 11:14:35 AM org.apache.catalina.loader.WebappClassLoader findResourceInternal INFO: Illegal access: this web application instance has been stopped already. Could not load config/default-mapping.json. The eventual following stack trace is caused by an error thrown for debugging purposes as well as to attempt to terminate the thread which caused the illegal access, and has no functional impact. Feb 14, 2012 11:14:35 AM org.apache.catalina.loader.WebappClassLoader findResourceInternal INFO: Illegal access: this web application instance has been stopped already. Could not load org/elasticsearch/index/mapper/default-mapping.json. The eventual following stack trace is caused by an error thrown for debugging purposes as well as to attempt to terminate the thread which caused the illegal access, and has no functional impact. Exception in thread "elasticsearch[New Goblin]clusterService#updateTask-pool-71-thread-2" java.lang.NoClassDefFoundError: org/elasticsearch/common/inject/internal/MoreTypes$MemberImpl at org.elasticsearch.common.inject.internal.MoreTypes.memberType(MoreTypes.java:319) at org.elasticsearch.common.inject.internal.MoreTypes.toString(MoreTypes.java:342) at org.elasticsearch.common.inject.spi.InjectionPoint.toString(InjectionPoint.java:170) at org.elasticsearch.common.inject.spi.Message.getSource(Message.java:67) at org.elasticsearch.common.inject.internal.Errors$1.compare(Errors.java:459) at org.elasticsearch.common.inject.internal.Errors$1.compare(Errors.java:457) at java.util.Arrays.mergeSort(Arrays.java:1270) at java.util.Arrays.sort(Arrays.java:1210) at java.util.Collections.sort(Collections.java:159) at org.elasticsearch.common.inject.internal.Errors.getMessages(Errors.java:457) at org.elasticsearch.common.inject.ProviderToInternalFactoryAdapter.get(ProviderToInternalFactoryAdapter.java:51) at org.elasticsearch.common.inject.Scopes$1$1.get(Scopes.java:56) at org.elasticsearch.common.inject.InternalFactoryToProviderAdapter.get(InternalFactoryToProviderAdapter.java:49) at org.elasticsearch.common.inject.SingleParameterInjector.inject(SingleParameterInjector.java:42) at org.elasticsearch.common.inject.SingleParameterInjector.getAll(SingleParameterInjector.java:66) at org.elasticsearch.common.inject.ConstructorInjector.construct(ConstructorInjector.java:85) at org.elasticsearch.common.inject.ConstructorBindingImpl$Factory.get(ConstructorBindingImpl.java:103) at org.elasticsearch.common.inject.ProviderToInternalFactoryAdapter$1.call(ProviderToInternalFactoryAdapter.java:45) at org.elasticsearch.common.inject.InjectorImpl.callInContext(InjectorImpl.java:823) at org.elasticsearch.common.inject.ProviderToInternalFactoryAdapter.get(ProviderToInternalFactoryAdapter.java:42) at org.elasticsearch.common.inject.Scopes$1$1.get(Scopes.java:56) at org.elasticsearch.common.inject.InternalFactoryToProviderAdapter.get(InternalFactoryToProviderAdapter.java:49) at org.elasticsearch.common.inject.SingleParameterInjector.inject(SingleParameterInjector.java:42) at org.elasticsearch.common.inject.SingleParameterInjector.getAll(SingleParameterInjector.java:66) at org.elasticsearch.common.inject.ConstructorInjector.construct(ConstructorInjector.java:85) at org.elasticsearch.common.inject.ConstructorBindingImpl$Factory.get(ConstructorBindingImpl.java:103) at org.elasticsearch.common.inject.FactoryProxy.get(FactoryProxy.java:56) at org.elasticsearch.common.inject.ProviderToInternalFactoryAdapter$1.call(ProviderToInternalFactoryAdapter.java:45) at org.elasticsearch.common.inject.InjectorImpl.callInContext(InjectorImpl.java:823) at org.elasticsearch.common.inject.ProviderToInternalFactoryAdapter.get(ProviderToInternalFactoryAdapter.java:42) at org.elasticsearch.common.inject.Scopes$1$1.get(Scopes.java:56) at org.elasticsearch.common.inject.InternalFactoryToProviderAdapter.get(InternalFactoryToProviderAdapter.java:49) at org.elasticsearch.common.inject.SingleParameterInjector.inject(SingleParameterInjector.java:42) at org.elasticsearch.common.inject.SingleParameterInjector.getAll(SingleParameterInjector.java:66) at org.elasticsearch.common.inject.ConstructorInjector.construct(ConstructorInjector.java:85) at org.elasticsearch.common.inject.ConstructorBindingImpl$Factory.get(ConstructorBindingImpl.java:103) at org.elasticsearch.common.inject.FactoryProxy.get(FactoryProxy.java:56) at org.elasticsearch.common.inject.ProviderToInternalFactoryAdapter$1.call(ProviderToInternalFactoryAdapter.java:45) at org.elasticsearch.common.inject.InjectorImpl.callInContext(InjectorImpl.java:823) at org.elasticsearch.common.inject.ProviderToInternalFactoryAdapter.get(ProviderToInternalFactoryAdapter.java:42) at org.elasticsearch.common.inject.Scopes$1$1.get(Scopes.java:56) at org.elasticsearch.common.inject.InternalFactoryToProviderAdapter.get(InternalFactoryToProviderAdapter.java:49) at org.elasticsearch.common.inject.InjectorBuilder$1.call(InjectorBuilder.java:204) at org.elasticsearch.common.inject.InjectorBuilder$1.call(InjectorBuilder.java:197) at org.elasticsearch.common.inject.InjectorImpl.callInContext(InjectorImpl.java:816) at org.elasticsearch.common.inject.InjectorBuilder.loadEagerSingletons(InjectorBuilder.java:197) at org.elasticsearch.common.inject.InjectorBuilder.injectDynamically(InjectorBuilder.java:179) at org.elasticsearch.common.inject.InjectorBuilder.build(InjectorBuilder.java:114) at org.elasticsearch.common.inject.InjectorImpl.createChildInjector(InjectorImpl.java:138) at org.elasticsearch.common.inject.ModulesBuilder.createChildInjector(ModulesBuilder.java:65) at org.elasticsearch.indices.InternalIndicesService.createIndex(InternalIndicesService.java:288) at org.elasticsearch.indices.cluster.IndicesClusterStateService.applyNewIndices(IndicesClusterStateService.java:304) at org.elasticsearch.indices.cluster.IndicesClusterStateService.clusterChanged(IndicesClusterStateService.java:170) at org.elasticsearch.cluster.service.InternalClusterService$2.run(InternalClusterService.java:271) at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908) at java.lang.Thread.run(Thread.java:680) Feb 14, 2012 11:14:36 AM org.apache.catalina.startup.HostConfig deployWAR INFO: Deploying web application archive /Users/berinle/devtools/server/apache-tomcat-7.0.25/webapps/search.war 2012-02-14 11:14:41,130 [pool-2-thread-2] DEBUG elasticsearch.ClientNodeFactoryBean - Local ElasticSearch client with default store type configured. Feb 14, 2012 11:14:47 AM org.apache.catalina.core.StandardContext startInternal SEVERE: Error listenerStart Feb 14, 2012 11:14:47 AM org.apache.catalina.core.StandardContext startInternal SEVERE: Context [/search] startup failed due to previous errors 2012-02-14 11:14:47,305 [pool-2-thread-2] ERROR context.GrailsContextLoader - Error occurred shutting down plug-in manager: No bean named 'elasticSearchClient' is defined org.springframework.beans.factory.NoSuchBeanDefinitionException: No bean named 'elasticSearchClient' is defined at ElasticsearchGrailsPlugin$_closure3.doCall(ElasticsearchGrailsPlugin.groovy:144) at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:441) at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303) at java.util.concurrent.FutureTask.run(FutureTask.java:138) at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908) at java.lang.Thread.run(Thread.java:680) Feb 14, 2012 11:14:47 AM org.apache.catalina.loader.WebappClassLoader clearReferencesThreads SEVERE: The web application [/search] appears to have started a thread named [elasticsearch[Andreas von Strucker][timer]] but has failed to stop it. This is very likely to create a memory leak. Feb 14, 2012 11:14:47 AM org.apache.catalina.loader.WebappClassLoader clearReferencesThreads SEVERE: The web application [/search] appears to have started a thread named [org.elasticsearch.common.base.internal.Finalizer] but has failed to stop it. This is very likely to create a memory leak. Feb 14, 2012 11:14:47 AM org.apache.catalina.loader.WebappClassLoader clearReferencesThreads SEVERE: The web application [/search] appears to have started a thread named [elasticsearch[Andreas von Strucker][scheduler]-pool-89-thread-1] but has failed to stop it. This is very likely to create a memory leak. Feb 14, 2012 11:14:47 AM org.apache.catalina.loader.WebappClassLoader checkThreadLocalMapForLeaks SEVERE: The web application [/search] created a ThreadLocal with key of type [org.elasticsearch.common.inject.InjectorImpl$1](value [org.elasticsearch.common.inject.InjectorImpl$1@22b96281]) and a value of type [java.lang.Object[]](value [[Ljava.lang.Object;@38f214f6]) but failed to remove it when the web application was stopped. Threads are going to be renewed over time to try and avoid a probable memory leak. Feb 14, 2012 11:14:47 AM org.apache.catalina.loader.WebappClassLoader checkThreadLocalMapForLeaks SEVERE: The web application [/search] created a ThreadLocal with key of type [org.elasticsearch.common.util.concurrent.jsr166y.ThreadLocalRandom$1](value [org.elasticsearch.common.util.concurrent.jsr166y.ThreadLocalRandom$1@61c70928]) and a value of type [org.elasticsearch.common.util.concurrent.jsr166y.ThreadLocalRandom](value [org.elasticsearch.common.util.concurrent.jsr166y.ThreadLocalRandom@522a533e]) but failed to remove it when the web application was stopped. Threads are going to be renewed over time to try and avoid a probable memory leak.

mstein commented 12 years ago

Ok, it seems to restart the node right after stopping it... weird.

berinle commented 12 years ago

mstein - not sure i follow? "he seems to restart the node...". me?

All i am trying to do is integrate with our CI server for deployments. Part of the step of commits will mean undeploying the application and re-installing a fresh copy with the new changes. That is where I am facing this issue.

mstein commented 12 years ago

no, I mean that the plugin - or grails - is restarting the ES node just after he stopped it when you stop the app, which it obviously shouldn't (well, not at this moment). sorry, missuse of the "he" pronoun with immaterial thing xD

berinle commented 12 years ago

np. thx for looking into it

rfierst commented 12 years ago

Is there a solution or workaround for this error?