pinpoint-apm/pinpoint · error · StatusRuntimeException
RemoteAddress is null
Error message
RemoteAddress is null
What it means
PermissionServerTransportFilter.transportReady inspects the gRPC transport-ready attributes for TRANSPORT_ATTR_REMOTE_ADDR to build the client's InetAddress for address filtering. If the remote address attribute is null, the transport cannot be evaluated, so it throws a gRPC Status.INTERNAL runtime exception ('RemoteAddress is null') to reject the connection as unauthenticated.
Source
Thrown at collector/src/main/java/com/navercorp/pinpoint/collector/receiver/grpc/PermissionServerTransportFilter.java:54
private final String debugString;
private final AddressFilter addressFilter;
public PermissionServerTransportFilter(String debugString, final AddressFilter addressFilter) {
this.debugString = Objects.requireNonNull(debugString, "debugString");
this.addressFilter = Objects.requireNonNull(addressFilter, "addressFilter");
}
@Override
public Attributes transportReady(final Attributes attributes) {
if (logger.isDebugEnabled()) {
logger.debug("Ready attributes={}", attributes);
}
final InetSocketAddress remoteSocketAddress = (InetSocketAddress) attributes.get(Grpc.TRANSPORT_ATTR_REMOTE_ADDR);
if (remoteSocketAddress == null) {
// Unauthenticated
logger.warn("Unauthenticated transport. TRANSPORT_ATTR_REMOTE_ADDR must not be null");
throw Status.INTERNAL.withDescription("RemoteAddress is null").asRuntimeException();
}
final InetAddress inetAddress = remoteSocketAddress.getAddress();
if (addressFilter.accept(inetAddress)) {
return attributes;
}
// Permission denied
logger.debug("Permission denied transport.");
throw Status.PERMISSION_DENIED.withDescription("invalid IP").asRuntimeException();
}
@Override
public void transportTerminated(Attributes transportAttrs) {
if (logger.isDebugEnabled()) {
logger.debug("Terminated attributes={}", transportAttrs);
}View on GitHub (pinned to 744c3d3075)
Solutions
- Connect from a real network socket so gRPC populates TRANSPORT_ATTR_REMOTE_ADDR
- If using InProcessServer/InProcessChannel for tests, configure the address filter to bypass or provide remote-address attributes
- Check gRPC/Netty version compatibility where transport attributes may be missing
- Verify no proxy/interceptor chain strips the transport attributes before this filter
Example fix
// before (test setup using in-process transport against an address-filtered server)
Server server = InProcessServerBuilder.forName("pinpoint").addService(service).build().start();
// after (use a real socket transport, or exempt tests from the filter)
Server server = NettyServerBuilder.forPort(9991).addService(service).build().start(); Defensive patterns
Strategy: try-catch
Validate before calling
// Client side: ensure a real socket transport is used, not in-process, when the collector filters by address
if (channel instanceof InProcessChannel) {
throw new IllegalStateException("Address-filtered collector requires a real network transport");
} Try / catch
try {
stub.sendSpan(request);
} catch (StatusRuntimeException e) {
if (e.getStatus().getCode() == Status.Code.INTERNAL && e.getMessage().contains("RemoteAddress is null")) {
logger.error("Collector could not determine client address; use a real socket transport");
}
throw e;
} Prevention
- Use Netty socket transports (not InProcess) against address-filtered collectors
- Keep gRPC and Netty versions aligned so transport attributes are populated
- Avoid intermediaries that hide the client socket address
- Cover connection setup in integration tests against the same filter configuration
When it happens
Trigger: A gRPC transport completes ready-handshake without a REMOTE_ADDR attribute in the attributes map — i.e., (InetSocketAddress) attributes.get(Grpc.TRANSPORT_ATTR_REMOTE_ADDR) returns null — such as via in-process transports, proxies, or unusual channel setups that don't populate remote address.
Common situations: Clients connecting through an intermediary that suppresses transport attributes; tests or in-process server stubs (e.g., InProcessServer) that lack a real socket address; misconfigured gRPC/Netty versions where the attribute is not set; health-probe or unix-socket style connections.
Related errors
- INTERNAL_SERVER_ERROR
- INTERNAL_SERVER_ERROR
- INTERNAL_SERVER_ERROR
- INTERNAL_SERVER_ERROR
- INTERNAL_SERVER_ERROR
AI-assisted analysis of pinpoint-apm/pinpoint@744c3d3075 (2026-09-07).
Data as JSON: /api/errors/68f63121ec7cd8e2.
Report an issue: GitHub.