解决方案1:

将redis.conf中的bind127.0.0.1 用"#"注释掉;

 

解决方案2:

关闭防火墙;

关闭命令: systemctl stop firewalld.service

启动命令: systemctl start firewalld.service

查看防火墙状态命令: systemctl status firewalld

之后重启Redis服务器

重启的方法kill -9 "进程号" 或者 ./redis-cli shutdown

 

解决方案3:

阿里云管理后台配置安全组配置

添加安全组规则

阿里云Cent_OS_7连接Reids报错:java.net.SocketTimeoutException: connect timed out

配置完成之后自动生效,不过Redis需要重启;

 

然后大家想了解redis.conf配置详情的话可以访问以下:

https://blog.csdn.net/zwc2xm/article/details/78663075

 

新手小白总结,欢迎指点;

相关文章: