org.springframework.data.redis.RedisConnectionFailureException: Unable to connect to Redis; nested exception is io.lettuce.core.RedisConnectionException: Unable to connect to 192.68.28.128:6379
解决方案:
1.检查yml里面的host是否与你虚拟机里的Liunx系统的ip地址是否一致
2. 配置redis端口679在linux防火墙中开放
/sbin/iptables -I INPUT -p tcp --dport 6379 -j ACCEPT
/etc/rc.d/init.d/iptables save
3. 修改redis安装目录下的redis.conf文件
修改以下配置:
#bind 127.0.0.1 #将这行代码注释,监听所有的ip地址,外网可以访问
protected-mode no # 把yes改成no,允许外网访问
daemonize yes # 把no改成yes,后台运行
这些方法都用过,并且防火墙都关掉了
有哪位大神知道怎么解决吗