Tomcat 启动报错

来源:8-1 Spring Session快速入门

慕粉2106146336

2018-12-16

tomcat 启动报错

十二月 16, 2018 10:50:23 下午 org.springframework.web.context.ContextLoader initWebApplicationContext
严重: Context initialization failed
org.springframework.beans.factory.BeanCreationException: 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: java.net.SocketTimeoutException: Read timed out; nested exception is redis.clients.jedis.exceptions.JedisConnectionException: java.net.SocketTimeoutException: Read timed out
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1553)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:539)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:475)

写回答

2回答

Mois_Abby

2018-12-23

同学,你好,我是geely老师的助教。

关于你这个问题,通过百度或者谷歌可以直接找到答案。请点击以下链接耐心查看。

https://www.cnblogs.com/gudi/p/7823557.html

如果还没有解决,请留言告知。

希望能帮助到你。

1
0

about_blank

2018-12-17

 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: java.net.SocketTimeoutException: Read timed out; nested exception is redis.clients.jedis.exceptions.JedisConnectionException: java.net.SocketTimeoutException: Read timed out



Redis开启Keyspace Notifications功能的,默认是关闭的。

      这个功能有一个参数来控制它,notify-keyspace-events,值为Egx。

      可以通过在Redis.Config中配置。

      也可以通过命令行来配置,如下所示:

    redis-cli config set notify-keyspace-events Egx

      然后重启Redis生效。


检查下 是不是这个问题


1
0

Java企业级电商项目架构 Tomcat集群与Redis分布式

Tomcat集群+Redis分布式+代码重构+源码原理解析

2685 学习 · 947 问题

查看课程