Redis Client On Error: Error: write ECONNABORTED Config right

created at 02-05-2022 views: 39

solution

1.First check whether the Linux firewall is enabled

turn off firewall

[root@localhost]# systemctl stop firewalld.service

open port 6379

[root@localhost]# sudo firewall-cmd --zone=public --add-port=6379/tcp --permanent
success
[root@localhost]# sudo firewall-cmd --reload
success

2.Check whether the startup configuration of redis is correct

Check if redis is started

 ps -ef | grep redis

If the version above redis 3.2 is not allowed to access the external network by default, you need to modify the redis.conf configuration file

Modify peotected-mode

# change
peotected-mode yes
# to:
protected-mode no.

The protected-mode parameter is to prohibit access to redis from the external network. If enabled, you can only access Redis through localhost ip (127.0.0.1)

close bind 127.0.0.1

Comment out bind 127.0.0.1, or modify bind 0.0.0.0 to allow all ip addresses to access

Remember to restart redis after modifying the configuration file.

./redis-server /usr/local/redis/redis.conf
created at:02-05-2022
edited at: 02-05-2022: