Premise: connect Huawei ECS purchased by individuals on the xshell platform, install redis, and build a master-slave replication architecture on a single machine
Problem: after the setup is completed, start the slave node. The slave node Ping the master node succeeds, but the master status is displayed as down, and the background log prompts that the connection times out. As shown below:
Solution:
1. Check the configuration of the slave node: is replicaof correct.
It should be configured as the IP of Linux and the redis port of the master node
2. Check whether the master node is configured with a password. If so, the slave node also needs to be configured with a password
3. Check whether the Ping configuration of the primary node configures a single non own IP. If so, comment it out or change it to 0.0.0.0
4. Check whether the firewall is on. There are two types of firewalls
1. Iptables firewall
View firewall service iptables status
If this firewall is not installed, the query will fail.
Stop firewall service iptables stop
Turn on the firewall service iptables start
service iptables restart service iptables restart
Permanently turn off the firewall chkconfig iptables off
Restart firewall after permanent shutdown chkconfig iptables on
2.Firewall firewall
View firewall service status systemctl status firewalld
Turn off firewall service firewalld stop
View firewall rules firewall-cmd --list-all
Permanently open 80 ports firewall-cmd --permanent --add-port=80/tcp
service iptables restart firewall-cmd --reload
(restart after modifying firewall configuration)
4. After I tried the above, I still reported the same error. Finally, I found that the IP configuration of my slave node replicaof was wrong. I mistakenly thought that the IP connected to xshell was the Linux IP I should configure. Who knows, I actually need to use my local IP 127.0.0.1
Read More:
- Redis: DENIED Redis is running in protected mode [How to Solve]
- [Solved] Redis Error: org.springframework.data.redis.RedisConnectionFailureExceptionjava.net.SocketTimeoutException
- [Solved] Redis Error: Error condition on socket for SYNC: No route to host
- Springcloud builds a gateway and starts Error [Solved]
- [Solved] Redis Client On Error: Error: write ECONNABORTED Config right
- [Solved] java.lang.IllegalAccessError: class org.springframework.data.redis.core.$ Proxy237 cannot access its superinterface org.springframework.data.redis.core.RedisConnectionUtils$RedisConnectionProxy
- [Solved] Redis error: NOAUTH Authentication required.
- Failed to restart redis-server.service Unit not found [How to Solve]
- JAVA Connect Redis Error: stop-writes-on-bgsave-error option
- [Solved] Redis Client On Error Error connect ECONNREFUSED 11.20.200.6379 Config right
- [Solved] Redis Error: Unexpected exception while processing command
- [Solved] Windows Redis Error: Could not create server TCP listening socket 127.0.0.1:6379: bind…
- How to Use filechannel to copy files
- [Solved] Windows redis startup error: Error code: [35256]…
- [Solved] Hbase Error: ERROR: KeeperErrorCode = NoNode for /hbase/master
- Redis Startup Error: Creating Server TCP listening socket 127.0.0.1:6379: bind: No error
- Redis: How to Implementate LRU Caching Mechanism Manually
- [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] Consider defining a bean of type ‘org.springframework.data.redis.core.RedisTemplate‘ in your configu