[Fixed]-Protocol error, got "H" as reply type byte

4👍

Is there any chance you did not have a redis server running on your machine when running your django server? On a mac I did brew install redis and then redis-server and then ran my django server on another terminal window and all worked fine.

6👍

In my case I used Nginx to forward the Redis request, which caused a problem in the protocol to access Redis. Therefore, I shut down the forwarding of Nginx and used rinetd to forward this request, so as to check whether the last communication protocol between your application and Redis is correct

2👍

To connect to the server with TSL certificate you need to tell redis that this certificate exists in the way of the connection. This should work for all proxy like nginx and traefik.

redis-cli -u redis://redis.example.com:6379 --tls

then depending on the certificate type and if the certificate is in your store you might need to authenticate your client to verify the certificate for you during the connection.

The easiest way to do this is to provide --sni {DNS ADDRESS} parameter, or to be safe you can pass the whole certificate via --cert or --cacert depending on your configuration

Full connection string

redis-cli -u redis://redis.example.com:6379 --tls --sni redis.example.com

0👍

had the same issue, I used the wrong port for the REDIS connection.

I gave it the MySql port (which is available and listening) so it’s not showing like a failure connect but as a protocol error.

👤Nir

Leave a comment