alibaba/nacos · error · IllegalArgumentException

Endpoint must not be null

Error message

Endpoint must not be null

What it means

Error "Endpoint must not be null" thrown in alibaba/nacos.

Source

Thrown at api/src/main/java/com/alibaba/nacos/api/ai/utils/EndpointNaturalKey.java:69

        this.normalizedHost = normalizedHost;
        this.effectivePort = effectivePort;
        this.transport = transport;
    }
    
    /**
     * Build a natural key from an Endpoint.
     *
     * @param namespaceId effective namespace
     * @param agentName Agent name
     * @param protocol protocol token
     * @param endpoint Endpoint value
     * @return canonical natural key
     * @throws IllegalArgumentException when any key field is invalid
     */
    public static EndpointNaturalKey of(String namespaceId, String agentName, String protocol,
        Endpoint endpoint) {
        if (endpoint == null) {
            throw new IllegalArgumentException("Endpoint must not be null");
        }
        return of(namespaceId, agentName, protocol, endpoint.getUri(), endpoint.getTransport());
    }
    
    /**
     * Build a natural key from the Endpoint fields that participate in identity.
     *
     * @param namespaceId effective namespace
     * @param agentName Agent name
     * @param protocol protocol token
     * @param uri Endpoint URI
     * @param transport transport token
     * @return canonical natural key
     * @throws IllegalArgumentException when any key field is invalid
     */
    public static EndpointNaturalKey of(String namespaceId, String agentName, String protocol,
        String uri,
        String transport) {

View on GitHub (pinned to 9b989acdf1)

Solutions

  1. Provide a non-null value for endpoint natural key before invoking this operation.

When it happens

Trigger: Thrown at api/src/main/java/com/alibaba/nacos/api/ai/utils/EndpointNaturalKey.java:69 when the library encounters an invalid state.

Common situations: Computing a natural key for a null Endpoint.


AI-assisted analysis of alibaba/nacos@9b989acdf1 (2026-08-14). Data as JSON: /api/errors/a434215b6ca37177. Report an issue: GitHub.