Search code examples
gemfirespring-data-gemfire

Pivotal Gemfire NoAvailableLocatorsException


I have a gemfire cluster with version 8.1.0 running with two servers and a locator.Using Pulse UI Application I can see the cluster is up and running.

From my laptop I am able to ping the ip of the RHEL unix box where the cluster is running.

Also I am able to successfully connect to the cluster using gfsh command from my laptop:

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

But I try to connect to the cluster from a client spring application(using spring data gemfire 1.5.0.RELEASE) running in my laptop using below spring data gemfire cache xml:

The client cache xml is as below:

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

But I am getting below exception:

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)

A simillar question has been posted

Gemfire client server topology throws NoAvailableLocatorsException

But the above error is in a different method in ConnectionManagerImpl class.

EDIT: The cache xml has below client-cache declaration:

<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>

Solution

  • It was a network issue.It works when I try from office but does not work from home via vpn.