Reputation: 1008
The GemFire tutorial shows that a locator is started with
gfsh>start locator --name=locator1 --port=55221
In some parts of the tutorial the command to start a server is shown as
gfsh>start server --name=server1 --J=-Dgemfire.jmx-manager=true --J=-Dgemfire.jmx-manager-start=true --J=-Dgemfire.http-port=8080
In this case, how does the server know the locator on which it will get registered?
Upvotes: 0
Views: 66
Reputation: 4676
A server always joins a distributed system (DS) by connecting to a locator. [*]
If you start a locator from within gfsh and then, in the same session, start a server, gfsh will know to use the existing locator connection for the new server you are starting. In this case you don't need to explicitly provide a --locator
option. This is also true when running gfsh with multiple start commands from a script. For example: gfsh -e "start locator --name=locator1 --port=19991" -e "start server --name=server1" -e "list members"
[*] Not true for versions of GemFire/Geode < 9.x as older versions can also join a DS using a multicast address/port combo. See the --mcast-port
option in the docs. However that functionality is deprecated and will not be available in GemFire/Geode >= 9.x so it
Upvotes: 1