{"record":{"id":"adc0ac0a1fcb5cbe","repo":"quarkusio/quarkus","slug":"unable-to-find-redis-host-provider","errorCode":null,"errorMessage":"Unable to find redis host provider","messagePattern":"Unable to find redis host provider","errorType":"exception","errorClass":"ConfigurationException","httpStatus":null,"severity":"error","filePath":"extensions/redis-client/runtime/src/main/java/io/quarkus/redis/runtime/client/VertxRedisClientFactory.java","lineNumber":243,"sourceCode":"        tcp.fastOpen().ifPresent(net::setTcpFastOpen);\n        tcp.quickAck().ifPresent(net::setTcpQuickAck);\n        tcp.writeIdleTimeout().ifPresent(d -> net.setWriteIdleTimeout((int) d.toSeconds()));\n\n        return net;\n    }\n\n    public static RedisHostsProvider findProvider(String name) {\n        ArcContainer container = Arc.container();\n        InjectableInstance<RedisHostsProvider> providers;\n        if (name != null) {\n            providers = container.select(RedisHostsProvider.class, Identifier.Literal.of(name));\n            if (providers.isUnsatisfied()) {\n                throw new ConfigurationException(\"Unable to find redis host provider identified with \" + name);\n            }\n        } else {\n            providers = container.select(RedisHostsProvider.class);\n            if (providers.isUnsatisfied()) {\n                throw new ConfigurationException(\"Unable to find redis host provider\");\n            }\n        }\n\n        return providers.get();\n    }\n\n    private static void configureTLS(String name, RedisClientConfig config, TlsConfigurationRegistry tlsRegistry,\n            NetClientOptions net, List<URI> hosts) {\n        TlsConfiguration configuration = null;\n        boolean defaultTrustAll = false;\n\n        boolean tlsFromHosts = false;\n        for (URI uri : hosts) {\n            if (\"rediss\".equals(uri.getScheme())) {\n                tlsFromHosts = true;\n                break;\n            }\n        }","sourceCodeStart":225,"sourceCodeEnd":261,"githubUrl":"https://github.com/quarkusio/quarkus/blob/e1c734241f34c7919086ceb4c9262b4a58f6de44/extensions/redis-client/runtime/src/main/java/io/quarkus/redis/runtime/client/VertxRedisClientFactory.java#L225-L261","documentation":"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.","triggerScenarios":"findProvider called with name == null while container.select(RedisHostsProvider.class) is unsatisfied (no RedisHostsProvider bean exists in the application).","commonSituations":"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.","solutions":["Configure quarkus.redis.hosts directly instead of relying on a provider.","Register a RedisHostsProvider bean (@ApplicationScoped) if programmatic hosts are required.","Check whether the provider bean was accidentally removed or excluded from bean discovery."],"exampleFix":"// before\n// no provider bean, no quarkus.redis.hosts\n\n// after\nquarkus.redis.hosts=redis://localhost:6379\n// or:\n@ApplicationScoped\npublic class DefaultHostsProvider implements RedisHostsProvider {\n    public Collection<URI> getHosts() { return List.of(URI.create(\"redis://localhost:6379\")); }\n}","handlingStrategy":"validation","validationCode":"if (Arc.container().select(RedisHostsProvider.class).isUnsatisfied()) {\n    throw new IllegalStateException(\"No RedisHostsProvider bean registered; configure quarkus.redis.hosts instead\");\n}","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Prefer explicit quarkus.redis.hosts configuration over implicit provider lookup.","If programmatic hosts are needed, register exactly one RedisHostsProvider bean.","Review bean-discovery exclusions in beans.xml when refactoring provider classes."],"tags":["redis","quarkus","cdi","configuration"],"backgroundTag":"missing-cdi-bean","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"}