Client Connection Fails with NoAvailableLocatorsException When Using Standard Kubernetes LoadBalancer
search cancel

Client Connection Fails with NoAvailableLocatorsException When Using Standard Kubernetes LoadBalancer

book

Article ID: 453828

calendar_today

Updated On:

Products

VMware Tanzu Gemfire

Issue/Introduction

When attempting to connect an external Java client application to a GemFire cluster hosted on Kubernetes via a standard LoadBalancer service VIP, the connection fails.

The client application crashes and logs the following exception:

org.apache.geode.cache.client.NoAvailableLocatorsException: Unable to connect to any locators in the list [/10.x.x.xxx:10334]

Environment

 

  • Product: VMware Tanzu GemFire 10.1.2+

  • Platform: Kubernetes (using Tanzu GemFire for Kubernetes operator)

  • Networking: Standard Kubernetes LoadBalancer (e.g., MetalLB)

 

Cause

A basic Kubernetes LoadBalancer service configuration for GemFire is only designed to route HTTP web traffic (such as REST API calls, gfsh over HTTP, or curl commands). It does not natively support or properly route the SNI-based TCP traffic required for standard GemFire client-to-server communication. Exposing standard locator (10334) and server (40404) ports directly through a basic LoadBalancer will not work for external Java clients.

Resolution

To allow external client applications to interact with a Kubernetes-hosted GemFire cluster, you must configure off-platform access.

This is a heavier configuration that requires creating additional routing objects (typically an Ingress controller like Envoy) to accurately route external SNI traffic to the individual locator and server pods.

Follow the official documentation for setting up off-platform access:

https://techdocs.broadcom.com/us/en/vmware-tanzu/data-solutions/tanzu-gemfire-on-kubernetes/2-4/gf-k8s/off_platform.html