alibaba/nacos · critical · NacosRuntimeException
500
500
Error message
Naming ServiceStorage returned no Runtime Endpoint data
What it means
The Naming ServiceStorage returned null for the Agent endpoint service, meaning no indexed data exists for the requested namespace/agentName/protocol combination. The AgentRuntimeRegistryService.getServiceInfo method (line 280) throws this NacosRuntimeException (HTTP 500) because it cannot build a Runtime Endpoint snapshot or EndpointSet from absent Naming state. This is typically a server-side issue indicating the service has never been registered or the index has not converged.
Source
Thrown at ai/src/main/java/com/alibaba/nacos/ai/service/agent/runtime/AgentRuntimeRegistryService.java:281
if (current == null) {
current = copyEndpoint(endpoint);
current.setHealthy(contribution.getHealthy());
current.setBindings(matchingBindings);
result.put(key, current);
} else {
current.setHealthy(current.getHealthy() || contribution.getHealthy());
current.setBindings(mergeBindings(current.getBindings(), matchingBindings));
}
}
validateCapacity(payloads.size());
return new ArrayList<AgentDiscoveryEndpoint>(result.values());
}
private ServiceInfo getServiceInfo(String namespaceId, String agentName, String protocol) {
ServiceInfo result =
serviceStorage.getData(composeService(namespaceId, agentName, protocol));
if (result == null) {
throw new NacosRuntimeException(NacosException.SERVER_ERROR,
"Naming ServiceStorage returned no Runtime Endpoint data");
}
return result;
}
private RuntimeEndpointSnapshotItem mapInstance(Instance instance, long lastUpdatedTime) {
try {
return AgentRuntimeEndpointMapper.fromInstance(instance, lastUpdatedTime);
} catch (IllegalArgumentException e) {
throw new NacosRuntimeException(NacosException.SERVER_ERROR,
"Invalid Agent Runtime Endpoint in Naming ServiceStorage", e);
}
}
private List<RuntimeVersionBinding> matchingBindings(
List<RuntimeVersionBinding> bindings, String version) {
List<RuntimeVersionBinding> result = new ArrayList<RuntimeVersionBinding>();
for (RuntimeVersionBinding binding : bindings) {View on GitHub (pinned to 9b989acdf1)
Solutions
- Verify that at least one Agent endpoint has been registered for the exact namespace, agentName, and protocol.
- If using a cluster, wait a few seconds for Distro AP convergence and retry.
- Ensure the querying server is part of the same cluster and has received the service data.
- Consider returning an empty result instead of an error if 'no endpoints' is a valid state for your use case — discuss with maintainers if the contract should change.
Defensive patterns
Strategy: try-catch
Validate before calling
// Before calling discovery, verify the service exists
ServiceInfo info = serviceStorage.getData(service);
if (info == null) {
return Collections.emptyList(); // or throw a domain-specific 'not registered' exception
} Type guard
public static boolean isServiceAvailable(ServiceStorage storage, Service service) {
return storage.getData(service) != null;
} Try / catch
try {
return registry.getRuntimeEndpointSet(ns, name, proto, version);
} catch (NacosRuntimeException e) {
if (e.getErrCode() == NacosException.SERVER_ERROR
&& e.getMessage().contains("no Runtime Endpoint data")) {
// return empty or retry after Distro convergence
return EndpointSet.empty();
}
throw e;
} Prevention
- Verify the agent is registered before querying discovery.
- In a cluster, allow time for Distro AP convergence after registration before querying.
- Handle this server error gracefully by returning an empty endpoint set or prompting the user to register.
When it happens
Trigger: Calling getRuntimeEndpointSnapshot or getRuntimeEndpointSet for a namespace/agentName/protocol tuple that has no registered instances, or before AP Distro convergence has propagated the service info to this server.
Common situations: Querying discovery before any registration has occurred; querying immediately after registration before Distro converges; querying on a fresh server node that hasn't received the service data; namespace mismatch between registration and discovery.
Related errors
- Runtime EndpointSet Version must not be null
- 503
- 500
- 500
- distroThreshold can not be zero or negative: {threshold}
AI-assisted analysis of alibaba/nacos@9b989acdf1 (2026-08-14).
Data as JSON: /api/errors/6ab4873de2bb1634.
Report an issue: GitHub.