io.netty.channel.ConnectTimeoutException: connection timed out:
可能原因:
application.yml配置问题
redis.conf中没有设置密码,但是application.yml中设置了密码
虚拟机的防火墙没有关闭
关闭防火强命令:systemctl stop firewalld.service
查看防火墙是否关闭:systemctl status firewalld.service
如果关闭命令执行后,查看仍然是未关闭,可关闭终端重新开启后查看,或关闭虚拟机再开启
redis.conf配置文件中bind127.0.0.1修改问题
进入redis.conf所在文件目录,vim redis.conf
运用"/"查找bind 将127.0.0.1修改
redis.conf配置文件中protected-mode yes,改为protected-mode no
进入redis.conf所在文件目录,vim redis.conf
运用“/”查找protected修改(i:修改 Esc:结束修改 “:wq”修改后退出)