I have been following the instructions provided here: Multi-site (WAN) Configuration.
I have been unable to successfully deploy a gateway and I believe I am missing a small bit of configuration, but I cannot identify what that is.
# loc1.properties jmx-manager-port=1899 mcast-port=0 remote-locators=localhost[11045] distributed-system-id=1
gfsh start locator --name=loc1 --port=11044 --properties-file=loc1.properties
# loc2.properties jmx-manager-port=1999 mcast-port=0 remote-locators=localhost[11044] distributed-system-id=2
gfsh start locator --name=loc2 --port=11045 --properties-file=loc2.properties
String license = "== omitted valid WAN enabled key =="; String serverName = "node1"; CacheFactory cacheFactory = new CacheFactory(); cacheFactory.set("name", serverName); cacheFactory.set("mcast-port", "0"); String workingDir = String.format("c:/software/ssw/%s", serverName); cacheFactory.set("license-working-dir", workingDir); cacheFactory.set("deploy-working-dir", workingDir); cacheFactory.set("locators", "localhost[11044]"); cacheFactory.set("license-data-management", license); cacheFactory.set("distributed-system-id", "1"); Cache cache = cacheFactory.create(); cache.setIsServer(true); CacheServer cacheServer = cache.addCacheServer(); cacheServer.setPort(30303); String gatewayName = String.format("%sSender", serverName); RegionFactory replicatedRegionFactory = cache.createRegionFactory(RegionShortcut.REPLICATE_PERSISTENT_OVERFLOW); replicatedRegionFactory.addGatewaySenderId(gatewayName); replicatedRegionFactory.create("TestRegion"); cache.createGatewaySenderFactory().setParallel(false).create(gatewayName, 2); cache.createGatewayReceiverFactory().setStartPort(12000).setEndPort(12009).create().start(); cacheServer.start();
Each member starts and is running but when inspecting via `gfsh list gateways` I receive the following message:
[warning 2013/11/15 13:56:50.148 CST loc1 <RMI TCP Connection(3)-172.20.121.109> tid=0x56] (tid=11 msgId=11) Errorjava.lang.Exception: node1 is an invalid member name or Id at com.gemstone.gemfire.management.internal.beans.DistributedSystemBridge.validateMember(DistributedSystemBridge.java:694) at com.gemstone.gemfire.management.internal.beans.DistributedSystemBridge.listGatewaySenderObjectNames(DistributedSystemBridge.java:1218) at com.gemstone.gemfire.management.internal.beans.DistributedSystemMBean.listGatewaySenderObjectNames(DistributedSystemMBean.java:344) at com.gemstone.gemfire.management.internal.cli.commands.WanCommands.listGateway(WanCommands.java:603)
That message is incongruous with `gfsh describe config --member=node1`:
gfsh>describe config --member=node1 Configuration of member : "node1" JVM command line arguments ------------------------------------------------- -Didea.launcher.port=7542 -Didea.launcher.bin.path=C:\software\ide\IntelliJ IDEA 12.1.4\bin -Dfile.encoding=UTF-8 GemFire properties defined using the API ................................................................................................................................. deploy-working-dir : c:\software\ssw\node1 distributed-system-id : 1 license-data-management : === omitted === license-working-dir : c:\software\ssw\node1 locators : localhost[11044] mcast-port : 0 name : node1 Cache attributes ................................................................................................................................. is-server : true Cache-server attributes . port : 30303
Has anyone tried to get a gateway running from purely the Java API?
Thanks,
Jeff