-
Notifications
You must be signed in to change notification settings - Fork 186
Open
Labels
A-redisArea: Redis / deadpool-redisArea: Redis / deadpool-redisdocumentationImprovements or additions to documentationImprovements or additions to documentation
Description
🐛 Bug Report
Description
When attempting to connect to a Redis server over TLS, I encounter the following error:
Error: Config: Redis: can't connect with TLS, the feature is not enabled - InvalidClientConfig
This occurs despite enabling the tokio-native-tls-comp feature in redis and using deadpool-redis.
🔧 Reproduction Steps
- Add dependencies:
# Cargo.toml
redis = { version = "0.32.0", features = ["tokio-native-tls-comp"] }
deadpool-redis = "0.21.1"
rustls = { version = "0.23" }- Initialize rustls and try to connect:
rustls::crypto::ring::default_provider()
.install_default()
.expect("Failed to install rustls crypto provider");
debug!("redis url: {}", settings.database.redis_url);
let cfg = Config::from_url(&settings.database.redis_url);
let pool = cfg.create_pool(Some(deadpool_redis::Runtime::Tokio1))?;- Use a Redis URL with TLS:
rediss://your-hostname:port
- ✅ The connection succeeds without TLS (i.e., using a redis://)
⚠️ Expected Behavior
Should connect to Redis using TLS successfully.
💡 Actual Behavior
Fails with the following error:
Error: Config: Redis: can't connect with TLS, the feature is not enabled - InvalidClientConfig
🙏 Request
- Is
tokio-native-tls-compsufficient for enabling TLS support? - Does
deadpool-redissupport TLS connections through this configuration? - If not, what is the correct way to enable Redis TLS support with
deadpool-redis?
Thank you!
Metadata
Metadata
Assignees
Labels
A-redisArea: Redis / deadpool-redisArea: Redis / deadpool-redisdocumentationImprovements or additions to documentationImprovements or additions to documentation