When we set up redis master-slave replication, we may encounter the following problems due to various problems:
error condition on socket for Sync: no route to host
Solution:
First, modify the related configurations in redis.conf:
#Original configuration
bind 127.0.0.1
#Modify to
bind 0.0.0.0
# Although it is said that commenting it out can also solve the above problem, it is not recommended to comment out this method. Because another problem will occur.
#or comment it out
#bind 127.0.0.1
Turn off the firewall of the host. Note: it is the firewall of the host, and then restart the service.
In CentOS 7, systemctl stop firewalld turns off the firewall. Other versions can turn off the firewall through service iptables stop.
Turn off the firewall:
systemctl stop firewalld
Turn off redis service
ps -ef |grep -i redis # Find a process
kill -9 3667 #Shut down the process
Restart related services
Read More:
- Redis Startup Error: Creating Server TCP listening socket 127.0.0.1:6379: bind: No error
- [Solved] Jedis connect and operate Redis error: Failed to create socket和connect timed out
- [Solved] Windows Redis Error: Could not create server TCP listening socket 127.0.0.1:6379: bind…
- Redis Stand-alone Builds a Master-slave Copy Error [How to Solve]
- [Solved] Redis Client On Error: Error: write ECONNABORTED Config right
- Redis: DENIED Redis is running in protected mode [How to Solve]
- [Solved] Redis Error: org.springframework.data.redis.RedisConnectionFailureExceptionjava.net.SocketTimeoutException
- Failed to restart redis-server.service Unit not found [How to Solve]
- Solution to the problem of using Alibaba gateway but unable to route successfully
- [Solved] Error processing condition on org.springframework.boot.autoconfigure.context.PropertyPlaceholderA
- Using Post no Body Error: socket hang up [How to Solve]
- [Errno 14] PYCURL ERROR 7 – “couldn’t connect to host”
- Error processing condition on org.springframework.boot.autoconfigure.context.PropertyPlaceholderAuto
- [Solved] java.lang.IllegalAccessError: class org.springframework.data.redis.core.$ Proxy237 cannot access its superinterface org.springframework.data.redis.core.RedisConnectionUtils$RedisConnectionProxy
- [Solved] Project Startup Error: Redis health check failed:Unable to connect to localhost6379
- [Solved] Project Startup Error: Redis health check failed: Unable to connect to localhost6379
- [Solved] Redis Client On Error Error connect ECONNREFUSED 11.20.200.6379 Config right
- Java.sql.sqlexception: unable to read more data from socket
- [Solved] Springboot uses redis to add LocaldateTime Java 8 error
- [Solved] Redis error: NOAUTH Authentication required.