代码之家  ›  专栏  ›  技术社区  ›  Shivam Mitra

无法从其他节点启动geode服务器

  •  0
  • Shivam Mitra  · 技术社区  · 7 年前

    我在node1和服务器上运行了一个定位器。我想从node2启动另一个服务器。我可以从node1连接到定位器,但当我尝试创建另一个服务器时,会出现一些错误。

    节点1(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
    

    节点2(172.20.22.121)

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

    现在,我尝试在node2上启动另一个服务器“server2”。

    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
    

    我能够从一台服务器ping到另一台服务器。我

    1 回复  |  直到 7 年前
        1
  •  1
  •   Wes Williams    7 年前

    错误是:

    原因:java。网未知后异常 在org。阿帕奇。晶洞。内部的网SocketCreator。getLocalHost(SocketCreator.java:280)

    这是网络。你说你“可以从一台服务器ping到另一台服务器”,但你能通过主机名而不是IP ping吗?它试图解析主机名以获取IP,但它不知道要连接到哪个IP。

    执行auto-crawler-tikv-1。CS1云。内部是否有一个/etc/hosts将本地主机解析为172.20.22.121?你的node2/etc/hosts知道auto-crawler-tikv-1吗。CS1云。内部解析为172.20.22.121?

    另一个考虑因素是在服务器和定位器上设置绑定地址。看见 https://gemfire.docs.pivotal.io/gemfire/tools_modules/gfsh/command-pages/start.html