{"record":{"id":"627103704285ab94","repo":"quarkusio/quarkus","slug":"grpc-client-name-cannot-use-both-domain-socke","errorCode":null,"errorMessage":"gRPC client '${name}' cannot use both domain-socket and Stork name resolver","messagePattern":"gRPC client '(.+?)' cannot use both domain-socket and Stork name resolver","errorType":"validation","errorClass":"IllegalArgumentException","httpStatus":null,"severity":"error","filePath":"extensions/grpc/runtime/src/main/java/io/quarkus/grpc/runtime/supports/Channels.java","lineNumber":120,"sourceCode":"                boolean clientUsesTls = clientConfig.tlsConfigurationName().isPresent() || clientConfig.tls().enabled()\n                        || (clientConfig.plainText().isPresent() && !clientConfig.plainText().get());\n                ValueRegistry valueRegistry = container.instance(ValueRegistry.class).get();\n                HttpServer httpServer = valueRegistry.get(HttpServer.HTTP_SERVER);\n                int actualPort = clientUsesTls ? httpServer.getSecurePort() : httpServer.getPort();\n                if (actualPort > 0) {\n                    port = actualPort;\n                } else {\n                    port = clientUsesTls ? 8444 : 8081;\n                }\n            }\n        }\n\n        String nameResolver = clientConfig.nameResolver();\n\n        boolean stork = Stork.STORK.equalsIgnoreCase(nameResolver);\n        boolean useDomainSocket = clientConfig.domainSocket().isPresent();\n        if (useDomainSocket && stork) {\n            throw new IllegalArgumentException(\n                    \"gRPC client '\" + name + \"' cannot use both domain-socket and Stork name resolver\");\n        }\n\n        String[] resolverSplit = nameResolver.split(\":\");\n        String resolver = resolverSplit[0];\n\n        // Client-side interceptors\n        GrpcClientInterceptorContainer interceptorContainer = container\n                .instance(GrpcClientInterceptorContainer.class).get();\n        if (stork) {\n            perClientInterceptors = new HashSet<>(perClientInterceptors);\n            perClientInterceptors.add(VertxStorkMeasuringGrpcInterceptor.class.getName());\n        }\n\n        @SuppressWarnings(\"rawtypes\")\n        List<ChannelBuilderCustomizer> channelBuilderCustomizers = container\n                .select(ChannelBuilderCustomizer.class, Any.Literal.INSTANCE)\n                .stream()","sourceCodeStart":102,"sourceCodeEnd":138,"githubUrl":"https://github.com/quarkusio/quarkus/blob/e1c734241f34c7919086ceb4c9262b4a58f6de44/extensions/grpc/runtime/src/main/java/io/quarkus/grpc/runtime/supports/Channels.java#L102-L138","documentation":"Quarkus gRPC channels can target a Unix domain socket or use the Stork name resolver, but not both: Stork returns network service instances (host:port) while a domain-socket configuration pins the channel to a local Unix socket path. Channels.createChannel validates the combination up front and throws IllegalArgumentException when both domain-socket and name-resolver=stork are configured.","triggerScenarios":"quarkus.grpc.clients.<name>.domain-socket=<path> is set together with quarkus.grpc.clients.<name>.name-resolver=stork for the same client, so useDomainSocket && stork is true during channel creation.","commonSituations":"Copy-pasting a domain-socket config from a local-dev profile into a profile that also enables Stork service discovery; profiles (e.g. %prod stork, %dev domain-socket) merged so both keys end up active.","solutions":["Remove the quarkus.grpc.clients.<name>.domain-socket property when using Stork service discovery.","Or remove name-resolver=stork for that client if it must communicate over a Unix domain socket.","Check active Maven/Quarkus profiles so %dev (domain socket) and %prod (stork) settings don't collide.","Use Stork for discovery in remote environments and configure the domain socket only in local dev."],"exampleFix":"// before\nquarkus.grpc.clients.hello.domain-socket=/var/run/app.sock\nquarkus.grpc.clients.hello.name-resolver=stork\n\n// after\nquarkus.grpc.clients.hello.name-resolver=stork\n# domain-socket removed","handlingStrategy":"validation","validationCode":"// validate client config before startup\nString socket = config.getOptionalValue(\"quarkus.grpc.clients.hello.domain-socket\", String.class).orElse(null);\nString resolver = config.getOptionalValue(\"quarkus.grpc.clients.hello.name-resolver\", String.class).orElse(\"\");\nif (socket != null && \"stork\".equalsIgnoreCase(resolver)) {\n    throw new IllegalStateException(\"Client 'hello': drop domain-socket or name-resolver=stork\");\n}","typeGuard":null,"tryCatchPattern":"try {\n    channel = Channels.createChannel(\"hello\", interceptors);\n} catch (IllegalArgumentException e) {\n    if (e.getMessage() != null && e.getMessage().contains(\"domain-socket and Stork\")) {\n        throw new ConfigurationException(\"Remove either domain-socket or name-resolver=stork for client 'hello'\", e);\n    }\n    throw e;\n}","preventionTips":["Scope domain-socket config to the %dev profile and Stork config to %prod.","Document per-profile transport choices for each gRPC client.","Add config validation in a startup observer for mixed profiles."],"tags":["grpc","stork","configuration","unix-domain-socket"],"backgroundTag":"mutually-exclusive-config","analyzedSha":"e1c734241f34c7919086ceb4c9262b4a58f6de44","analyzedAt":"2026-09-05T17:01:29.979Z","contentChangedAt":"2026-09-05T17:01:29.979Z","schemaVersion":2},"datasetVersion":"2026-09-12T22:17:10.623Z"}