{"record":{"id":"b98d8f67ee94768e","repo":"quarkusio/quarkus","slug":"unable-to-find-the-tls-configuration-tlsconfigur","errorCode":null,"errorMessage":"Unable to find the TLS configuration ${tlsConfigurationName} for the gRPC client ${name}.","messagePattern":"Unable to find the TLS configuration (.+?) for the gRPC client (.+?)\\.","errorType":"exception","errorClass":"IllegalStateException","httpStatus":null,"severity":"error","filePath":"extensions/grpc/runtime/src/main/java/io/quarkus/grpc/runtime/supports/Channels.java","lineNumber":174,"sourceCode":"        GrpcClientOptions clientOptions = new GrpcClientOptions()\n                .setMaxMessageSize(clientConfig.maxInboundMessageSize().orElse(DEFAULT_MAX_MESSAGE_SIZE));\n\n        for (ChannelBuilderCustomizer customizer : channelBuilderCustomizers) {\n            customizer.customize(name, clientConfig, clientOptions);\n        }\n\n        if (!plainText) {\n            TlsConfigurationRegistry registry = Arc.container().select(TlsConfigurationRegistry.class).get();\n\n            // always set ssl + alpn for plain-text=false\n            options.setSsl(true);\n            options.setUseAlpn(true);\n\n            TlsConfiguration configuration = null;\n            if (clientConfig.tlsConfigurationName().isPresent()) {\n                Optional<TlsConfiguration> maybeConfiguration = registry.get(clientConfig.tlsConfigurationName().get());\n                if (!maybeConfiguration.isPresent()) {\n                    throw new IllegalStateException(\"Unable to find the TLS configuration \"\n                            + clientConfig.tlsConfigurationName().get() + \" for the gRPC client \" + name + \".\");\n                }\n                configuration = maybeConfiguration.get();\n            } else if (registry.getDefault().isPresent() && (registry.getDefault().get().getTrustStoreOptions() != null\n                    || registry.getDefault().get().isTrustAll())) {\n                configuration = registry.getDefault().get();\n            }\n\n            if (configuration != null) {\n                TlsConfigUtils.configure(options, configuration);\n            } else if (clientConfig.tls().enabled()) {\n                GrpcClientConfiguration.TlsClientConfig tls = clientConfig.tls();\n                options.setSsl(true).setTrustAll(tls.trustAll());\n\n                configurePemTrustOptions(options, tls.trustCertificatePem());\n                configureJksTrustOptions(options, tls.trustCertificateJks());\n                configurePfxTrustOptions(options, tls.trustCertificateP12());\n","sourceCodeStart":156,"sourceCodeEnd":192,"githubUrl":"https://github.com/quarkusio/quarkus/blob/e1c734241f34c7919086ceb4c9262b4a58f6de44/extensions/grpc/runtime/src/main/java/io/quarkus/grpc/runtime/supports/Channels.java#L156-L192","documentation":"gRPC clients can reference a named TLS registry configuration via quarkus.grpc.clients.<name>.tls-configuration-name. Channels.createChannel looks the name up in the TlsConfigurationRegistry; if the registry contains no configuration with that name, channel creation aborts with IllegalStateException naming the missing TLS config and the client.","triggerScenarios":"quarkus.grpc.clients.<name>.tls-configuration-name=myTls is set but no matching quarkus.tls.key-store/cert-store... myTls.* configuration block exists (or the TLS registry extension that defines it is missing) when the channel is created.","commonSituations":"Typo in the tls-configuration-name value; defining the TLS config only for another profile; forgetting to add the quarkus-tls-registry dependency or the keystore files not packaged; renaming the TLS config without updating client references.","solutions":["Define the named TLS configuration, e.g. quarkus.tls.myTls.key-store.p12.path=... / quarkus.tls.myTls.trust-store.... matching the referenced name exactly.","Fix typos in quarkus.grpc.clients.<name>.tls-configuration-name.","Ensure the TLS registry dependency (io.quarkus:quarkus-tls-registry) and any keystore provider dependencies are present.","Verify keystore/truststore files exist on the runtime classpath or at the configured filesystem path."],"exampleFix":"// before\nquarkus.grpc.clients.hello.tls-configuration-name=myTls\n# no quarkus.tls.myTls.* defined\n\n// after\nquarkus.grpc.clients.hello.tls-configuration-name=myTls\nquarkus.tls.myTls.key-store.p12.path=certs/client.p12\nquarkus.tls.myTls.key-store.p12.password=secret\nquarkus.tls.myTls.trust-store.pem.paths=certs/ca.pem","handlingStrategy":"validation","validationCode":"// resolve the named TLS config before creating the channel\nString tlsName = config.getValue(\"quarkus.grpc.clients.hello.tls-configuration-name\", String.class);\nboolean defined = ConfigProvider.getConfig().getPropertyNames().stream()\n    .anyMatch(p -> p.startsWith(\"quarkus.tls.\" + tlsName + \".\"));\nif (!defined) {\n    throw new IllegalStateException(\"TLS config '\" + tlsName + \"' is not defined (quarkus.tls.\" + tlsName + \".*)\");\n}","typeGuard":null,"tryCatchPattern":"try {\n    channel = Channels.createChannel(\"hello\", interceptors);\n} catch (IllegalStateException e) {\n    if (e.getMessage() != null && e.getMessage().contains(\"Unable to find the TLS configuration\")) {\n        throw new ConfigurationException(\"Define quarkus.tls.<name>.* for the referenced tls-configuration-name\", e);\n    }\n    throw e;\n}","preventionTips":["Keep TLS config names in a constants class referenced by both the tls.* block and clients.","Add the quarkus-tls-registry extension and keystore files to the deployment checklist.","Verify TLS configs resolve in a startup health check across all profiles."],"tags":["grpc","tls","configuration","quarkus"],"backgroundTag":"missing-tls-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"}