Issues with 2nd geode container connecting to locator at port 10334

230 views Asked by At

I'm trying to create an Apache Geode cluster in docker w/ 2 server nodes and a single locator. Things seem to go OK until I try to make the 2nd node (geodesrvB) connect with the locator. The connection fails, and I must be missing something. I've been breaking apart my bash script into single commands to try to isolate the issue. Below are some commands that show some of the initial commands and issues they're giving me. Any help is greatly appreciated!


docker run -d -it -p 162.243.207.235:10335:10334 -p 162.243.207.235:1097:1099 -p 162.243.207.235:40412:40411 --name geodesrvA apachegeode/geode

geodesrvB fails, it says port 10334 already allocated. without binding port 10334 for geodesrvB, connection is later refused when connecting to locator

docker run -d -it -p 162.243.207.235:1098:1099 -p 162.243.207.235:10336:10334 --name geodesrvB apachegeode/geode

docker run -it apachegeode/geode

docker exec -it geodesrvA bash -c 'gfsh -e "start locator --name=locator1 --J=-Dgemfire.jmx-manager-hostname-for-clients=162.243.207.235 --hostname-for-clients=162.243.207.235" -e "start server --name=serverA"'

Says -e invalid command unless ran as detached (-d)... Running as detached provides no errors

docker exec -d -it geodesrvB bash -c 'gfsh -e "--locator=localhost[10334] start server --name=serverB"'

docker exec -it geodesrvA bash -c 'gfsh -e "connect --locator=localhost[10334]" -e"list members"'

Connection refused to port 10334 when connecting to locator

docker exec -it geodesrvB bash -c 'gfsh -e "connect --locator=localhost[10334]" -e "list members"'

docker exec -it geodesrvA bash -c 'gfsh -e "connect --locator=localhost[10334]" -e"create region --name=regionA --type=REPLICATE_PERSISTENT"';

docker exec -it geodesrvA bash -c 'gfsh -e "connect --locator=localhost[10334]" -e"list regions"';

Says connection to 10334 refused

docker exec -it geodesrvB bash -c 'gfsh -e "connect --locator=localhost[10334]" -e"list regions"';
1

There are 1 answers

0
HannesM On

Are these three instances (2x server, 1x locator) running on individual machines/VMs? If so, you should be able to remove many of your IP addresses from the command arguments. That may make your scenario more clear to read and understand.

Perhaps all you need to specify is --locator=your_locator_IP_address_here[10334]