quarkusio/quarkus · error · ConfigurationException

Unable to find redis host provider

Error message

Unable to find redis host provider

What it means

This is the null-name branch of findProvider: when no host-provider-name is configured but a provider lookup is still performed, it selects any RedisHostsProvider bean. If the container has no RedisHostsProvider bean at all, a ConfigurationException 'Unable to find redis host provider' is thrown.

Source

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

        tcp.fastOpen().ifPresent(net::setTcpFastOpen);
        tcp.quickAck().ifPresent(net::setTcpQuickAck);
        tcp.writeIdleTimeout().ifPresent(d -> net.setWriteIdleTimeout((int) d.toSeconds()));

        return net;
    }

    public static RedisHostsProvider findProvider(String name) {
        ArcContainer container = Arc.container();
        InjectableInstance<RedisHostsProvider> providers;
        if (name != null) {
            providers = container.select(RedisHostsProvider.class, Identifier.Literal.of(name));
            if (providers.isUnsatisfied()) {
                throw new ConfigurationException("Unable to find redis host provider identified with " + name);
            }
        } else {
            providers = container.select(RedisHostsProvider.class);
            if (providers.isUnsatisfied()) {
                throw new ConfigurationException("Unable to find redis host provider");
            }
        }

        return providers.get();
    }

    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;
            }
        }

View on GitHub (pinned to e1c734241f)

Solutions

  1. Configure quarkus.redis.hosts directly instead of relying on a provider.
  2. Register a RedisHostsProvider bean (@ApplicationScoped) if programmatic hosts are required.
  3. Check whether the provider bean was accidentally removed or excluded from bean discovery.

Example fix

// before
// no provider bean, no quarkus.redis.hosts

// after
quarkus.redis.hosts=redis://localhost:6379
// or:
@ApplicationScoped
public class DefaultHostsProvider implements RedisHostsProvider {
    public Collection<URI> getHosts() { return List.of(URI.create("redis://localhost:6379")); }
}
Defensive patterns

Strategy: validation

Validate before calling

if (Arc.container().select(RedisHostsProvider.class).isUnsatisfied()) {
    throw new IllegalStateException("No RedisHostsProvider bean registered; configure quarkus.redis.hosts instead");
}

Prevention

When it happens

Trigger: findProvider called with name == null while container.select(RedisHostsProvider.class) is unsatisfied (no RedisHostsProvider bean exists in the application).

Common situations: Code path (e.g. default hostsProvider() resolution) that consults a provider even when the application never registered one; removed or renamed provider class while configuration still expects programmatic host resolution.

Related errors


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