码迷,mamicode.com
首页 > 编程语言 > 详细

spring boot 项目部署在Docker中调用redis出现的奇怪问题

时间:2016-12-14 19:19:20      阅读:1184      评论:0      收藏:0      [点我收藏+]

标签:错误   ppi   cannot   config   hit   can   eating   ssi   ons   

Whitelabel Error Page

This application has no explicit mapping for /error, so you are seeing this as a fallback.

Wed Dec 14 09:43:13 UTC 2016
There was an unexpected error (type=Internal Server Error, status=500).

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: Cannot get Jedis connection; nested exception is redis.clients.jedis.exceptions.JedisConnectio

 

以上是在Docker环境部署后页面上展示的错误,不用Docker直接用java -jar jar包名称的形式启动完全正常

解决方法

1 进入Docker容器

2 安装redis(我用的是ubuntu)

apt-get update
apt-get install redis-server
#启动redis
redis-server /etc/redis/redis.conf

3然后就正常啦

spring boot 项目部署在Docker中调用redis出现的奇怪问题

标签:错误   ppi   cannot   config   hit   can   eating   ssi   ons   

原文地址:http://www.cnblogs.com/westfruit/p/6180351.html

(1)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!