I am running docker image apachegeode/geode:1.9.0 on AWS ec2 instance with Ubuntu 18 AMI. While running gfsh command to start the locator , I see the hostname as garbled. How do I set the correct hostname while starting locator so that I can access the locator from Java client ?
gfsh command used is as follows :
start locator --name=LocatorOne --log-level=config --J=-Dgemfire.http-service-bind-address=172.17.0.2
gfsh start locator command results are as given below :
Starting a Geode Locator in /LocatorOne...
.........
Locator in /LocatorOne on b9e7f469d3b9[10334] as LocatorOne is currently online.
Process ID: 40
Uptime: 12 seconds
Geode Version: 1.9.0
Java Version: 1.8.0_201
Log File: /LocatorOne/LocatorOne.log
JVM Arguments: -Dgemfire.enable-cluster-configuration=true -Dgemfire.load-cluster-configuration-from-dir=false -Dgemfire.log-level=config -Dgemfire.http-service-bind-address=172.17.0.2 -Dgemfire.launcher.registerSignalHandlers=true -Djava.awt.headless=true -Dsun.rmi.dgc.server.gcInterval=9223372036854775806
Class-Path: /geode/lib/geode-core-1.9.0.jar:/geode/lib/geode-dependencies.jar
Successfully connected to: JMX Manager [host=b9e7f469d3b9, port=1099]
Cluster configuration service is up and running.
The above mentioned garbled hostname appears in Java client code while I try to put a key-value pair to a region.
The
http-service-bind-addressspecifies the IP address to which the HTTP service will be bound. What you should be using instead ishostname-for-clients, which is basically the host name or IP address that will be sent to clients so they can connect to this locator. Please have a look at thestart locatorcommand for further details. Best regards.