quarkusio/quarkus · error · IllegalStateException

Unable to find the TLS configuration " + config.tlsConfigura

Error message

Unable to find the TLS configuration " + config.tlsConfigurationName().get() + " for the Redis client " + name + ".

What it means

configureTLS() resolves the named TLS registry entry referenced by quarkus.redis.tls-configuration-name. If the TLS registry (TlsConfigurationRegistry) has no configuration registered under that name, an IllegalStateException is thrown at client creation. Quarkus fails fast because connecting with an undefined truststore/keystore configuration would be insecure or broken.

Source

Thrown at extensions/redis-client/runtime/src/main/java/io/quarkus/redis/runtime/client/VertxRedisClientFactory.java:267

    private static void configureTLS(String name, RedisClientConfig config, TlsConfigurationRegistry tlsRegistry,
            NetClientOptions net, List<URI> hosts) {
        TlsConfiguration configuration = null;
        boolean defaultTrustAll = false;

        boolean tlsFromHosts = false;
        for (URI uri : hosts) {
            if ("rediss".equals(uri.getScheme())) {
                tlsFromHosts = true;
                break;
            }
        }

        // Check if we have a named TLS configuration or a default configuration:
        if (config.tlsConfigurationName().isPresent()) {
            Optional<TlsConfiguration> maybeConfiguration = tlsRegistry.get(config.tlsConfigurationName().get());
            if (maybeConfiguration.isEmpty()) {
                throw new IllegalStateException("Unable to find the TLS configuration "
                        + config.tlsConfigurationName().get() + " for the Redis client " + name + ".");
            }
            configuration = maybeConfiguration.get();
        } else if (tlsRegistry.getDefault().isPresent() && (tlsRegistry.getDefault().get().isTrustAll())) {
            defaultTrustAll = tlsRegistry.getDefault().get().isTrustAll();
            if (defaultTrustAll) {
                LOGGER.warn("The default TLS configuration is set to trust all certificates. This is a security risk."
                        + "Please use a named TLS configuration for the Redis client " + name + " to avoid this warning.");
            }
        }

        if (configuration != null && !tlsFromHosts) {
            LOGGER.warnf("The Redis client %s is configured with a named TLS configuration but the hosts are not " +
                    "using the `rediss://` scheme - Disabling TLS", name);
        }

        // Apply the configuration
        if (configuration != null) {

View on GitHub (pinned to e1c734241f)

Solutions

  1. Define the named TLS configuration, e.g. quarkus.tls.<name>.trust-store=... so it is registered in the TLS registry.
  2. Fix the quarkus.redis.tls-configuration-name value to exactly match an existing TLS configuration name.
  3. Remove quarkus.redis.tls-configuration-name if you want default TLS handling instead.

Example fix

// before (application.properties)
quarkus.redis.tls-configuration-name=redis-tls

// after
quarkus.redis.tls-configuration-name=redis-tls
quarkus.tls.redis-tls.trust-store=classpath:redis-truststore.p12
quarkus.tls.redis-tls.trust-store-password=secret
Defensive patterns

Strategy: validation

Validate before calling

Optional<String> tlsName = config.getOptionalValue("quarkus.redis.tls-configuration-name", String.class);
if (tlsName.isPresent() && !TlsConfigSourceFactory.hasNamedConfig(tlsName.get())) {
    throw new IllegalStateException("Define quarkus.tls." + tlsName.get() + ".* properties");
}

Prevention

When it happens

Trigger: At startup in configureTLS (called from create) when config.tlsConfigurationName() is present but tlsRegistry.get(name) returns empty.

Common situations: quarkus.redis.tls-configuration-name referencing a name not defined via quarkus.tls.* properties; typo in the TLS config name; TLS registry build step not registering the named config (missing quarkus.tls.<name>.trust-store etc.).

Understand the failure class

Related errors


AI-assisted analysis of quarkusio/quarkus@e1c734241f (2026-09-05). Data as JSON: /api/errors/928a9aaaf0d6af35. Report an issue: GitHub.