geode-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "ASF GitHub Bot (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (GEODE-3987) Enforce the uniqueness of a single gateway-receiver per member
Date Wed, 22 Nov 2017 22:39:00 GMT

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

ASF GitHub Bot commented on GEODE-3987:
---------------------------------------

jujoramos commented on a change in pull request #1086: GEODE-3987: enforce GatewayReceiver
uniqueness per member.
URL: https://github.com/apache/geode/pull/1086#discussion_r152694113
 
 

 ##########
 File path: geode-core/src/test/resources/org/apache/geode/internal/cache/wan/GatewayReceiverXmlParsingValidationsTest.correctConfiguration[DTD].cache.xml
 ##########
 @@ -0,0 +1,26 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<!--
+  Licensed to the Apache Software Foundation (ASF) under one or more
+  contributor license agreements.  See the NOTICE file distributed with
+  this work for additional information regarding copyright ownership.
+  The ASF licenses this file to You under the Apache License, Version 2.0
+  (the "License"); you may not use this file except in compliance with
+  the License.  You may obtain a copy of the License at
+
+       http://www.apache.org/licenses/LICENSE-2.0
+
+  Unless required by applicable law or agreed to in writing, software
+  distributed under the License is distributed on an "AS IS" BASIS,
+  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+  See the License for the specific language governing permissions and
+  limitations under the License.
+-->
+
+<!DOCTYPE cache PUBLIC
 
 Review comment:
   Hey @nabarunnag, 
   What do you mean by "remove these Gemstone headers" here?.
   The file `cache8_0.dtd` still references the old GemStone Systems as well, so these files
should use correct declaration, am I missing something?:
   
   ```
   This is the XML DTD for the GemFire distributed cache declarative
   caching XML file.  All declarative cache files must include a DOCTYPE
   of the following form:
   
     <!DOCTYPE cache PUBLIC
       "-//GemStone Systems, Inc.//GemFire Declarative Caching 8.0//EN"
       "http://www.gemstone.com/dtd/cache8_0.dtd">
   
   If you are declaring a client cache then use this DOCTYPE:
   
     <!DOCTYPE client-cache PUBLIC
       "-//GemStone Systems, Inc.//GemFire Declarative Caching 8.0//EN"
       "http://www.gemstone.com/dtd/cache8_0.dtd">
   ```

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


> Enforce the uniqueness of a single gateway-receiver per member
> --------------------------------------------------------------
>
>                 Key: GEODE-3987
>                 URL: https://issues.apache.org/jira/browse/GEODE-3987
>             Project: Geode
>          Issue Type: Bug
>            Reporter: Juan José Ramos Cassella
>            Assignee: Juan José Ramos Cassella
>
> Within the documentation, both in [Configure Gateway Receivers|http://geode.apache.org/docs/guide/13/topologies_and_comm/multi_site_configuration/setting_up_a_multisite_system.html#setting_up_a_multisite_system__section_E3A44F85359046C7ADD12861D261637B]
and [gfsh create gateway-receiver|http://geode.apache.org/docs/guide/13/tools_modules/gfsh/command-pages/create.html#topic_a4x_pb1_dk],
we state that only one {{gateway-receiver}} is allowed per member. However, there is no enforcement
of this rule within the code nor within the schema for the {{cache.xml}} file, so the user
might end up having more than one {{gateway-receiver}} per host.
> It's unknown which {{gateway-receiver}} is going to be used after a restart, making it
hard to configure firewall rules between clusters, if any. The following exception is also
printed in the logs whenever we try to register (only the first one is succesfull) the MBean
for the {{gateway-receiver}}:
> {noformat}
> [warning 2017/11/16 15:27:46.156 PST host1-server1 <Function Execution Processor1>
tid=0x44] javax.management.InstanceAlreadyExistsException: GemFire:service=GatewayReceiver,type=Member,member=host1-server1
> org.apache.geode.management.ManagementException: javax.management.InstanceAlreadyExistsException:
GemFire:service=GatewayReceiver,type=Member,member=host1-server1
> 	at org.apache.geode.management.internal.MBeanJMXAdapter.registerMBean(MBeanJMXAdapter.java:110)
> 	at org.apache.geode.management.internal.SystemManagementService.registerInternalMBean(SystemManagementService.java:368)
> 	at org.apache.geode.management.internal.beans.ManagementAdapter.createGatewayReceiverMBean(ManagementAdapter.java:471)
> 	at org.apache.geode.management.internal.beans.ManagementAdapter.handleGatewayReceiverStart(ManagementAdapter.java:493)
> 	at org.apache.geode.management.internal.beans.ManagementListener.handleEvent(ManagementListener.java:134)
> 	at org.apache.geode.distributed.internal.InternalDistributedSystem.notifyResourceEventListeners(InternalDistributedSystem.java:2175)
> 	at org.apache.geode.distributed.internal.InternalDistributedSystem.handleResourceEvent(InternalDistributedSystem.java:562)
> 	at org.apache.geode.internal.cache.wan.GatewayReceiverImpl.start(GatewayReceiverImpl.java:194)
> 	at org.apache.geode.internal.cache.wan.GatewayReceiverFactoryImpl.create(GatewayReceiverFactoryImpl.java:141)
> 	at org.apache.geode.management.internal.cli.functions.GatewayReceiverCreateFunction.createGatewayReceiver(GatewayReceiverCreateFunction.java:164)
> 	at org.apache.geode.management.internal.cli.functions.GatewayReceiverCreateFunction.execute(GatewayReceiverCreateFunction.java:63)
> 	at org.apache.geode.internal.cache.MemberFunctionStreamingMessage.process(MemberFunctionStreamingMessage.java:186)
> 	at org.apache.geode.distributed.internal.DistributionMessage.scheduleAction(DistributionMessage.java:374)
> 	at org.apache.geode.distributed.internal.DistributionMessage$1.run(DistributionMessage.java:440)
> 	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
> 	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
> 	at org.apache.geode.distributed.internal.DistributionManager.runUntilShutdown(DistributionManager.java:668)
> 	at org.apache.geode.distributed.internal.DistributionManager$9$1.run(DistributionManager.java:1114)
> 	at java.lang.Thread.run(Thread.java:745)
> Caused by: javax.management.InstanceAlreadyExistsException: GemFire:service=GatewayReceiver,type=Member,member=host1-server1
> 	at com.sun.jmx.mbeanserver.Repository.addMBean(Repository.java:437)
> 	at com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.registerWithRepository(DefaultMBeanServerInterceptor.java:1898)
> 	at com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.registerDynamicMBean(DefaultMBeanServerInterceptor.java:966)
> 	at com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.registerObject(DefaultMBeanServerInterceptor.java:900)
> 	at com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.registerMBean(DefaultMBeanServerInterceptor.java:324)
> 	at com.sun.jmx.mbeanserver.JmxMBeanServer.registerMBean(JmxMBeanServer.java:522)
> 	at org.apache.geode.management.internal.MBeanJMXAdapter.registerMBean(MBeanJMXAdapter.java:105)
> 	... 18 more
> {noformat}
> The fix implies:
> . Change the {{maxOccurs}} attribute from {{unbounded}} to {{1}} in the {{cache-1.0.xsd}}
file.
> . Add the validation to the {{GatewayReceiverFactoryImpl.create()}} method, as this is
the single entry point for {{GatewayReceiver}} instance creations.



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)

Mime
View raw message