【发布时间】:2015-10-05 22:45:41
【问题描述】:
我有一个运行 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 client server topology throws 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>
【问题讨论】:
标签: gemfire spring-data-gemfire