{"record":{"id":"c87d301a67a3f63a","repo":"quarkusio/quarkus","slug":"unable-import-data-into-redis-cannot-find-the-re","errorCode":null,"errorMessage":"Unable import data into Redis - cannot find the Redis client <name>, available clients are: <clients.keySet()>","messagePattern":"Unable import data into Redis - cannot find the Redis client <name>, available clients are: <clients\\.keySet\\(\\)>","errorType":"exception","errorClass":"IllegalArgumentException","httpStatus":null,"severity":"error","filePath":"extensions/redis-client/runtime/src/main/java/io/quarkus/redis/runtime/client/RedisClientRecorder.java","lineNumber":218,"sourceCode":"    }\n\n    public void cleanup(ShutdownContext context) {\n        context.addShutdownTask(new Runnable() {\n            @Override\n            public void run() {\n                for (RedisClientAndApi value : clients.values()) {\n                    value.redis.close();\n                }\n                clients.clear();\n                dataSources.clear();\n            }\n        });\n    }\n\n    public void preload(String name, List<String> loadScriptPaths, boolean redisFlushBeforeLoad, boolean redisLoadOnlyIfEmpty) {\n        var tuple = clients.get(name);\n        if (tuple == null) {\n            throw new IllegalArgumentException(\"Unable import data into Redis - cannot find the Redis client \" + name\n                    + \", available clients are: \" + clients.keySet());\n        }\n\n        if (redisFlushBeforeLoad) {\n            tuple.redis.send(Request.cmd(Command.FLUSHALL)).await().indefinitely();\n        } else if (redisLoadOnlyIfEmpty) {\n            var list = tuple.redis.send(Request.cmd(Command.KEYS).arg(\"*\")).await().indefinitely();\n            if (list.size() != 0) {\n                RedisDataLoader.LOGGER.debugf(\n                        \"Skipping the Redis data loading because the database is not empty: %d keys found\", list.size());\n                return;\n            }\n        }\n\n        for (String path : loadScriptPaths) {\n            RedisDataLoader.load(vertx, tuple.redis, path);\n        }\n    }","sourceCodeStart":200,"sourceCodeEnd":236,"githubUrl":"https://github.com/quarkusio/quarkus/blob/e1c734241f34c7919086ceb4c9262b4a58f6de44/extensions/redis-client/runtime/src/main/java/io/quarkus/redis/runtime/client/RedisClientRecorder.java#L200-L236","documentation":"The RedisClientRecorder.preload method imports data into a named Redis client at startup, but the requested client name is not present in the map of configured clients. Quarkus throws IllegalArgumentException listing the clients that actually exist so you can spot the name mismatch.","triggerScenarios":"quarkus.redis.load-script or flush/load configuration referencing a client name that does not match any configured client; using the default client configuration while the preload is registered under a named client (or vice versa); renaming quarkus.redis.<name> keys without updating the load config.","commonSituations":"Dev-services or test data loading configured for a named client that was never defined; typos in quarkus.redis.<name> vs the load-script client reference; multiple Redis clients configured and the wrong one named in the import settings.","solutions":["Align the client name in the preload/import configuration with an existing quarkus.redis.<name> key — the error message lists the valid names","If you meant the default client, remove the name qualifier (use quarkus.redis.* config, not quarkus.redis.<name>.*)","Check the available clients in the message and correct the typo","Define the missing client configuration if it was intentionally expected"],"exampleFix":"// before\nquarkus.redis.load-script=import.redis\nquarkus.redis.cache.load-script=import.redis # 'cache' client not defined\n# after\nquarkus.redis.load-script=import.redis # use default client\n# or define the client:\nquarkus.redis.cache.hosts=localhost:6379","handlingStrategy":"validation","validationCode":"Set<String> configured = Map.of(\"default\", true).keySet(); // from your application.properties\nString name = \"cache\";\nif (!configured.contains(name)) {\n    throw new IllegalArgumentException(\"Redis client '\" + name + \"' is not configured; define quarkus.redis.\" + name + \".*\");\n}","typeGuard":null,"tryCatchPattern":"try {\n    recorder.preload(name, scripts, flush, onlyIfEmpty);\n} catch (IllegalArgumentException e) {\n    throw new IllegalStateException(\"Redis preload misconfiguration: \" + e.getMessage(), e);\n}","preventionTips":["Keep client names in application.properties and preload config in sync","Copy-paste the exact client name from the error's available-clients list","Prefer the default (unqualified) client unless you explicitly need named clients"],"tags":["redis","configuration","client-name","startup"],"backgroundTag":"unknown-redis-client-name","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"}