redis连接不上

来源:4-14 分布式会话实现(中)

Code_Deli

2020-07-01

老师请问下,我在windows上配置redis的host为装了redis的服务器公网ip,连接不上,是什么原因?视频中我看用的是127.0.1,这样是不是连接的本地windows的,是怎么连上的,不是因该用公网ip连接服务器吗? 感谢解答!!
下面是错误:
Error creating bean with name ‘enableRedisKeyspaceNotificationsInitializer’ defined in class path resource [org/springframework/session/data/redis/config/annotation/web/http/RedisHttpSessionConfiguration.class]: Invocation of init method failed; nested exception is org.springframework.data.redis.RedisConnectionFailureException: Unable to connect to Redis; nested exception is io.lettuce.core.RedisConnectionException: Unable to connect to 39.101.141.44:6379

写回答

1回答

Code_Deli

提问者

2020-07-02

本地安装redis启动redis-server可以了。个人理解:老师连接的是本地的redis,启动本地的redis。

1
1
龙虾三少
本地的用127.0.0.1,远程部署的用远程的
2020-08-04
共1条回复

聚焦Java性能优化 打造亿级流量秒杀系统(赠秒杀项目)

理解高流量电商网站性能构建思路 用高逼格技术解决性能提升问题

2174 学习 · 1009 问题

查看课程