{"record":{"id":"f2b5b9e101f98ad1","repo":"pinpoint-apm/pinpoint","slug":"failed-to-get-serviceuid-servicename-servicenam","errorCode":null,"errorMessage":"Failed to get serviceUid. serviceName:${serviceName}","messagePattern":"Failed to get serviceUid\\. serviceName:(.+?)","errorType":"exception","errorClass":"UidException","httpStatus":null,"severity":"error","filePath":"collector/src/main/java/com/navercorp/pinpoint/io/request/ServiceUidSuppliers.java","lineNumber":91,"sourceCode":"\n    private static ServiceUid get(String serviceName, CompletableFuture<ServiceUid> future, long timeout, TimeUnit unit) {\n        try {\n            ServiceUid serviceUid = future.get(timeout, unit);\n            if (serviceUid == null) {\n                throw new UidNotFoundException(serviceName);\n            }\n            return serviceUid;\n        } catch (InterruptedException e) {\n            Thread.currentThread().interrupt();\n            throw new UidException(\"Interrupted while getting serviceUid. serviceName:\" + serviceName, e);\n        } catch (TimeoutException e) {\n            throw new UidException(\"Timed out while getting serviceUid. serviceName:\" + serviceName, e);\n        } catch (ExecutionException e) {\n            Throwable cause = e.getCause();\n            if (cause instanceof UidException uidException) {\n                throw uidException;\n            }\n            throw new UidException(\"Failed to get serviceUid. serviceName:\" + serviceName, cause);\n        }\n    }\n}\n","sourceCodeStart":73,"sourceCodeEnd":95,"githubUrl":"https://github.com/pinpoint-apm/pinpoint/blob/744c3d3075e595656abb1ae331ad2c0e4c9eb996/collector/src/main/java/com/navercorp/pinpoint/io/request/ServiceUidSuppliers.java#L73-L95","documentation":"ServiceUidSuppliers.get wraps non-UidException failures of the underlying async lookup in a UidException with 'Failed to get serviceUid. serviceName:<name>' and the original cause. This normalizes ExecutionException into the module's own exception type while preserving the cause.","triggerScenarios":"get(serviceName) invoked when the serviceUid computation task itself throws (e.g. storage query failure, NPE in the supplier) — surfaced as ExecutionException whose cause is not already a UidException.","commonSituations":"Metadata storage outage or query error during agent registration; a bug in the uid-supplier task; deserialization failure of the stored uid value.","solutions":["Inspect the UidException's cause for the root failure","Fix or check the storage/query used by the serviceUid supplier","If the cause is transient (network), retry the operation","Ensure the supplier task handles null/absent service records gracefully"],"exampleFix":null,"handlingStrategy":"try-catch","validationCode":null,"typeGuard":null,"tryCatchPattern":"try { return supplier.get(serviceName); } catch (UidException e) { log.error(\"serviceUid lookup failed for {}\", serviceName, e.getCause()); throw e; }","preventionTips":["Always log/inspect getCause() of UidException to find the root failure","Make the uid supplier task defensive against null/absent records","Add health checks for the metadata storage backing the supplier"],"tags":["java","collector","async"],"backgroundTag":"upstream-api-error","analyzedSha":"744c3d3075e595656abb1ae331ad2c0e4c9eb996","analyzedAt":"2026-09-07T18:48:45.289Z","contentChangedAt":"2026-09-07T18:48:45.289Z","schemaVersion":2},"datasetVersion":"2026-09-14T05:17:10.506Z"}