[ 
https://issues.apache.org/jira/browse/GEODE-1986?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15631144#comment-15631144
 ] 

John Blum commented on GEODE-1986:
----------------------------------

Well, without coding an elaborate test, I was able to successfully reproduce 
this problem using _Gfsh_...

{code}
$ gfsh
    _________________________     __
   / _____/ ______/ ______/ /____/ /
  / /  __/ /___  /_____  / _____  / 
 / /__/ / ____/  _____/ / /    / /  
/______/_/      /______/_/    /_/    1.0.0-incubating

Monitor and Manage Apache Geode (incubating)
gfsh>
gfsh>start server --name=Server1 --log-level=config --server-port=11235 
--J=-Dgemfire.start-locator=localhost[10334]
Starting a Geode Server in /Users/jblum/pivdev/lab/Server1...
....
Server in /Users/jblum/pivdev/lab/Server1 on 10.99.199.3[11235] as Server1 is 
currently online.
Process ID: 64189
Uptime: 2 seconds
GemFire Version: 1.0.0-incubating
Java Version: 1.8.0_72
Log File: /Users/jblum/pivdev/lab/Server1/Server1.log
JVM Arguments: -Dgemfire.use-cluster-configuration=true 
-Dgemfire.http-service-port=8080 -Dgemfire.start-dev-rest-api=false 
-Dgemfire.log-level=config -Dgemfire.start-locator=localhost[10334] 
-XX:OnOutOfMemoryError=kill -KILL %p 
-Dgemfire.launcher.registerSignalHandlers=true -Djava.awt.headless=true 
-Dsun.rmi.dgc.server.gcInterval=9223372036854775806
Class-Path: 
/Users/jblum/pivdev/apache-geode-1.0.0-incubating/lib/geode-core-1.0.0-incubating.jar:/Users/jblum/pivdev/apache-geode-1.0.0-incubating/lib/geode-dependencies.jar

gfsh>list members
"list members" is not available. Reason: Requires connection.

gfsh>start server --name=Server2 --log-level=config --server-port=12480 
--J=-Dgemfire.locators=localhost[10334]
Starting a Geode Server in /Users/jblum/pivdev/lab/Server2...
The Cache Server process terminated unexpectedly with exit status 1. Please 
refer to the log file in /Users/jblum/pivdev/lab/Server2 for full details.

objc[64350]: Class JavaLaunchHelper is implemented in both 
/Library/Java/JavaVirtualMachines/jdk1.8.0_72.jdk/Contents/Home/jre/bin/java 
and 
/Library/Java/JavaVirtualMachines/jdk1.8.0_72.jdk/Contents/Home/jre/lib/libinstrument.dylib.
 One of the two will be used. Which one is undefined.
java.io.EOFException: Locator at /127.0.0.1:10334 did not respond. This is 
normal if the locator was shutdown. If it wasn't check its log for exceptions.
    at 
org.apache.geode.distributed.internal.tcpserver.TcpClient.requestToServer(TcpClient.java:202)
    at 
org.apache.geode.distributed.internal.tcpserver.TcpClient.requestToServer(TcpClient.java:130)
    at 
org.apache.geode.internal.cache.ClusterConfigurationLoader.requestConfigurationFromLocators(ClusterConfigurationLoader.java:215)
    at 
org.apache.geode.internal.cache.GemFireCacheImpl.requestSharedConfiguration(GemFireCacheImpl.java:981)
    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)
    at 
org.apache.geode.distributed.internal.DefaultServerLauncherCacheProvider.createCache(DefaultServerLauncherCacheProvider.java:55)
    at 
org.apache.geode.distributed.ServerLauncher.createCache(ServerLauncher.java:783)
    at 
org.apache.geode.distributed.ServerLauncher.start(ServerLauncher.java:703)
    at org.apache.geode.distributed.ServerLauncher.run(ServerLauncher.java:633)
    at org.apache.geode.distributed.ServerLauncher.main(ServerLauncher.java:184)
Exception in thread "main" 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)
    at 
org.apache.geode.distributed.internal.DefaultServerLauncherCacheProvider.createCache(DefaultServerLauncherCacheProvider.java:55)
    at 
org.apache.geode.distributed.ServerLauncher.createCache(ServerLauncher.java:783)
    at 
org.apache.geode.distributed.ServerLauncher.start(ServerLauncher.java:703)
    at org.apache.geode.distributed.ServerLauncher.run(ServerLauncher.java:633)
    at org.apache.geode.distributed.ServerLauncher.main(ServerLauncher.java:184)
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)
    ... 10 more

{code}

> 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)

Reply via email to