问题
I just can't connect to a remote locator in Geode. The command line log is pasted below:
gfsh>connect --locator=192.168.141.128[10334]
Connecting to Locator at [host=192.168.141.128, port=10334] ..
No route to host (Host unreachable)
What do I need to do to add a route to the locator?
I have successfully started the locator in member1.
gfsh>start locator --name=locator1
Starting a Geode Locator in /home/geodeHome/my_geode/locator1...
...........
Locator in /home/geodeHome/my_geode/locator1 on 192.168.141.128[10334] as locator1 is currently online.
Process ID: 3858
Uptime: 6 seconds
Geode Version: 1.1.0
Java Version: 1.8.0_121
Log File: /home/geodeHome/my_geode/locator1/locator1.log
JVM Arguments: -Dgemfire.enable-cluster-configuration=true -Dgemfire.load-cluster-configuration-from-dir=false -Dgemfire.launcher.registerSignalHandlers=true -Djava.awt.headless=true -Dsun.rmi.dgc.server.gcInterval=9223372036854775806
Class-Path: /usr/geode/apache-geode-1.1.0/lib/geode-core-1.1.0.jar:/usr/geode/apache-geode-1.1.0/lib/geode-dependencies.jar
Successfully connected to: JMX Manager [host=192.168.141.128, port=1099]
Cluster configuration service is up and running.
It's wired to have this problem ,Could you guys give some tips here? Thanks for any advice.
回答1:
Can you ping 192.168.141.128 from the machine that you ran connect on? That IP may not be routable from your machine. You need to get the public IP of the machine that you are running the locator on, and use that IP/hostname as the bind-address when you start the locator. e.g:
gfsh>start locator --name=loc1 --bind-address=myHostName
来源:https://stackoverflow.com/questions/43337443/how-to-connect-a-remote-locator-in-geode