0

I have a locator running on node1 along with a server. I want to start another server form node2. I am able to connect to locator from node1 but i get some errors when I try to create another server.

Node1(172.20.22.52):

gfsh>list members
 Name   | Id
------- | ------------------------------------------------
locator | 172.20.22.52(locator:10094:locator)<ec><v0>:1024
server1 | 172.20.22.52(server1:10220)<v1>:1025

Node2(172.20.22.121)

gfsh>connect --locator=172.20.22.52[10334]
Already connected to: auto-crawler-tikv-1.cs1cloud.internal[1099]

Now, I try to start another server "server2" on node2.

gfsh>start server --name=server2
Starting a Geode Server in /home/admin/apache-geode-1.2.1/bin/server2...
The Cache Server process terminated unexpectedly with exit status 1. Please refer to the log file in /home/admin/apache-geode-1.2.1/bin/server2 for full details.

Exception in thread "main" org.apache.geode.GemFireConfigException
    at org.apache.geode.distributed.internal.membership.gms.messenger.JGroupsMessenger.init(JGroupsMessenger.java:254)
    at org.apache.geode.distributed.internal.membership.gms.Services.init(Services.java:134)
    at org.apache.geode.distributed.internal.membership.gms.GMSMemberFactory.newMembershipManager(GMSMemberFactory.java:101)
    at org.apache.geode.distributed.internal.membership.MemberFactory.newMembershipManager(MemberFactory.java:89)
    at org.apache.geode.distributed.internal.DistributionManager.<init>(DistributionManager.java:1153)
    at org.apache.geode.distributed.internal.DistributionManager.<init>(DistributionManager.java:1201)
    at org.apache.geode.distributed.internal.DistributionManager.create(DistributionManager.java:572)
    at org.apache.geode.distributed.internal.InternalDistributedSystem.initialize(InternalDistributedSystem.java:697)
    at org.apache.geode.distributed.internal.InternalDistributedSystem.newInstance(InternalDistributedSystem.java:305)
    at org.apache.geode.distributed.DistributedSystem.connect(DistributedSystem.java:205)
    at org.apache.geode.cache.CacheFactory.create(CacheFactory.java:210)
    at org.apache.geode.distributed.internal.DefaultServerLauncherCacheProvider.createCache(DefaultServerLauncherCacheProvider.java:52)
    at org.apache.geode.distributed.ServerLauncher.createCache(ServerLauncher.java:860)
    at org.apache.geode.distributed.ServerLauncher.start(ServerLauncher.java:772)
    at org.apache.geode.distributed.ServerLauncher.run(ServerLauncher.java:699)
    at org.apache.geode.distributed.ServerLauncher.main(ServerLauncher.java:231)
Caused by: java.net.UnknownHostException
    at org.apache.geode.internal.net.SocketCreator.getLocalHost(SocketCreator.java:280)
    at org.apache.geode.distributed.internal.membership.gms.messenger.JGroupsMessenger.init(JGroupsMessenger.java:252)
    ... 15 more

I am able to ping from one server to another. I

1
  • What does the Geode log in /home/admin/apache-geode-1.2.1/bin/server2 say? You could also try starting the locator with a bind address...
    – rupweb
    Commented Oct 9, 2017 at 14:52

1 Answer 1

1

The error is:

Caused by: java.net.UnknownHostException at org.apache.geode.internal.net.SocketCreator.getLocalHost(SocketCreator.java:280)

It's network. You say that you "can ping from one server to another" but can you ping by hostname and not by IP? It's trying to resolve the hostname to get an IP and it doesn't know which IP to connect to.

Does auto-crawler-tikv-1.cs1cloud.internal have an /etc/hosts that resolves the localhost to 172.20.22.121? Does your node2 /etc/hosts know that auto-crawler-tikv-1.cs1cloud.internal resolves to 172.20.22.121?

Another consideration is to set --bind-address on server and locator. See https://gemfire.docs.pivotal.io/gemfire/tools_modules/gfsh/command-pages/start.html

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.