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
[[email protected]]# systemctl stop firewalld.service
- Open 6379 port number
[[email protected]]# sudo firewall-cmd --zone=public --add-port=6379/tcp --permanent
success
[[email protected]]# sudo firewall-cmd --reload
success
2. Check whether the redis startup configuration is correct
- Check whether redis is started
ps -ef | grep redis
The version above redis.3 is not allowed to access the Internet by default Conf configuration file
- Modify peetected mode
Modify peetected mode yes
Change to: protected mode No
#The protected mode parameter is used to prohibit Internet access to redis. If enabled, redis can only be accessed 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 access to all IP addresses
After modifying the configuration file, remember to restart redis,
./redis-server /usr/local/redis/redis.conf