pinpoint-apm/pinpoint · error · UidException

Failed to get serviceUid. serviceName

Error message

Failed to get serviceUid. serviceName:${serviceName}

What it means

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.

Solutions

  1. Inspect the UidException's cause for the root failure
  2. Fix or check the storage/query used by the serviceUid supplier
  3. If the cause is transient (network), retry the operation
  4. Ensure the supplier task handles null/absent service records gracefully
Defensive patterns

Strategy: try-catch

Try / catch

try { return supplier.get(serviceName); } catch (UidException e) { log.error("serviceUid lookup failed for {}", serviceName, e.getCause()); throw e; }

Prevention

When it happens

Trigger: 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.

Common situations: Metadata storage outage or query error during agent registration; a bug in the uid-supplier task; deserialization failure of the stored uid value.

Related errors


AI-assisted analysis of pinpoint-apm/pinpoint@744c3d3075 (2026-09-07). Data as JSON: /api/errors/f2b5b9e101f98ad1. Report an issue: GitHub.

Appendix: source

Thrown at collector/src/main/java/com/navercorp/pinpoint/io/request/ServiceUidSuppliers.java:91

    private static ServiceUid get(String serviceName, CompletableFuture<ServiceUid> future, long timeout, TimeUnit unit) {
        try {
            ServiceUid serviceUid = future.get(timeout, unit);
            if (serviceUid == null) {
                throw new UidNotFoundException(serviceName);
            }
            return serviceUid;
        } catch (InterruptedException e) {
            Thread.currentThread().interrupt();
            throw new UidException("Interrupted while getting serviceUid. serviceName:" + serviceName, e);
        } catch (TimeoutException e) {
            throw new UidException("Timed out while getting serviceUid. serviceName:" + serviceName, e);
        } catch (ExecutionException e) {
            Throwable cause = e.getCause();
            if (cause instanceof UidException uidException) {
                throw uidException;
            }
            throw new UidException("Failed to get serviceUid. serviceName:" + serviceName, cause);
        }
    }
}

View on GitHub (pinned to 744c3d3075)