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

Sai Boorlagadda updated GEODE-4959:
-----------------------------------
    Description: 
{{There are several issues with create gateway-receiver command.}}

1) Starting 1.4.0, with GEODE-3987 there is an enforcement of one gwr per node 
in the xsd. So when user attempts to create multiple gwr show a better error 
message then showing "*ERROR: java.lang.IllegalStateException*".
{noformat}
gfsh>start server --locators=localhost[10334]
Starting a Geode Server in 
/Users/sboorlagadda/workspace/debug/geode/apache-geode-1.4.0/bin/walk-proud-feet...
...
Server in 
/Users/sboorlagadda/workspace/debug/geode/apache-geode-1.4.0/bin/walk-proud-feet
 on sais-mbp-2.netgear.com[40404] as walk-proud-feet is currently online.
Process ID: 35197
Uptime: 4 seconds
Geode Version: 1.4.0
Java Version: 1.8.0_151
Log File: 
/Users/sboorlagadda/workspace/debug/geode/apache-geode-1.4.0/bin/walk-proud-feet/walk-proud-feet.log
JVM Arguments: -Dgemfire.locators=localhost[10334] 
-Dgemfire.start-dev-rest-api=false -Dgemfire.use-cluster-configuration=true 
-XX:OnOutOfMemoryError=kill -KILL %p 
-Dgemfire.launcher.registerSignalHandlers=true -Djava.awt.headless=true 
-Dsun.rmi.dgc.server.gcInterval=9223372036854775806
Class-Path: 
/Users/sboorlagadda/workspace/debug/geode/apache-geode-1.4.0/lib/geode-core-1.4.0.jar:/Users/sboorlagadda/workspace/debug/geode/apache-geode-1.4.0/lib/geode-dependencies.jar

gfsh>create gateway-receiver
Member | Status
--------------- | 
---------------------------------------------------------------------------------------
walk-proud-feet | GatewayReceiver created on member "walk-proud-feet" and will 
listen on the port "5,221"

gfsh>create gateway-receiver
Member | Status
--------------- | 
-----------------------------------------------------------------------------------------
walk-proud-feet | ERROR: java.lang.IllegalStateException: A Gateway Receiver 
already exists on this member.{noformat}

2) create gwr command should enforce only one gwr can be created as with 
GEODE-3987, xsd supports only one.

3) create gwr command is storing the gwr in cluster config when created with 
--member option.

As there is no enforcement until 1.3 and with above stated issues with gfsh, it 
could happen that some one could end up a cluster with multiple gwr created in 
cluster configuration and could prevent them to upgrade to 1.4.

  was:
{{There are several issues with create gateway-receiver command.}}

1) In 1.4.0, gfsh shows an error on gfsh console when attempts to create 
multiple gw receivers.
{noformat}
gfsh>start server --locators=localhost[10334]
Starting a Geode Server in 
/Users/sboorlagadda/workspace/debug/geode/apache-geode-1.4.0/bin/walk-proud-feet...
...
Server in 
/Users/sboorlagadda/workspace/debug/geode/apache-geode-1.4.0/bin/walk-proud-feet
 on sais-mbp-2.netgear.com[40404] as walk-proud-feet is currently online.
Process ID: 35197
Uptime: 4 seconds
Geode Version: 1.4.0
Java Version: 1.8.0_151
Log File: 
/Users/sboorlagadda/workspace/debug/geode/apache-geode-1.4.0/bin/walk-proud-feet/walk-proud-feet.log
JVM Arguments: -Dgemfire.locators=localhost[10334] 
-Dgemfire.start-dev-rest-api=false -Dgemfire.use-cluster-configuration=true 
-XX:OnOutOfMemoryError=kill -KILL %p 
-Dgemfire.launcher.registerSignalHandlers=true -Djava.awt.headless=true 
-Dsun.rmi.dgc.server.gcInterval=9223372036854775806
Class-Path: 
/Users/sboorlagadda/workspace/debug/geode/apache-geode-1.4.0/lib/geode-core-1.4.0.jar:/Users/sboorlagadda/workspace/debug/geode/apache-geode-1.4.0/lib/geode-dependencies.jar

gfsh>create gateway-receiver
Member | Status
--------------- | 
---------------------------------------------------------------------------------------
walk-proud-feet | GatewayReceiver created on member "walk-proud-feet" and will 
listen on the port "5,221"

gfsh>create gateway-receiver
Member | Status
--------------- | 
-----------------------------------------------------------------------------------------
walk-proud-feet | ERROR: java.lang.IllegalStateException: A Gateway Receiver 
already exists on this member.{noformat}
While in 1.3.0 and older the behavior is no error reported on gfsh console 
while the server log contains exception.
{noformat}
gfsh>start server --locators=localhost[10334]
Starting a Geode Server in 
/Users/sboorlagadda/workspace/debug/geode/apache-geode-1.3.0/bin/name-important-pet...
...
Server in 
/Users/sboorlagadda/workspace/debug/geode/apache-geode-1.3.0/bin/name-important-pet
 on sais-mbp-2.netgear.com[40404] as name-important-pet is currently online.
Process ID: 34964
Uptime: 2 seconds
Geode Version: 1.3.0
Java Version: 1.8.0_151
Log File: 
/Users/sboorlagadda/workspace/debug/geode/apache-geode-1.3.0/bin/name-important-pet/name-important-pet.log
JVM Arguments: -Dgemfire.locators=localhost[10334] 
-Dgemfire.start-dev-rest-api=false -Dgemfire.use-cluster-configuration=true 
-XX:OnOutOfMemoryError=kill -KILL %p 
-Dgemfire.launcher.registerSignalHandlers=true -Djava.awt.headless=true 
-Dsun.rmi.dgc.server.gcInterval=9223372036854775806
Class-Path: 
/Users/sboorlagadda/workspace/debug/geode/apache-geode-1.3.0/lib/geode-core-1.3.0.jar:/Users/sboorlagadda/workspace/debug/geode/apache-geode-1.3.0/lib/geode-dependencies.jar

gfsh>create gateway-receiver
Member | Status
------------------ | 
------------------------------------------------------------------------------------------
name-important-pet | GatewayReceiver created on member "name-important-pet" and 
will listen on the port "5,163"

gfsh>create gateway-receiver
Member | Status
------------------ | 
------------------------------------------------------------------------------------------
name-important-pet | GatewayReceiver created on member "name-important-pet" and 
will listen on the port "5,215"

gfsh>create gateway-receiver
Member | Status
------------------ | 
------------------------------------------------------------------------------------------
name-important-pet | GatewayReceiver created on member "name-important-pet" and 
will listen on the port "5,430"{noformat}
{noformat}
[info 2018/03/28 13:03:19.575 PDT name-important-pet <Function Execution 
Processor1> tid=0x4b] The GatewayReceiver started on port : 5,430

[warning 2018/03/28 13:03:19.575 PDT name-important-pet <Function Execution 
Processor1> tid=0x4b] javax.management.InstanceAlreadyExistsException: 
GemFire:service=GatewayReceiver,type=Member,member=name-important-pet
org.apache.geode.management.ManagementException: 
javax.management.InstanceAlreadyExistsException: 
GemFire:service=GatewayReceiver,type=Member,member=name-important-pet
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:2198)
at 
org.apache.geode.distributed.internal.InternalDistributedSystem.handleResourceEvent(InternalDistributedSystem.java:585)
at 
org.apache.geode.internal.cache.wan.GatewayReceiverImpl.start(GatewayReceiverImpl.java:194)
at 
org.apache.geode.internal.cache.wan.GatewayReceiverFactoryImpl.create(GatewayReceiverFactoryImpl.java:124)
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:1149)
at 
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
at 
org.apache.geode.distributed.internal.DistributionManager.runUntilShutdown(DistributionManager.java:666)
at 
org.apache.geode.distributed.internal.DistributionManager$9$1.run(DistributionManager.java:1112)
at java.lang.Thread.run(Thread.java:748)
Caused by: javax.management.InstanceAlreadyExistsException: 
GemFire:service=GatewayReceiver,type=Member,member=name-important-pet
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}
2) create gwr command should enforce only one gwr can be created as with 
GEODE-3987, xsd supports only one.

3) create gwr command is storing the gwr in cluster config when created with 
--member option.

As there is no enforcement until 1.3 and with above stated issues with gfsh, it 
could happen that some one could end up a cluster with multiple gwr created in 
cluster configuration and could prevent them to upgrade to 1.4.


> Attempt to create multiple gw receivers results an error on gfsh console.
> -------------------------------------------------------------------------
>
>                 Key: GEODE-4959
>                 URL: https://issues.apache.org/jira/browse/GEODE-4959
>             Project: Geode
>          Issue Type: Bug
>          Components: gfsh
>            Reporter: Sai Boorlagadda
>            Priority: Major
>
> {{There are several issues with create gateway-receiver command.}}
> 1) Starting 1.4.0, with GEODE-3987 there is an enforcement of one gwr per 
> node in the xsd. So when user attempts to create multiple gwr show a better 
> error message then showing "*ERROR: java.lang.IllegalStateException*".
> {noformat}
> gfsh>start server --locators=localhost[10334]
> Starting a Geode Server in 
> /Users/sboorlagadda/workspace/debug/geode/apache-geode-1.4.0/bin/walk-proud-feet...
> ...
> Server in 
> /Users/sboorlagadda/workspace/debug/geode/apache-geode-1.4.0/bin/walk-proud-feet
>  on sais-mbp-2.netgear.com[40404] as walk-proud-feet is currently online.
> Process ID: 35197
> Uptime: 4 seconds
> Geode Version: 1.4.0
> Java Version: 1.8.0_151
> Log File: 
> /Users/sboorlagadda/workspace/debug/geode/apache-geode-1.4.0/bin/walk-proud-feet/walk-proud-feet.log
> JVM Arguments: -Dgemfire.locators=localhost[10334] 
> -Dgemfire.start-dev-rest-api=false -Dgemfire.use-cluster-configuration=true 
> -XX:OnOutOfMemoryError=kill -KILL %p 
> -Dgemfire.launcher.registerSignalHandlers=true -Djava.awt.headless=true 
> -Dsun.rmi.dgc.server.gcInterval=9223372036854775806
> Class-Path: 
> /Users/sboorlagadda/workspace/debug/geode/apache-geode-1.4.0/lib/geode-core-1.4.0.jar:/Users/sboorlagadda/workspace/debug/geode/apache-geode-1.4.0/lib/geode-dependencies.jar
> gfsh>create gateway-receiver
> Member | Status
> --------------- | 
> ---------------------------------------------------------------------------------------
> walk-proud-feet | GatewayReceiver created on member "walk-proud-feet" and 
> will listen on the port "5,221"
> gfsh>create gateway-receiver
> Member | Status
> --------------- | 
> -----------------------------------------------------------------------------------------
> walk-proud-feet | ERROR: java.lang.IllegalStateException: A Gateway Receiver 
> already exists on this member.{noformat}
> 2) create gwr command should enforce only one gwr can be created as with 
> GEODE-3987, xsd supports only one.
> 3) create gwr command is storing the gwr in cluster config when created with 
> --member option.
> As there is no enforcement until 1.3 and with above stated issues with gfsh, 
> it could happen that some one could end up a cluster with multiple gwr 
> created in cluster configuration and could prevent them to upgrade to 1.4.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

Reply via email to