I have set up the bind ip address in the config file.

From the redis-cli config get *, I saw two ip address set up.

213) "bind"

214) "x.x.x.x 127.0.0.1/"

But my python client still cant connect to it.

If I run redis-cli --protected-mode no , connection is okay so it is not firewall related.

Comment From: sundb

Is redis-server --protected-mode no? The protected mode is to avoid exposing redis directly to the internet, which would be dangerous, and you should connect to it via auth. ref: https://redis.io/docs/manual/security/

Comment From: cxb999

first run redis-server --protected-mode no Connect the redis service first, and use "client list" to confirm whether the IP is set correctly. Next, keep "protected mode yes",Set the "requirepass" to see if it can be connected. If it still doesn't work, try another port when starting the service.(or "telnet" to check the port)