You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@geode.apache.org by "Dick Cavender (Jira)" <ji...@apache.org> on 2019/09/11 22:31:00 UTC

[jira] [Updated] (GEODE-6561) Unable to reconnect when regions are configured with cluster config

     [ https://issues.apache.org/jira/browse/GEODE-6561?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Dick Cavender updated GEODE-6561:
---------------------------------
    Fix Version/s: 1.10.0

> Unable to reconnect when regions are configured with cluster config
> -------------------------------------------------------------------
>
>                 Key: GEODE-6561
>                 URL: https://issues.apache.org/jira/browse/GEODE-6561
>             Project: Geode
>          Issue Type: Bug
>          Components: configuration, management
>            Reporter: Jens Deppe
>            Priority: Major
>             Fix For: 1.10.0
>
>          Time Spent: 20m
>  Remaining Estimate: 0h
>
>  
> Given that I have a region configured with cluster config and a server restarts, the following exception is likely to be thrown and the server will not be able to reconnect:
> {noformat}
> [vm2] java.lang.IllegalStateException: Cannot set idle timeout when statistics are disabled.
> [vm2] at org.apache.geode.internal.cache.AbstractRegion.setEntryIdleTimeout(AbstractRegion.java:1227)
> [vm2] at org.apache.geode.internal.cache.xmlcache.RegionCreation.setMutableAttributes(RegionCreation.java:194)
> [vm2] at org.apache.geode.internal.cache.xmlcache.RegionCreation.createRoot(RegionCreation.java:241)
> [vm2] at org.apache.geode.internal.cache.xmlcache.CacheCreation.initializeRegions(CacheCreation.java:635)
> [vm2] at org.apache.geode.internal.cache.xmlcache.CacheCreation.create(CacheCreation.java:577)
> [vm2] at org.apache.geode.internal.cache.xmlcache.CacheXmlParser.create(CacheXmlParser.java:337)
> [vm2] at org.apache.geode.internal.cache.GemFireCacheImpl.loadCacheXml(GemFireCacheImpl.java:4272)
> [vm2] at org.apache.geode.internal.cache.GemFireCacheImpl.initializeDeclarativeCache(GemFireCacheImpl.java:1388)
> [vm2] at org.apache.geode.internal.cache.GemFireCacheImpl.initialize(GemFireCacheImpl.java:1208)
> [vm2] at org.apache.geode.internal.cache.InternalCacheBuilder.create(InternalCacheBuilder.java:207)
> [vm2] at org.apache.geode.distributed.internal.InternalDistributedSystem.reconnect(InternalDistributedSystem.java:2730)
> [vm2] at org.apache.geode.distributed.internal.InternalDistributedSystem.tryReconnect(InternalDistributedSystem.java:2496)
> [vm2] at org.apache.geode.distributed.internal.InternalDistributedSystem.disconnect(InternalDistributedSystem.java:1312)
> [vm2] at org.apache.geode.distributed.internal.ClusterDistributionManager$DMListener.membershipFailure(ClusterDistributionManager.java:3424)
> [vm2] at org.apache.geode.distributed.internal.membership.gms.mgr.GMSMembershipManager.uncleanShutdown(GMSMembershipManager.java:1554)
> [vm2] at org.apache.geode.distributed.internal.membership.gms.mgr.GMSMembershipManager.lambda$forceDisconnect$3(GMSMembershipManager.java:2586)
> [vm2] at java.lang.Thread.run(Thread.java:748){noformat}
> As part of the reconnect, the original cache xml is saved at the beginning of the process. Reconnect goes through regular cache initialization which includes retrieving the cluster config from the locator and then applying the saved cache xml. In the above example, the cluster config looks like this:
> {noformat}
> [vm2] <?xml version="1.0" encoding="UTF-8" standalone="no"?>
> [vm2] <cache xmlns="http://geode.apache.org/schema/cache" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" version="1.0" xsi:schemaLocation="http://geode.apache.org/schema/cache http://geode.apache.org/schema/cache/cache-1.0.xsd">
> [vm2]   <pdx ignore-unread-fields="false" persistent="false" read-serialized="true">
> [vm2]     <pdx-serializer>
> [vm2]     <class-name>org.apache.geode.pdx.ReflectionBasedAutoSerializer</class-name>
> [vm2]       <parameter name="classes">
> [vm2]         <string>ClusterConfigServerRestartWithJarDeployFunction.*</string>
> [vm2]       </parameter>
> [vm2]     </pdx-serializer>
> [vm2]   </pdx>
> [vm2]   <region name="FOO" refid="REPLICATE">
> [vm2]     <region-attributes data-policy="replicate" scope="distributed-ack"/>
> [vm2]   </region>
> [vm2] </cache>{noformat}
>  
> And the saved cache.xml like this:
> {noformat}
> [vm2] [info 2019/03/26 06:24:52.841 PDT <ReconnectThread> tid=0x4f] Initializing cache using generated description from old cache:
> [vm2] <?xml version="1.0" encoding="UTF-8"?>
> [vm2] <cache xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://geode.apache.org/schema/cache" xsi:schemaLocation="http://geode.apache.org/schema/cache http://geode.apache.org/schema/cache/cache-1.0.xsd" version="1.0" lock-lease="120" lock-timeout="60" search-timeout="300" is-server="true" copy-on-read="false">
> [vm2]   <cache-transaction-manager/>
> [vm2]   <cache-server port="55328" maximum-time-between-pings="60000" notify-by-subscription="true" socket-buffer-size="32768" max-connections="800" max-threads="0" maximum-message-count="230000" message-time-to-live="180" bind-address="" load-poll-interval="5000" tcp-no-delay="true">
> [vm2]     <custom-load-probe>
> [vm2]       <class-name>org.apache.geode.cache.server.internal.ConnectionCountProbe</class-name>
> [vm2]     </custom-load-probe>
> [vm2]   </cache-server>
> [vm2]   <pdx read-serialized="true" ignore-unread-fields="false" persistent="false">
> [vm2]     <pdx-serializer>
> [vm2]       <class-name>org.apache.geode.pdx.ReflectionBasedAutoSerializer</class-name>
> [vm2]       <parameter name="classes">
> [vm2]         <string>ClusterConfigServerRestartWithJarDeployFunction.*</string>
> [vm2]       </parameter>
> [vm2]     </pdx-serializer>
> [vm2]   </pdx>
> [vm2]   <region name="FOO">
> [vm2]     <region-attributes scope="distributed-ack" early-ack="false" multicast-enabled="false" publisher="false" enable-async-conflation="false" enable-subscription-conflation="false" data-policy="replicate" initial-capacity="16" load-factor="0.75" concurrency-level="16" concurrency-checks-enabled="true" statistics-enabled="false" ignore-jta="false" is-lock-grantor="false" pool-name="" disk-synchronous="true" cloning-enabled="false" gateway-sender-ids="" async-event-queue-ids="" off-heap="false">
> [vm2]       <region-time-to-live>
> [vm2]         <expiration-attributes timeout="0" action="invalidate"/>
> [vm2]       </region-time-to-live>
> [vm2]       <region-idle-time>
> [vm2]         <expiration-attributes timeout="0" action="invalidate"/>
> [vm2]       </region-idle-time>
> [vm2]       <entry-time-to-live>
> [vm2]         <expiration-attributes timeout="0" action="invalidate"/>
> [vm2]       </entry-time-to-live>
> [vm2]       <entry-idle-time>
> [vm2]         <expiration-attributes timeout="0" action="invalidate"/>
> [vm2]       </entry-idle-time>
> [vm2]       <disk-write-attributes>
> [vm2]         <synchronous-writes/>
> [vm2]       </disk-write-attributes>
> [vm2]       <disk-dirs>
> [vm2]         <disk-dir>/Users/jdeppe/workspace/gemfire-develop/open/dunit/vm2/.</disk-dir>
> [vm2]       </disk-dirs>
> [vm2]       <subscription-attributes interest-policy="cache-content"/>
> [vm2]     </region-attributes>
> [vm2]   </region>
> [vm2]   <function-service/>
> [vm2]   <resource-manager critical-heap-percentage="0" eviction-heap-percentage="0" critical-off-heap-percentage="0" eviction-off-heap-percentage="0"/>
> [vm2] </cache>
> {noformat}
> After the cluster config is applied, the {{FOO}} region exists. However the application of the saved cache xml results in the system attempting to apply the attributes to the already existing {{FOO}} region which then causes the exception. 



--
This message was sent by Atlassian Jira
(v8.3.2#803003)