grpc/grpc-java · error · UnsupportedOperationException
TLS not supported in InProcessServer
Error message
TLS not supported in InProcessServer
What it means
InProcessServer is an in-JVM gRPC transport with no real network, so transport security (TLS) is meaningless and unsupported. useTransportSecurity() is overridden to immediately throw UnsupportedOperationException instead of silently accepting credentials that would have no effect.
Source
Thrown at inprocess/src/main/java/io/grpc/inprocess/InProcessServerBuilder.java:209
* @return this
* @throws IllegalArgumentException if bytes is non-positive
* @since 1.17.0
*/
@Override
public InProcessServerBuilder maxInboundMetadataSize(int bytes) {
Preconditions.checkArgument(bytes > 0, "maxInboundMetadataSize must be > 0");
this.maxInboundMetadataSize = bytes;
return this;
}
InProcessServer buildTransportServers(
List<? extends ServerStreamTracer.Factory> streamTracerFactories) {
return new InProcessServer(this, streamTracerFactories);
}
@Override
public InProcessServerBuilder useTransportSecurity(File certChain, File privateKey) {
throw new UnsupportedOperationException("TLS not supported in InProcessServer");
}
void setStatsEnabled(boolean value) {
this.serverImplBuilder.setStatsEnabled(value);
}
}
View on GitHub (pinned to 64daddc1f3)
Solutions
- Remove the useTransportSecurity call — in-process traffic never leaves the JVM and needs no TLS
- Use InProcessChannelBuilder/InProcessServerBuilder defaults with no credentials
- If TLS is required, switch to a real transport such as NettyChannelBuilder/NettyServerBuilder
- Gate TLS setup behind a check that the builder is not the in-process one
Example fix
// before
InProcessServerBuilder.forName("svc").useTransportSecurity(new File("cert.pem"), new File("key.pem"));
// after
InProcessServerBuilder.forName("svc").directExecutor().build(); Defensive patterns
Strategy: validation
Validate before calling
if (builder instanceof InProcessServerBuilder) { /* skip TLS setup */ } Type guard
boolean supportsTls(Object b) { return !(b instanceof InProcessServerBuilder); } Try / catch
try { b.useTransportSecurity(cert, key); } catch (UnsupportedOperationException e) { log.info("TLS unsupported for this transport; continuing insecure"); } Prevention
- Never apply transport-level security to in-process servers
- Share server config code with a transport-aware abstraction
- Treat in-process channels as trusted loopback
When it happens
Trigger: Calling InProcessServerBuilder.useTransportSecurity(File certChain, File privateKey) (or the String variants) when building an in-process server.
Common situations: Copy-pasting a builder setup from a Netty/sharded server to an in-process test server; trying to 'secure' an in-process channel; generic server-building code that unconditionally enables TLS.
Understand the failure class
Background: UnsupportedOperationException and "is not supported" errors: when a library deliberately refuses a call — this error's family across 30 libraries.
- SSL/TLS and certificate errors — how TLS handshakes and certificate validation fail.
Related errors
- Can't set TLS settings for ALTS
- TLS not supported in BinderServer
- This method is deprecated and marked for removal. Use the ge
- TLS not supported in ServerImplBuilder
- decrypt is not supported.
AI-assisted analysis of grpc/grpc-java@64daddc1f3 (2026-09-08).
Data as JSON: /api/errors/b7f4d406bdf1d13b.
Report an issue: GitHub.