alibaba/nacos · warning · NacosApiException

RESOURCE_NOT_FOUND

RESOURCE_NOT_FOUND

Error message

Plugin not found: %s

What it means

Thrown by PluginInnerHandler.getPluginAvailability when pluginManager.isPluginAvailable(pluginId) returns false for the given pluginType:pluginName. It raises NacosApiException with HTTP 404 and ErrorCode.RESOURCE_NOT_FOUND. Note the message says 'not found' but the guard is availability: a plugin that is registered but not currently available on this node also triggers it.

Source

Thrown at console/src/main/java/com/alibaba/nacos/console/handler/impl/inner/core/PluginInnerHandler.java:173

        throws NacosException {
        String pluginId = pluginType + ":" + pluginName;
        pluginManager.setPluginEnabled(pluginId, enabled, localOnly);
    }
    
    @Override
    public void updatePluginConfig(String pluginType, String pluginName, Map<String, String> config,
        boolean localOnly) throws NacosException {
        String pluginId = pluginType + ":" + pluginName;
        pluginManager.updatePluginConfig(pluginId, config, localOnly);
    }
    
    @Override
    public Map<String, Boolean> getPluginAvailability(String pluginType, String pluginName)
        throws NacosException {
        String pluginId = pluginType + ":" + pluginName;
        
        if (!pluginManager.isPluginAvailable(pluginId)) {
            throw new NacosApiException(HttpStatus.NOT_FOUND.value(), ErrorCode.RESOURCE_NOT_FOUND,
                "Plugin not found: " + pluginId);
        }
        
        Collection<Member> members = memberManager.allMembers();
        Map<String, Boolean> nodeAvailability = new ConcurrentHashMap<>(members.size());
        
        List<CompletableFuture<Void>> futures = members.stream()
            .map(member -> CompletableFuture.runAsync(() -> {
                String address = member.getAddress();
                nodeAvailability.put(address, checkMemberPluginAvailability(member, pluginId));
            }))
            .collect(Collectors.toList());
        
        awaitCompletion(futures);
        
        return nodeAvailability;
    }
    

View on GitHub (pinned to 9b989acdf1)

Solutions

  1. Confirm pluginType and pluginName exactly match a loaded plugin (use the plugin list endpoint to enumerate valid ids).
  2. Ensure the plugin's SPI jar/implementation is present and enabled on all cluster nodes.
  3. If the plugin was just installed, verify it is initialized before querying availability.

Example fix

// before
handler.getPluginAvailability("auth", "nonexistent");

// after
Collection<String> ids = pluginManager.getAllPlugins(); // enumerate real ids
String validId = ids.stream().filter(id -> id.startsWith("auth:")).findFirst().orElseThrow();
handler.getPluginAvailability("auth", validId.split(":")[1]);
Defensive patterns

Strategy: validation

Validate before calling

// Confirm the pluginId is available before querying cluster availability
String pluginId = pluginType + ":" + pluginName;
if (!pluginManager.isPluginAvailable(pluginId)) {
    throw new NoSuchResourceException("plugin not available: " + pluginId);
}
handler.getPluginAvailability(pluginType, pluginName);

Type guard

// Java: boolean guard for a loaded/available plugin
boolean pluginAvailable = pluginManager.isPluginAvailable(pluginType + ":" + pluginName);

Try / catch

try {
    return handler.getPluginAvailability(pluginType, pluginName);
} catch (NacosApiException e) {
    if (e.getDetailErrCode() == ErrorCode.RESOURCE_NOT_FOUND.getCode()) {
        return Map.of(); // plugin absent cluster-wide
    }
    throw e;
}

Prevention

When it happens

Trigger: Querying cluster-wide availability for a pluginId that is not loaded/available on the node handling the request (plugin not installed, disabled, or wrong type:name combination).

Common situations: Typo in pluginType or pluginName; querying a plugin whose SPI implementation is not on the classpath; plugin disabled in config; querying before the plugin manager initialized the plugin.

Related errors


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