I'm running a Redis instance as standalone server with the config as follow:
#bind option is commented
protected-mode no
port 6379
timeout 0
supervised no
The problem is the instance is running normally but passed some time it just hung out and don't let establish any incoming connection rather than localhost. When I check the logs I see this:
* SLAVE OF 45.148.122.184:39844 enabled (user request from 'id=214 addr=45.148.122.184:32324 fd=30 name= age=0 idle=0 flags=N db=0 sub=0 psub=0 multi=-1 qbuf=0 qbuf-free=32768 obl=0 oll=0 omem=0 events=r cmd=slaveof')
* Connecting to MASTER 45.148.122.184:39844
# Unable to connect to MASTER: Permission denied
* Connecting to MASTER 45.148.122.184:39844
# Unable to connect to MASTER: Permission denied
* Connecting to MASTER 45.148.122.184:39844
# Unable to connect to MASTER: Permission denied
In the config I'm not setting any slave or master server. even this cluster option is disabled. I don't recognize the IP address either.
Every time I restart the service it runs well and after a few hours the same happens. the sentinel service is disabled and not running.
What can I do to solve this? Is this a configuration issue?
Thanks in advance!
Seems like your Redis host has external IP and accessible to everyone on the internet and someone spotted it and uses slaveof has to spoil your server accidentally or intentionally.
I recommend you at least set up authentication or/and restrict access to your Redis host with a firewall.