我有一个运行 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>