1

我有一个运行 8.1.0 版的 gemfire 集群,运行有两台服务器和一个定位器。使用 Pulse UI 应用程序我可以看到集群已启动并正在运行。

从我的笔记本电脑上,我可以 ping 到运行集群的 RHEL unix 机器的 ip。

我还可以使用笔记本电脑上的 gfsh 命令成功连接到集群:

gfsh>connect --locator=locator-ip[15101]`

但是我尝试使用以下 spring data gemfire 缓存 xml 从在我的笔记本电脑中运行的客户端 spring 应用程序(使用 spring data gemfire 1.5.0.RELEASE)连接到集群:

客户端缓存xml如下:

<gfe:pool id="gemfire-pool" subscription-enabled="true" >
        <gfe:locator host="locator-ip" port="locator-port"/>
</gfe:pool>

但我得到以下例外:

com.gemstone.gemfire.cache.client.NoAvailableLocatorsException: Unable to connect to any locators in the list [locator-host:15101, locator-ip/locator-ip:15101]
    at com.gemstone.gemfire.cache.client.internal.AutoConnectionSourceImpl.findServer(AutoConnectionSourceImpl.java:136)
    at com.gemstone.gemfire.cache.client.internal.ConnectionFactoryImpl.createClientToServerConnection(ConnectionFactoryImpl.java:206)
    at com.gemstone.gemfire.cache.client.internal.pooling.ConnectionManagerImpl.borrowConnection(ConnectionManagerImpl.java:214)

已经发布了一个类似的问题

Gemfire 客户端服务器拓扑抛出 NoAvailableLocatorsException

但上述错误在 ConnectionManagerImpl 类中的不同方法中。

编辑:缓存 xml 具有以下客户端缓存声明:

<util:properties id="gemfire-props">
        <prop key="log-level">error</prop>
</util:properties>

<gfe:client-cache id="gemfireCache" pool-name="gemfire-pool" properties-ref="gemfire-props">

<gfe:client-region id="skuInfoRegionBean" pool-name="gemfire-pool"
        name="SKU_INFO" shortcut="CACHING_PROXY">
</gfe:client-region>
4

2 回答 2

1

您正在运行什么版本的Spring Data GemFireGemFire?此外,如果您可以共享配置连接到运行 RHEL 服务器的集群的 GemFire ClientCache(和池)的 Spring 配置,那将很有帮助。

我的理解是,您的集群在“远程”RHEL UNIX 机器上运行,而您的客户端在笔记本电脑上运行,对吗?

根据您的 Gfshconnect命令语法,您的 Spring 配置需要看起来类似于...

<gfe:pool ...>
  <gfe:locator host="locator-ip" port="15101"/>
</gfe:pool>

<gfe:client-cache/>

...

NoAvailableLocatorsException消息似乎很奇怪......“无法连接到列表 [locator-host:15101, locator-ip/locator-ip:15101 ]中的任何定位器”并且不太正确。

于 2015-09-28T19:03:30.030 回答
0

这是一个网络问题。当我在办公室尝试时它可以工作,但不能通过 vpn 在家里工作。

于 2015-10-05T14:36:11.513 回答