pinpoint-apm/pinpoint · warning

Failed to request. header={}

Error message

Failed to request. header={}

What it means

StatService dispatch catches any Throwable from the stat SimpleHandler and logs it with the request header, then propagates via onNextError(e). It indicates a PStatMessage from an agent failed processing in the collector.

Source

Thrown at collector/src/main/java/com/navercorp/pinpoint/collector/receiver/grpc/service/StatService.java:136

            this.dispatch(agentUriStat, MessageTypes.AGENT_URI_STAT, uriStatHandler, call.getUidFetcher(), context, response);
        } else {
            if (logger.isInfoEnabled()) {
                logger.info("Found empty stat message header:{}", ServerContext.getAgentInfo(context));
            }
        }
    }

    private <T> void dispatch(T data,
                              MessageType messageType,
                              SimpleHandler<T> handler,
                              UidFetcher fetcher,
                              Context context,
                              ServerCallStream<PStatMessage, Empty> responseObserver) {
        final ServerRequest<T> request = this.serverRequestFactory.newServerRequest(context, fetcher, messageType, data);
        try {
            handler.handleSimple(request);
        } catch (Throwable e) {
            logger.warn("Failed to request. header={}", request.getHeader(), e);
            responseObserver.onNextError(e);
        }
    }
}

View on GitHub (pinned to 744c3d3075)

Solutions

  1. Inspect the logged exception (e) for the root cause
  2. Use the agentId in the logged header to identify and check the offending agent's version/traffic
  3. Verify collector's stat storage backend connectivity
  4. Align agent and collector versions to a compatible protocol
Defensive patterns

Strategy: try-catch

Try / catch

try {
    statService.dispatch(handler, fetcher, context, messageType, data, responseObserver);
} catch (Throwable e) {
    logger.warn("Failed to request. header={}", request.getHeader(), e);
    // root cause is in e
}

Prevention

When it happens

Trigger: handler.handleSimple(request) throws while handling a stat message created by serverRequestFactory — e.g. binding errors, storage write failures, or handler-internal exceptions.

Common situations: Agent stats payload incompatible with collector version; metric storage (HBase/pinot) unavailable; deserialization failure on unusual agent data.

Understand the failure class

Background: "API request failed": what wrapped HTTP errors from external APIs mean and how to find the real cause — this error's family across 29 libraries.

Related errors


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