{"record":{"id":"5ea7f85144151190","repo":"alibaba/nacos","slug":"404-5ea7f8","errorCode":"404","errorMessage":"service %s@@%s is not found!","messagePattern":"service (.+?)@@(.+?) is not found!","errorType":"validation","errorClass":"NacosException","httpStatus":null,"severity":"error","filePath":"naming/src/main/java/com/alibaba/nacos/naming/core/CatalogServiceV2Impl.java","lineNumber":75,"sourceCode":"public class CatalogServiceV2Impl implements CatalogService {\n    \n    private final ServiceStorage serviceStorage;\n    \n    private final NamingMetadataManager metadataManager;\n    \n    public CatalogServiceV2Impl(ServiceStorage serviceStorage,\n        NamingMetadataManager metadataManager) {\n        this.serviceStorage = serviceStorage;\n        this.metadataManager = metadataManager;\n    }\n    \n    @Override\n    public ServiceDetailInfo getServiceDetail(String namespaceId, String groupName,\n        String serviceName)\n        throws NacosException {\n        Service service = Service.newService(namespaceId, groupName, serviceName);\n        if (!ServiceManager.getInstance().containSingleton(service)) {\n            throw new NacosException(NacosException.NOT_FOUND,\n                String.format(\"service %s@@%s is not found!\", groupName, serviceName));\n        }\n        service = ServiceManager.getInstance().getSingleton(service);\n        Optional<ServiceMetadata> metadata = metadataManager.getServiceMetadata(service);\n        ServiceMetadata detailedService = metadata.orElseGet(ServiceMetadata::new);\n        \n        ServiceDetailInfo result = new ServiceDetailInfo();\n        result.setNamespaceId(service.getNamespace());\n        result.setGroupName(service.getGroup());\n        result.setServiceName(serviceName);\n        result.setEphemeral(service.isEphemeral());\n        result.setProtectThreshold(detailedService.getProtectThreshold());\n        result.setSelector(detailedService.getSelector());\n        result.setMetadata(detailedService.getExtendData());\n        \n        Map<String, ClusterInfo> clusters =\n            new HashMap<>(serviceStorage.getClusters(service).size());\n        for (String each : serviceStorage.getClusters(service)) {","sourceCodeStart":57,"sourceCodeEnd":93,"githubUrl":"https://github.com/alibaba/nacos/blob/9b989acdf181d00898f2e8839257bb2b2a3cefe3/naming/src/main/java/com/alibaba/nacos/naming/core/CatalogServiceV2Impl.java#L57-L93","documentation":"Thrown by CatalogServiceV2Impl.getServiceDetail when the requested service does not exist in the ServiceManager singleton registry. Error code is NOT_FOUND=404. The check uses ServiceManager.getInstance().containSingleton(service) which verifies the service has been registered/loaded on this server.","triggerScenarios":"Calling the catalog service detail API (or the admin/console endpoint behind it) for a namespaceId/groupName/serviceName combination that has never been registered or has been removed.","commonSituations":"Querying a service that was never created. Service was deregistered/deleted between listing and detail lookup. Wrong namespace, group, or service name (typo). Querying a persistent service whose data has not yet loaded after a server restart.","solutions":["Verify the service exists by listing services in the target namespace/group first.","Check the namespaceId, groupName, and serviceName for typos.","If the server recently restarted, wait for service data to finish loading from persistent storage.","Register/publish the service if it was expected to exist."],"exampleFix":null,"handlingStrategy":"try-catch","validationCode":"// verify service exists before fetching detail\nif (!ServiceManager.getInstance().containSingleton(\n        Service.newService(namespaceId, groupName, serviceName))) {\n    log.warn(\"service does not exist: {}/{}\", groupName, serviceName);\n    return;\n}","typeGuard":null,"tryCatchPattern":"try {\n    ServiceDetailInfo detail = catalogService.getServiceDetail(namespaceId, groupName, serviceName);\n} catch (NacosException e) {\n    if (e.getErrCode() == NacosException.NOT_FOUND) {\n        // service not registered; create it or inform user\n    } else { throw e; }\n}","preventionTips":["List services in the target namespace/group before querying detail to confirm existence.","Double-check namespaceId, groupName, and serviceName for typos.","After a server restart, wait for service data to load before querying."],"tags":["naming","not-found","catalog","service","admin-api"],"backgroundTag":null,"analyzedSha":"9b989acdf181d00898f2e8839257bb2b2a3cefe3","analyzedAt":"2026-08-14T07:17:31.569Z","schemaVersion":2},"datasetVersion":"2026-08-14T10:17:34.591Z"}