gpt4 book ai didi

java - 无法从不同节点启动geode服务器

转载 作者:行者123 更新时间:2023-12-02 12:09:34 29 4
gpt4 key购买 nike

我有一个定位器和服务器一起在节点 1 上运行。我想从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 到另一台服务器。我

最佳答案

错误是:

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

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

auto-crawler-tikv-1.cs1cloud.internal 是否有一个/etc/hosts 将 localhost 解析为 172.20.22.121?您的node2/etc/hosts 是否知道 auto-crawler-tikv-1.cs1cloud.internal 解析为 172.20.22.121?

另一个考虑因素是在服务器和定位器上设置 --bind-address。请参阅https://gemfire.docs.pivotal.io/gemfire/tools_modules/gfsh/command-pages/start.html

关于java - 无法从不同节点启动geode服务器,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/46644839/

29 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com