i setted redis.conf for 2 difference server.

masterpath "pass"
requirepass "pass"
protected-mode "no"
bind 0.0.0.0

and started 1 redis-sentinel.

and then try to connect sentinel, and it shows warning message

DENIED Redis is running in protected mode because protected mode is enabled, no bind address was specified, no authentication password is requested to clients. In this mode connections are only accepted from the loopback interface. If you want to connect from external computers to Redis you may adopt one of the following solutions: 1) Just disable protected mode sending the command 'CONFIG SET protected-mode no' from the loopback interface by connecting to Redis from the same host the server is running, however MAKE SURE Redis is not publicly accessible from internet if you do so. Use CONFIG REWRITE to make this change permanent. 2) Alternatively you can just disable the protected mode by editing the Redis configuration file, and setting the protected mode option to 'no', and then restarting the server. 3) If you started the server manually just for testing, restart it with the '--protected-mode no' option. 4) Setup a bind address or an authentication password. NOTE: You only need to do one of the above things in order for the server to start accepting connections from the outside.

i already tested all situdations but shows same always.

are there any missed point ?

Comment From: nocode99

I tried first just the redis.conf, but it seems it needs to be in your redis-sentinel.conf. It could be my implementation as I'm calling sentinel via a python script.

Comment From: Axxiss

Related https://github.com/antirez/redis/issues/3279#issuecomment-230485169

Comment From: arshadolx

redis-server --protected-mode no

Comment From: zwj6

Maybe you did't use the config. You can bring the config(redis.conf)

./redis-server redis.conf

Comment From: sasha-id

masterauth not ~~masterpath~~

Comment From: kushan-gunasekera

redis-server --protected-mode no

yes it works, thank you!

Comment From: yzhao66

redis-server --protected-mode no When i restart my linux,it's still on "protected mode" status.How to resolve it ?

Comment From: trevor211

redis-server --protected-mode no When i restart my linux,it's still on "protected mode" status.How to resolve it ?

Try to rewrite your config.

Comment From: oranagra

closing this issue (seems that there's no problem other than a missing line in the right config file). please open a new issue if needed.

Comment From: kanumuruwe45

redis-server --protected-mode no

Use the above command while starting the redis server

Comment From: hanzohan

redis-server --protected-mode no

Using this while accessing redis inside alibaba cloud ECS and it works. Dont forget to open redis port

Comment From: bensialih

Hey all,

as part of /opt/bitnami/scripts/redis-env.sh in the bitnami docker image, you can override REDIS_OVERRIDES_FILE env var. protected-mode no can be set to no

hope this helps

Screenshot from 2022-06-13 10-07-45 . Screenshot from 2022-06-13 10-06-29

alternatively as stated above REDIS_EXTRA_FLAGS=--protected-mode no is always an obvious solution

Comment From: mehulmina064

Redis Reinstallation Process

  1. Remove the Existing Redis Installation Run the following command to completely remove Redis along with its dependencies:

bash sudo apt-get purge --auto-remove redis-server redis

  1. Terminate All Redis Processes Use the command below to list and kill all Redis processes:

bash ps aux | grep redis

  1. Configure the Bind Address Edit the Redis configuration file to specify the IP addresses you want Redis to listen on:

bash sudo nano /etc/redis/redis.conf

Add the following lines, replacing 127.0.0.1 and 0.0.0.0 with your actual IP addresses:

plaintext bind 127.0.0.1 bind 0.0.0.0

  1. Install Redis Tools To install additional Redis tools, run:

bash sudo apt install redis-tools

  1. Restart the Redis Service Finally, restart the Redis service to apply the changes:

bash sudo systemctl restart redis

This should help clarify the steps involved in the Redis reinstallation process!