dahomey-technologies / rustis

An asynchronous Redis client for Rust

Home Page:https://docs.rs/rustis

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Client("Disconnected by peer")

eoghanriley opened this issue · comments

commented

When trying to connect to upstash redis I get an error on Client::connect(upstash_url) which says Client("Disconnected by peer"). When running with RUST_BACKTRACE=1 I don't get any additional information. I have tokio-tls enabled as a feature flag however, using tokio-runtime returns the same error. I have made sure redis is up by connecting to it through redis-cli.

Hi @eoghanriley,

I just tested it (with TLS) and it worked for me.
Usually, when you get Client("Disconnected by peer") it's because you did not specify the client to connect with TLS.

Be sure to use rediss instead of redis in the URI:

let mut client = Client::connect("rediss://:<password>@<sub_domain>.upstash.io:<port>").await?;

Please, let me know if it helps you !

commented

This fixed it ty!