[ https://issues.apache.org/jira/browse/GEODE-1986?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15631107#comment-15631107 ]
John Blum commented on GEODE-1986: ---------------------------------- This is still a bug! New scenario... 1. Start Server 1 with an embedded Locator 2. Start another Server (Server 2) connecting to Server 1's embedded Locator. Witness an exception... {code:java} [FORK] - java.io.EOFException: Locator at /127.0.0.1:11235 did not respond. This is normal if the locator was shutdown. If it wasn't check its log for exceptions. [FORK] - at org.apache.geode.distributed.internal.tcpserver.TcpClient.requestToServer(TcpClient.java:202) [FORK] - at org.apache.geode.distributed.internal.tcpserver.TcpClient.requestToServer(TcpClient.java:130) [FORK] - at org.apache.geode.internal.cache.ClusterConfigurationLoader.requestConfigurationFromLocators(ClusterConfigurationLoader.java:215) [FORK] - at org.apache.geode.internal.cache.GemFireCacheImpl.requestSharedConfiguration(GemFireCacheImpl.java:981) [FORK] - at org.apache.geode.internal.cache.GemFireCacheImpl.initialize(GemFireCacheImpl.java:1135) [FORK] - at org.apache.geode.internal.cache.GemFireCacheImpl.basicCreate(GemFireCacheImpl.java:771) [FORK] - at org.apache.geode.internal.cache.GemFireCacheImpl.create(GemFireCacheImpl.java:758) [FORK] - at org.apache.geode.cache.CacheFactory.create(CacheFactory.java:181) [FORK] - at org.apache.geode.cache.CacheFactory.create(CacheFactory.java:231) [FORK] - at org.springframework.data.gemfire.CacheFactoryBean.createCache(CacheFactoryBean.java:354) [FORK] - at org.springframework.data.gemfire.CacheFactoryBean.resolveCache(CacheFactoryBean.java:248) [FORK] - at org.springframework.data.gemfire.CacheFactoryBean.init(CacheFactoryBean.java:189) [FORK] - at org.springframework.data.gemfire.CacheFactoryBean.getObject(CacheFactoryBean.java:175) [FORK] - at org.springframework.data.gemfire.CacheFactoryBean.getObject(CacheFactoryBean.java:87) [FORK] - at org.springframework.beans.factory.support.FactoryBeanRegistrySupport.doGetObjectFromFactoryBean(FactoryBeanRegistrySupport.java:168) [FORK] - at org.springframework.beans.factory.support.FactoryBeanRegistrySupport.getObjectFromFactoryBean(FactoryBeanRegistrySupport.java:103) [FORK] - at org.springframework.beans.factory.support.AbstractBeanFactory.getObjectForBeanInstance(AbstractBeanFactory.java:1600) [FORK] - at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:317) [FORK] - at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:202) [FORK] - at org.springframework.beans.factory.config.DependencyDescriptor.resolveCandidate(DependencyDescriptor.java:207) [FORK] - at org.springframework.beans.factory.support.DefaultListableBeanFactory.doResolveDependency(DefaultListableBeanFactory.java:1128) [FORK] - at org.springframework.beans.factory.support.DefaultListableBeanFactory.resolveDependency(DefaultListableBeanFactory.java:1056) [FORK] - at org.springframework.beans.factory.support.ConstructorResolver.resolveAutowiredArgument(ConstructorResolver.java:835) [FORK] - at org.springframework.beans.factory.support.ConstructorResolver.createArgumentArray(ConstructorResolver.java:741) [FORK] - at org.springframework.beans.factory.support.ConstructorResolver.instantiateUsingFactoryMethod(ConstructorResolver.java:467) [FORK] - at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.instantiateUsingFactoryMethod(AbstractAutowireCapableBeanFactory.java:1128) [FORK] - at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBeanInstance(AbstractAutowireCapableBeanFactory.java:1023) [FORK] - at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:510) [FORK] - at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:482) [FORK] - at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:306) [FORK] - at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:230) [FORK] - at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:302) [FORK] - at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:202) [FORK] - at org.springframework.context.annotation.CommonAnnotationBeanPostProcessor.autowireResource(CommonAnnotationBeanPostProcessor.java:522) [FORK] - at org.springframework.context.annotation.CommonAnnotationBeanPostProcessor.getResource(CommonAnnotationBeanPostProcessor.java:496) [FORK] - at org.springframework.context.annotation.CommonAnnotationBeanPostProcessor$ResourceElement.getResourceToInject(CommonAnnotationBeanPostProcessor.java:627) [FORK] - at org.springframework.beans.factory.annotation.InjectionMetadata$InjectedElement.inject(InjectionMetadata.java:169) [FORK] - at org.springframework.beans.factory.annotation.InjectionMetadata.inject(InjectionMetadata.java:88) [FORK] - at org.springframework.context.annotation.CommonAnnotationBeanPostProcessor.postProcessPropertyValues(CommonAnnotationBeanPostProcessor.java:318) [FORK] - at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.populateBean(AbstractAutowireCapableBeanFactory.java:1219) [FORK] - at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:543) [FORK] - at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:482) [FORK] - at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:306) [FORK] - at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:230) [FORK] - at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:302) [FORK] - at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:197) [FORK] - at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:751) [FORK] - at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:861) [FORK] - at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:541) [FORK] - at org.springframework.context.annotation.AnnotationConfigApplicationContext.<init>(AnnotationConfigApplicationContext.java:84) [FORK] - at org.springframework.data.gemfire.GemfireTemplateQueriesOnGroupedPooledClientCacheRegionsIntegrationTests$GemFireCacheServerTwoConfiguration.main(GemfireTemplateQueriesOnGroupedPooledClientCacheRegionsIntegrationTests.java:406) [FORK] - [error 2016/11/02 18:04:07.242 PDT <main> tid=1] org.apache.geode.GemFireConfigException: cluster configuration service not available [FORK] - [FORK] - 2016-11-02 18:04:07,245 WARN [org.springframework.context.annotation.AnnotationConfigApplicationContext] - <Exception encountered during context initialization - cancelling refresh attempt: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'gemfireTemplateQueriesOnGroupedPooledClientCacheRegionsIntegrationTests.GemFireCacheServerTwoConfiguration': Injection of resource dependencies failed; nested exception is org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'Dogs' defined in org.springframework.data.gemfire.GemfireTemplateQueriesOnGroupedPooledClientCacheRegionsIntegrationTests$GemFireCacheServerTwoConfiguration: Unsatisfied dependency expressed through method 'dogsRegion' parameter 0; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'gemfireCache': FactoryBean threw exception on object creation; nested exception is org.apache.geode.GemFireConfigException: cluster configuration service not available> [FORK] - Exception in thread "main" org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'gemfireTemplateQueriesOnGroupedPooledClientCacheRegionsIntegrationTests.GemFireCacheServerTwoConfiguration': Injection of resource dependencies failed; nested exception is org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'Dogs' defined in org.springframework.data.gemfire.GemfireTemplateQueriesOnGroupedPooledClientCacheRegionsIntegrationTests$GemFireCacheServerTwoConfiguration: Unsatisfied dependency expressed through method 'dogsRegion' parameter 0; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'gemfireCache': FactoryBean threw exception on object creation; nested exception is org.apache.geode.GemFireConfigException: cluster configuration service not available [FORK] - at org.springframework.context.annotation.CommonAnnotationBeanPostProcessor.postProcessPropertyValues(CommonAnnotationBeanPostProcessor.java:321) [FORK] - at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.populateBean(AbstractAutowireCapableBeanFactory.java:1219) [FORK] - at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:543) [FORK] - at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:482) [FORK] - at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:306) [FORK] - at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:230) [FORK] - at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:302) [FORK] - at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:197) [FORK] - at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:751) [FORK] - at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:861) [FORK] - at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:541) [FORK] - at org.springframework.context.annotation.AnnotationConfigApplicationContext.<init>(AnnotationConfigApplicationContext.java:84) [FORK] - at org.springframework.data.gemfire.GemfireTemplateQueriesOnGroupedPooledClientCacheRegionsIntegrationTests$GemFireCacheServerTwoConfiguration.main(GemfireTemplateQueriesOnGroupedPooledClientCacheRegionsIntegrationTests.java:406) [FORK] - Caused by: org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'Dogs' defined in org.springframework.data.gemfire.GemfireTemplateQueriesOnGroupedPooledClientCacheRegionsIntegrationTests$GemFireCacheServerTwoConfiguration: Unsatisfied dependency expressed through method 'dogsRegion' parameter 0; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'gemfireCache': FactoryBean threw exception on object creation; nested exception is org.apache.geode.GemFireConfigException: cluster configuration service not available [FORK] - at org.springframework.beans.factory.support.ConstructorResolver.createArgumentArray(ConstructorResolver.java:749) [FORK] - at org.springframework.beans.factory.support.ConstructorResolver.instantiateUsingFactoryMethod(ConstructorResolver.java:467) [FORK] - at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.instantiateUsingFactoryMethod(AbstractAutowireCapableBeanFactory.java:1128) [FORK] - at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBeanInstance(AbstractAutowireCapableBeanFactory.java:1023) [FORK] - at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:510) [FORK] - at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:482) [FORK] - at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:306) [FORK] - at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:230) [FORK] - at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:302) [FORK] - at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:202) [FORK] - at org.springframework.context.annotation.CommonAnnotationBeanPostProcessor.autowireResource(CommonAnnotationBeanPostProcessor.java:522) [FORK] - at org.springframework.context.annotation.CommonAnnotationBeanPostProcessor.getResource(CommonAnnotationBeanPostProcessor.java:496) [FORK] - at org.springframework.context.annotation.CommonAnnotationBeanPostProcessor$ResourceElement.getResourceToInject(CommonAnnotationBeanPostProcessor.java:627) [FORK] - at org.springframework.beans.factory.annotation.InjectionMetadata$InjectedElement.inject(InjectionMetadata.java:169) [FORK] - at org.springframework.beans.factory.annotation.InjectionMetadata.inject(InjectionMetadata.java:88) [FORK] - at org.springframework.context.annotation.CommonAnnotationBeanPostProcessor.postProcessPropertyValues(CommonAnnotationBeanPostProcessor.java:318) [FORK] - ... 12 more [FORK] - Caused by: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'gemfireCache': FactoryBean threw exception on object creation; nested exception is org.apache.geode.GemFireConfigException: cluster configuration service not available [FORK] - at org.springframework.beans.factory.support.FactoryBeanRegistrySupport.doGetObjectFromFactoryBean(FactoryBeanRegistrySupport.java:175) [FORK] - at org.springframework.beans.factory.support.FactoryBeanRegistrySupport.getObjectFromFactoryBean(FactoryBeanRegistrySupport.java:103) [FORK] - at org.springframework.beans.factory.support.AbstractBeanFactory.getObjectForBeanInstance(AbstractBeanFactory.java:1600) [FORK] - at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:317) [FORK] - at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:202) [FORK] - at org.springframework.beans.factory.config.DependencyDescriptor.resolveCandidate(DependencyDescriptor.java:207) [FORK] - at org.springframework.beans.factory.support.DefaultListableBeanFactory.doResolveDependency(DefaultListableBeanFactory.java:1128) [FORK] - at org.springframework.beans.factory.support.DefaultListableBeanFactory.resolveDependency(DefaultListableBeanFactory.java:1056) [FORK] - at org.springframework.beans.factory.support.ConstructorResolver.resolveAutowiredArgument(ConstructorResolver.java:835) [FORK] - at org.springframework.beans.factory.support.ConstructorResolver.createArgumentArray(ConstructorResolver.java:741) [FORK] - ... 27 more [FORK] - Caused by: org.apache.geode.GemFireConfigException: cluster configuration service not available [FORK] - at org.apache.geode.internal.cache.GemFireCacheImpl.requestSharedConfiguration(GemFireCacheImpl.java:1009) [FORK] - at org.apache.geode.internal.cache.GemFireCacheImpl.initialize(GemFireCacheImpl.java:1135) [FORK] - at org.apache.geode.internal.cache.GemFireCacheImpl.basicCreate(GemFireCacheImpl.java:771) [FORK] - at org.apache.geode.internal.cache.GemFireCacheImpl.create(GemFireCacheImpl.java:758) [FORK] - at org.apache.geode.cache.CacheFactory.create(CacheFactory.java:181) [FORK] - at org.apache.geode.cache.CacheFactory.create(CacheFactory.java:231) [FORK] - at org.springframework.data.gemfire.CacheFactoryBean.createCache(CacheFactoryBean.java:354) [FORK] - at org.springframework.data.gemfire.CacheFactoryBean.resolveCache(CacheFactoryBean.java:248) [FORK] - at org.springframework.data.gemfire.CacheFactoryBean.init(CacheFactoryBean.java:189) [FORK] - at org.springframework.data.gemfire.CacheFactoryBean.getObject(CacheFactoryBean.java:175) [FORK] - at org.springframework.data.gemfire.CacheFactoryBean.getObject(CacheFactoryBean.java:87) [FORK] - at org.springframework.beans.factory.support.FactoryBeanRegistrySupport.doGetObjectFromFactoryBean(FactoryBeanRegistrySupport.java:168) [FORK] - ... 36 more [FORK] - Caused by: org.apache.geode.internal.process.ClusterConfigurationNotAvailableException: Unable to retrieve cluster configuration from the locator. [FORK] - at org.apache.geode.internal.cache.ClusterConfigurationLoader.requestConfigurationFromLocators(ClusterConfigurationLoader.java:229) [FORK] - at org.apache.geode.internal.cache.GemFireCacheImpl.requestSharedConfiguration(GemFireCacheImpl.java:981) [FORK] - ... 47 more {code} The second Server is trying to request the shared (cluster) configuration from the embedded Locator in Server 1. However, the _Cluster Configuration Service_ was not enabled in the embedded Locator, or rather {{use-cluster-configuration}} was not set to **true** when starting Server 1. > The Cluster Configuration Service must absolutely not be required to run > Geode. > ------------------------------------------------------------------------------- > > Key: GEODE-1986 > URL: https://issues.apache.org/jira/browse/GEODE-1986 > Project: Geode > Issue Type: Bug > Components: configuration > Reporter: John Blum > Assignee: Jinmei Liao > Priority: Critical > Labels: ClusterConfig, ClusterConfigurationService > Fix For: 1.0.0-incubating > > Attachments: App.java > > > A bug was introduced in Geode when the logic to fetch the Cluster > Configuration meta-data from the Locator in the cluster by a joining member > was refactored into it's own > [class|https://github.com/apache/incubator-geode/blob/develop/geode-core/src/main/java/org/apache/geode/internal/cache/ClusterConfigurationLoader.java] > causing the following issues... > 1. First, and foremost, the _Cluster Configuration_ service is now, seemingly > no longer *optional* (hence, _required_), which is both short sighted and too > restrictive, and will break existing [embedded Geode application] > deployments, particularly in situations where GemFire config, and especially, > _Gfsh_ were not used to configure the cluster, which will be true when users > upgrade existing clusters based on an earlier versions of Apache Geode > (namely GemFire < v7.0, once GemFire 9 is based on Apache Geode) and as well > as _Spring_ applications. > This change is apparent from the removal of the [conditional check on the > Geode System property > (1)|https://github.com/apache/incubator-geode/blob/rel/v1.0.0-incubating.M3/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/GemFireCacheImpl.java#L956-L958], > which is no longer present [here > (2)|https://github.com/apache/incubator-geode/blob/develop/geode-core/src/main/java/org/apache/geode/internal/cache/ClusterConfigurationLoader.java#L184-L233] > or possibly [here > (3)|https://github.com/apache/incubator-geode/blob/develop/geode-core/src/main/java/org/apache/geode/internal/cache/GemFireCacheImpl.java#L976-L981]. > 2. This does not work in the embedded Locator case. If a user configures a > peer Cache using the following in his/her application... > {code:java} > ... = new CacheFactory() > .set("name", "Example") > .set("start-locator", "localhost[10334]") > ... > .create(); > {code} > And another members joins, the logic in (2) above, will fail with... > {code:java} > Caused by: org.apache.geode.GemFireConfigException: cluster configuration > service not available > at > org.apache.geode.internal.cache.GemFireCacheImpl.requestSharedConfiguration(GemFireCacheImpl.java:1009) > at > org.apache.geode.internal.cache.GemFireCacheImpl.initialize(GemFireCacheImpl.java:1135) > at > org.apache.geode.internal.cache.GemFireCacheImpl.basicCreate(GemFireCacheImpl.java:771) > at > org.apache.geode.internal.cache.GemFireCacheImpl.create(GemFireCacheImpl.java:758) > at org.apache.geode.cache.CacheFactory.create(CacheFactory.java:181) > at org.apache.geode.cache.CacheFactory.create(CacheFactory.java:231) > ... 42 more > Caused by: > org.apache.geode.internal.process.ClusterConfigurationNotAvailableException: > Unable to retrieve cluster configuration from the locator. > at > org.apache.geode.internal.cache.ClusterConfigurationLoader.requestConfigurationFromLocators(ClusterConfigurationLoader.java:229) > at > org.apache.geode.internal.cache.GemFireCacheImpl.requestSharedConfiguration(GemFireCacheImpl.java:981) > ... 47 more > {code} -- This message was sent by Atlassian JIRA (v6.3.4#6332)