1

I tried to create a cluster in Apache Geode by providing the hostname and ip address of the remote system in the gemfire.properties file. Somehow, I am not able to create a cluster.

Can anybody please help with steps to create a cluster (including multi-site).

Thank you

RIT
  • 11
  • 3

1 Answers1

0

It's not clear from the description if you just want to create a simple GemFire cluster or multiple clusters connected through the Geode WAN replication mechanism...

That said, to start a local Geode cluster you can go trough Apache Geode in 15 Minutes or Less, it's a quick introduction that shows you how to use gfsh to start a locator and some servers, create a region, monitor the system using PULSE, etc.

To setup WAN replication, on the other hand, you can go through Configuring a Multi-site (WAN) System, the most important thing to note about this configuration is that your locators need to know about the locators on the remote system, so you need to make sure that the property remote-locators is correctly configured. Once the locators can talk to each other over the WAN, they will share the connection information with the local servers and these, in turn, will be able to communicate with the servers on the remote clusters.

Hope this helps. Cheers.

Juan Ramos
  • 1,421
  • 1
  • 8
  • 13
  • Thank you for the reply. I am novice to Geode and looking for guidance on WAN replication. I have provided the configuration for remote-locators property in gemfire.properties file and restarted it. When I have seen the locator log file, the properties I have set are missing. As suggested, I will go through the link and see if it solves my problem. – RIT Jun 20 '18 at 08:02
  • The link provided was helpful. But I am looking at bringing 3 physical machines which are on the same LAN into a geode cluster. I have provided the hostnames, ipaddresses and the port numbers of each of the machines in the locators property. This didn't work and the log file, the property didn't show at all. – RIT Jun 22 '18 at 06:19
  • Sounds weird... do you see any error or something?. The `remote-locators` property only needs to contain `hostname/ipAddress[port]` of the locators belonging to the remote clusters, not the servers or anything like that. – Juan Ramos Jun 22 '18 at 09:40
  • I don't see any error but in the locator folder when I opened the log file and under gemfire.propeties section, I couldn't see the remote-locators property. The pulse was only showing the locators and other members running locally. I am suspecting the firewall that could be hindering. – RIT Jun 22 '18 at 10:06
  • Are there any other properties that are to be set apart from the remote-locators? – RIT Jun 22 '18 at 10:40
  • The `PULSE` web application only shows the local members within the cluster view, so you certainly won't see the members of the remote clusters. There's a `WAN Information` section within the view that displays whether the remote cluster is reachable or not (working connectivity represented by a green triangle). – Juan Ramos Jun 22 '18 at 13:44
  • Are you correctly specifying the `--properties-file` parameter as part of the `start locator` command?. Does the file within this path has the `remote-locators` property correctly configured?. As a quick test, you can avoid using the properties file and start the locator using `gfsh start locator --name=locatorName --port=locatorPort --J=-Dgemfire.remote-locators=remoteHost[remotePort]`. Argument passed to the JVM on which the member will run should use the prefix `--J`. – Juan Ramos Jun 22 '18 at 13:49
  • I have given as below start locator --name=mylocator --port=10339 --J=Dgemfire.remote-locators=x.x.x.x [10344] – RIT Jun 25 '18 at 06:46
  • and getting the below Option '' is not available for this command. Use tab assist or the "help" command to see the legal options – RIT Jun 25 '18 at 06:46
  • I am able to telnet to the remote system successfully. – RIT Jun 25 '18 at 06:47
  • You're missing the symbol `-`, specifically between `=` and `Dgemfire.remove-locators`. In summary, it should look like `--J=-Dgemfire.remote-locators=x.x.x.x [10344]`. Cheers. – Juan Ramos Jun 25 '18 at 07:23
  • I did the same way as instructed. But, the locator got started on the local node. – RIT Jun 26 '18 at 09:47
  • Thank you Urizen for the support. I could now get the multi-node setup done. But I am not able to see the data in the region on other systems in the node (except on the node on which I have created the region and inserted the data) though I have used the type=REPLICATE. – RIT Jun 28 '18 at 07:34
  • Hello there, glad you were able to start the cluster. What do you mean by other systems?, a remote cluster?. If that's the case, keep in mind that you need to associate the `gateway-sender` for that particular region so the entries are replicated to the remote cluster. Within a single cluster, on the other hand, data is replicated to other nodes having the same region, automatically, if the region is configured as `REPLICATE`. Cheers. – Juan Ramos Jun 28 '18 at 09:23
  • By other system I meant node. This is what I have done. I have 3 nodes each running the geode (node1, node2 and node3) and these systems are physically separate and within the same LAN. I have configured data region say "myregion" on node1 and put some key and values in that ("1" and "One" for example). Now when I tried to run the query on node2 and node3 I am getting no region found. Then I have imported the cluster configuration zip file on node2 and node 3 which I have taken from node1. Then I could describe the region on node2 and node3 but the rows is 0. – RIT Jun 28 '18 at 10:32
  • Please note that these are 3 physically different machines each running Geode. Now, how do I make sure that if I add/modify/delete data in region on node1 will cascade/reflect on other 2 nodes.I haven't modified any other property in gemfire.properties file other than locators (provided the hostnames and ports of other two nodes). Hope this clarifies on what I am trying to do. – RIT Jun 28 '18 at 10:33
  • I think you're just not configuring things correctly... you first need to start the locator (which holds the cluster-configuration-service) and, once the locator is up and running, start the three nodes correctly setting the `locators` property. Once that's done, you can start creating the regions using the `gfsh create region` command and start adding data and/or working with your cluster. I highly recommend going through [Pivotal GemFire in 15 Minutes or Less](https://gemfire.docs.pivotal.io/93/gemfire/getting_started/15_minute_quickstart_gfsh.html). Cheers. – Juan Ramos Jun 28 '18 at 12:13
  • Thanks a ton. I could replicate on all nodes in the cluster. I have seen a strange behaviour. I have altogether 3 nodes and I have created a region on node1 and got that replicated on rest of the nodes(puts and gets were executed successfully on every node). But, when I purposefully stopped the locator on node1 for testing the cluster behaviour, rest of the two nodes are also down automatically. Is there any requirement that the locator on which the region is created should always be available? – RIT Jun 29 '18 at 09:37
  • Is locator fail-over supported in Geode? – RIT Jun 29 '18 at 10:49
  • This is explained in [Running Geode Locator Processes](http://geode.apache.org/docs/guide/16/configuring/running/running_the_locator.html). – Juan Ramos Jun 29 '18 at 12:53
  • I have gone through the entire pages but couldn't any info regarding setting the fail-over of distributed coordinator. Are there any properties to be set? Please help. If the locator that started first which is the JMX Manager goes down, then one of the other locators should take the senior role and the users should be able to query the cache without any interruptions. However, that doesn't seem to happen. Any command I give at the gfsh prompt on other locators is not working by saying "unavailable". – RIT Jun 30 '18 at 07:30
  • I figured out the issue to be with JMX Manager as stop locator automatically stops the JMX Manager on node1. However, no other locator in the cluster is starting the JMX Manager. I got the below exception on my other locators (locator2 and locator3 running on node2 and node3) [error 2018/06/29 21:09:49.896 IST locator2 :1024 shared ordered uid=3 port=60316> tid=0x55] Exception occurred in CacheListener java.util.NoSuchElementException: No value present – RIT Jun 30 '18 at 08:10
  • Got it. The problem is with gfsh since it is a live client. Thank you very much. – RIT Jun 30 '18 at 12:45
  • No worries, I'm glad everything's working fine now!. – Juan Ramos Jul 02 '18 at 07:51
  • Yes. Everything is working fine now. Thank you very much for the support you have extended. – RIT Jul 02 '18 at 09:56
  • By using the gfsh command line tool I have created the cluster. How to access the already running locators, servers and regions (created using gfsh) through Java code. How to make sure my Java program always points to the managing coordinator in the cluster(in case of fail-over of locators). – RIT Jul 02 '18 at 16:59
  • Hello there. This is all explained within the user guide, I believe you really need to go through the documentation and post separate questions instead of using one single post as it pollutes the entire thread, turning it useless for other users. Best regards. – Juan Ramos Jul 03 '18 at 13:45
  • Sure. Thanks for your suggestion. – RIT Jul 03 '18 at 16:15