[Solved] Redis Client On Error: Error: write ECONNABORTED Config right

Solve the redis client on error: error: write econnaborted config rightwe

Problem Description:
Solution:

1. First, check whether the firewall of Linux is turned on

Turn off the firewall

[root@localhost]# systemctl stop firewalld.service

Open 6379 port

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

2. Check whether the redis startup configuration is correct

Check whether redis is started

 ps -ef | grep redis

For versions above redis 3.2, Internet access is not allowed by default, and needs to be modified redis.conf configuration file

Modify peetected-mode

Modify peotected-mode yes
to: protected-mode no.
#The protected-mode parameter is used to disable access to redis from outside the network, if enabled, only the localhost ip (127.0.0.1) will be able to access Redis

Close bind 127.0.0.1

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

After modifying the configuration file, remember to restart redis,

./redis-server /usr/local/redis/redis.conf

Read More: